diff --git a/app/controllers/stages_controller.rb b/app/controllers/stages_controller.rb
index cdb8712df..d653d33a3 100644
--- a/app/controllers/stages_controller.rb
+++ b/app/controllers/stages_controller.rb
@@ -5,14 +5,15 @@ class StagesController < ApplicationController
include ApplicationHelper
def create
- if params[:stage_name] && params[:shixun_id]
+ if params[:stage_name]
stage = Stage.new
stage.name = params[:stage_name]
+ stage.description = params[:stage_des]
stage.subject_id = @subject.id
stage.user_id = User.current.id
stage.position = @subject.stages.count + 1
ActiveRecord::Base.transaction do
- if stage.save
+ if stage.save && params[:shixun_id]
begin
params[:shixun_id].each do |shixun_id|
shixun = Shixun.find shixun_id
@@ -34,10 +35,11 @@ class StagesController < ApplicationController
end
def update
- if params[:stage_name] && params[:shixun_id]
+ if params[:stage_name]
@stage.name = params[:stage_name]
+ @stage.description = params[:stage_des]
ActiveRecord::Base.transaction do
- if @stage.save
+ if @stage.save && params[:shixun_id]
begin
@stage.stage_shixuns.destroy_all
params[:shixun_id].each do |shixun_id|
diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb
index 6da59d62b..e73ce0214 100644
--- a/app/controllers/subjects_controller.rb
+++ b/app/controllers/subjects_controller.rb
@@ -3,7 +3,7 @@ class SubjectsController < ApplicationController
layout 'base_subject'
before_filter :require_login
before_filter :check_authentication
- before_filter :find_subject, :except => [:index, :create_subject, :new_subject, :append_to_stage]
+ before_filter :find_subject, :except => [:index, :new, :create, :create_subject, :new_subject, :append_to_stage]
include ApplicationHelper
@@ -30,6 +30,26 @@ class SubjectsController < ApplicationController
@stages = @subject.stages
end
+ def new
+ @subject = Subject.new
+ render :layout => "base_edu"
+ end
+
+ def create
+ if params[:subject]
+ subject = Subject.create(:name => params[:subject][:name], :description => params[:subject][:description], :user_id => User.current.id, :visits => 0, :status => 0)
+ end
+ redirect_to subject_path(subject)
+ end
+
+ def update_attr
+ if params[:name]
+ @subject.update_attributes(:name => params[:name])
+ elsif params[:description]
+ @subject.update_attributes(:description => params[:description])
+ end
+ end
+
def new_subject
if Course.where(:tea_id => User.current.id).count > 0
@status = 1
@@ -53,8 +73,9 @@ class SubjectsController < ApplicationController
end
def choose_subject_shixun
- course_list = @subject.course_list
- @shixuns = Shixun.where(:user_id => User.current.id, :status => [0, 1, 2], :id => course_list.shixun_major_courses.map(&:shixun_id))
+ #course_list = @subject.course_list
+ @shixuns = User.current.shixuns.where(:status => [0, 1, 2]).reorder("created_at desc")
+ #@shixuns = Shixun.where(:user_id => User.current.id, :status => [0, 1, 2], :id => course_list.shixun_major_courses.map(&:shixun_id))
@shixuns_count = @shixuns.count
@limit = 8
@shixuns_pages = Paginator.new @shixuns_count, @limit, params['page'] || 1
@@ -67,15 +88,19 @@ class SubjectsController < ApplicationController
end
def publish
- @subject.update_attributes(:status => 1)
apply = ApplyAction.where(:container_type => "ApplySubject", :container_id => @subject.id).order("created_at desc").first
if apply && apply.status == 0
@status = 0
else
- ApplyAction.create(:container_type => "ApplySubject", :container_id => @subject.id, :user_id => User.current.id, :status => 0)
- notes = User.current.show_name.to_s + " 申请发布课程实训:#{@subject.name} "
- JournalsForMessage.create(:jour_id => 1, :jour_type => 'Principal', :user_id => User.current.id, :notes => notes, :private => 1, :reply_id => 0)
- @status = 1
+ if Shixun.where(:id => @subject.stage_shixuns.map(&:shixun_id), :status => [0, 1]).count > 0
+ @status = 2
+ else
+ @subject.update_attributes(:status => 1)
+ ApplyAction.create(:container_type => "ApplySubject", :container_id => @subject.id, :user_id => User.current.id, :status => 0)
+ notes = User.current.show_name.to_s + " 申请发布课程实训:#{@subject.name} "
+ JournalsForMessage.create(:jour_id => 1, :jour_type => 'Principal', :user_id => User.current.id, :notes => notes, :private => 1, :reply_id => 0)
+ @status = 1
+ end
end
end
@@ -83,8 +108,8 @@ class SubjectsController < ApplicationController
apply = ApplyAction.where(:container_type => "ApplySubject", :container_id => @subject.id).order("created_at desc").first
if apply && apply.status == 0
apply.update_attributes(:status => 3)
- @subject.update_column('status', 0)
end
+ @subject.update_attributes(:status => 0)
redirect_to subject_path(@subject)
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 002ed0db7..29fbf65f0 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -230,6 +230,18 @@ module ApplicationHelper
end
end
+ # TPI状态 :已通关、未通关、未开启
+ def my_shixun_status shixun, user
+ status = ""
+ myshixun = Myshixun.where(:shixun_id => shixun.id, :user_id => user.id).first
+ if myshixun.nil?
+ status = "未开启"
+ else
+ status = myshixun.status == 1 ? "已通关" : "未通关"
+ end
+ status
+ end
+
# 定义实训相关方法
def sum_final_score
Game.find_by_sql("SELECT sum(final_score) as total_score FROM `games` where user_id=#{User.current.id}").first.try(:total_score)
@@ -1918,23 +1930,23 @@ module ApplicationHelper
elsif @welcome
title << "创新源于实践"
elsif @course
- title << (@course.name.nil? ? "实训课堂" : @course.name)
+ title << (@course.name.nil? ? "在线课堂" : @course.name)
elsif params[:controller] == "homework_bank"
title << ("题库")
elsif params[:controller] == "courses" && params[:action] == "index"
- title << ("实训课堂")
+ title << ("在线课堂")
elsif @contest
title << (@contest.name.nil? ? "创新源于实践" : @contest.name)
elsif @shixun
- title << (@shixun.name.nil? ? "实训分类" : @shixun.name)
+ title << (@shixun.name.nil? ? "全部实训" : @shixun.name)
elsif @my_shixun
title << ("我的实训")
elsif params[:controller] == "shixuns" && params[:action] == "index"
- title << ("实训分类")
+ title << ("全部实训")
elsif @subject
- title << (@subject.name.nil? ? "课程实训" : @subject.name)
+ title << (@subject.name.nil? ? "实训套件" : @subject.name)
elsif params[:controller] == "subjects" && params[:action] == "index"
- title << ("课程实训")
+ title << ("实训套件")
elsif @organization
title << (@organization.name.nil? ? "创新源于实践" : @organization.name)
elsif @forum || params[:controller] == "forums"
@@ -1945,7 +1957,7 @@ module ApplicationHelper
if !@project_community.blank? || !@user_projectlist.blank?
title << "项目"
elsif !@course_community.blank? || !@user_courselist.blank?
- title << "实训课堂"
+ title << "在线课堂"
elsif !@contest_community.blank?
title << @contest_community
elsif !@manage_issues.blank?
@@ -1960,7 +1972,7 @@ module ApplicationHelper
title << @user.show_name
end
elsif @syllabus
- title << (@syllabus.title.nil? ? "实训课堂" : @syllabus.title)
+ title << (@syllabus.title.nil? ? "在线课堂" : @syllabus.title)
else
title << (User.current.id == 2 ? "未登录" : User.current.try(:realname))
end
diff --git a/app/views/challenges/_content_list.html.erb b/app/views/challenges/_content_list.html.erb
index 3b199c484..7a36fa413 100644
--- a/app/views/challenges/_content_list.html.erb
+++ b/app/views/challenges/_content_list.html.erb
@@ -5,10 +5,10 @@
<%= @challenges.count %>
<% end %>
<% if User.current.manager_of_shixun?(@shixun) && @shixun.status == 0 %>
-
-
-
- 新建阶段
+ +单选任务
+ +多选任务
+ +编程任务
+
<% end %>
<% @challenges.each_with_index do |challenge, index| -%>
diff --git a/app/views/challenges/_edit_task_pass.html.erb b/app/views/challenges/_edit_task_pass.html.erb
index 0e602d69d..4781c0bb5 100644
--- a/app/views/challenges/_edit_task_pass.html.erb
+++ b/app/views/challenges/_edit_task_pass.html.erb
@@ -31,11 +31,41 @@
<% end %>
<% end %>
+
+
<%# if @challenge.st == 1 %>
-
-
<%# end %>
* 名称:
@@ -25,11 +31,14 @@
过关任务不能为空
-
-
-
-
-
+
+
+
+ A
+
+
+ 温馨提示:点击选项,可以直接设置答案 标准答案:请点击正确选项
+
保存
<% if params[:action] == "new" %>
@@ -68,7 +77,62 @@
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
imageUploadURL : "<%= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>"//url
});
+
+ var bt = baidu.template;
+ bt.LEFT_DELIMITER = '';
+
+ $("#shixun_form").on('click', 'a.option_icon_add', function () {
+ var html = bt('t:set-option-list', null);
+ $(this).parent().parent('.clearfix').before(html);
+ var inputs = document.getElementsByName("option_inputs_label");
+ var inputs_spans = document.getElementsByName("option_span");
+ for (var j = 0; j < inputs_spans.length; j++) {
+ if(j >= 0 && j <= 26){
+ $(inputs_spans[j]).html(String.fromCharCode(65 + j));
+ }
+ }
+ for (var i = 0; i < inputs.length; i++) {
+ autoTextarea(inputs[i], 0, 140);
+ }
+ $(inputs[inputs.length - 1]).focus();
+ });
+ $("#shixun_form").on('click', 'a.option_icon_remove', function () {
+ $(this).parent('.clearfix').remove();
+ var inputs_spans = document.getElementsByName("option_span");
+ for (var j = 0; j < inputs_spans.length; j++) {
+ if(j >= 0 && j <= 26){
+ if(j >= 0 && j <= 26){
+ $(inputs_spans[j]).html(String.fromCharCode(65 + j));
+ }
+ }
+ }
+ });
});
+ //设置选项答案
+ function selectchoice(item){
+ //判断是否选中,如果选中,再次点击的时候取消选中
+ if($(item).hasClass('check-option-bg')){
+ $(item).removeClass('check-option-bg');
+ }else{
+ if(true){
+ //单选
+ $(".select-choice").removeClass('check-option-bg');
+ $(item).addClass('check-option-bg');
+ }else{
+ //多选
+ $(item).addClass('check-option-bg');
+ }
+ }
+ $("#current-option").html("");
+ if($(".check-option-bg").length>0){
+ for(var i=0;i<$(".check-option-bg").length;i++){
+ $("#current-option").html($("#current-option").html()+$(".check-option-bg").eq(i).html());
+ }
+ }else{
+ $("#current-option").html("请点击正确选项");
+ }
+ }
window.onload = function(){
$("#challenge_task_pass [type=\"latex\"]").bind("click", function(){
taskpass_editormd.cm.replaceSelection("```latex");
diff --git a/app/views/courses/_member_all_student_list.html.erb b/app/views/courses/_member_all_student_list.html.erb
index b7286f7b5..d0b32777b 100644
--- a/app/views/courses/_member_all_student_list.html.erb
+++ b/app/views/courses/_member_all_student_list.html.erb
@@ -27,14 +27,14 @@
<% end %>
-
+
成员列表
<%= link_to '返回', course_path(@course), :class => 'font-14 color-grey' %>
-
+
-
+
<%= pagination_links_full @member_pages, @member_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
diff --git a/app/views/courses/_member_group_student_list.html.erb b/app/views/courses/_member_group_student_list.html.erb
index 14b0be8ea..d139d5bc6 100644
--- a/app/views/courses/_member_group_student_list.html.erb
+++ b/app/views/courses/_member_group_student_list.html.erb
@@ -31,14 +31,14 @@
<% end %>
-
-
+
+
成员列表
<%= link_to '返回', course_path(@course), :class => 'font-14 color-grey' %>
-
+
-
+
<%= pagination_links_full @member_pages, @member_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
diff --git a/app/views/courses/_member_no_group_student_list.html.erb b/app/views/courses/_member_no_group_student_list.html.erb
index f0e518149..0207d2568 100644
--- a/app/views/courses/_member_no_group_student_list.html.erb
+++ b/app/views/courses/_member_no_group_student_list.html.erb
@@ -27,14 +27,14 @@
<% end %>
-
+
成员列表
<%= link_to '返回', course_path(@course), :class => 'font-14 color-grey' %>
-
+
-
+
<%= pagination_links_full @member_pages, @member_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
diff --git a/app/views/courses/_member_teacher_list.html.erb b/app/views/courses/_member_teacher_list.html.erb
index e138dbd21..fc404fff6 100644
--- a/app/views/courses/_member_teacher_list.html.erb
+++ b/app/views/courses/_member_teacher_list.html.erb
@@ -35,27 +35,33 @@
-
- 序号
- 姓名
- 用户ID
- 角色
-
-
- <% @members.each_with_index do |member, index| %>
- <% user = member.user %>
-
- <%= index + 1 + (@page-1) * 20 %>
- <%= link_to user.show_real_name, user_path(user), :class => '', :target => '_blank' %>
- <%= user.login %>
- <%= zh_course_role(h member.roles.where("name != 'Student'").first.name) %>
-
+
+
+
+ 序号
+ 姓名
+ 用户ID
+ 角色
+
+
+
+ <% @members.each_with_index do |teacher, index| %>
+ <% user = teacher.user %>
+
+ <%= index + 1 + (@page-1) * 20 %>
+
+ <%= link_to user.show_real_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %>
+
+ <%= user.try(:login) %>
+ <%= zh_course_role(h teacher.roles.where("name != 'Student'").first.name) %>
+
<% end %>
-
+
+
-
+
-
+
<%= pagination_links_full @member_pages, @member_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb
index 156a7ecd7..05997f2e1 100644
--- a/app/views/games/_repository.html.erb
+++ b/app/views/games/_repository.html.erb
@@ -8,7 +8,7 @@
<% end %>
- <% if @path == @game.challenge.path.strip %>
+ <% if @path == @game.challenge.path.try(:strip) %>
<% end %>
diff --git a/app/views/layouts/base_subject.html.erb b/app/views/layouts/base_subject.html.erb
index 644061f94..eca18d661 100644
--- a/app/views/layouts/base_subject.html.erb
+++ b/app/views/layouts/base_subject.html.erb
@@ -16,7 +16,7 @@
-
+
diff --git a/app/views/stages/_edit.html.erb b/app/views/stages/_edit.html.erb
index 765989165..3624ab4f8 100644
--- a/app/views/stages/_edit.html.erb
+++ b/app/views/stages/_edit.html.erb
@@ -8,10 +8,16 @@
-
* 名称:
-
-
- 阶段名称不能为空
+
+ * 名称:
+
+ 阶段名称不能为空
+
+
+ 描述:
+
+
+
<%= link_to '+选择实训', choose_subject_shixun_subject_path(@subject), :remote => true, :class => 'add-sx' %>
至少选择一个实训
diff --git a/app/views/subjects/_publish_notice.html.erb b/app/views/subjects/_publish_notice.html.erb
index b9c3f093d..7b546e7eb 100644
--- a/app/views/subjects/_publish_notice.html.erb
+++ b/app/views/subjects/_publish_notice.html.erb
@@ -7,9 +7,11 @@
diff --git a/app/views/subjects/_subject_createnew.html b/app/views/subjects/_subject_createnew.html
new file mode 100644
index 000000000..a86d57578
--- /dev/null
+++ b/app/views/subjects/_subject_createnew.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ kosasa > 实训套件
+ >新建
+
+
+ 新建实训套件
+
+
+
+ * 名称
+
+
+
+ 简介
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
diff --git a/app/views/subjects/_subject_top.html.erb b/app/views/subjects/_subject_top.html.erb
index cdd006272..add31b9ef 100644
--- a/app/views/subjects/_subject_top.html.erb
+++ b/app/views/subjects/_subject_top.html.erb
@@ -7,12 +7,15 @@
<%= @subject.user.show_name %>
-
<%= @subject.name %>
- <% if @subject.status > 1 %>
-
- <%= @subject.stage_shixuns.count %>
- <%= @subject.subject_challenges %>
- <%= @subject.subject_score %>
+ <%= @subject.name %>
+ <% if User.current.manager_of_subject?(@subject) && @subject.status == 0 %>
+
+ <% end %>
+ <% if !User.current.manager_of_subject?(@subject) || @subject.status > 1 %>
+
+ <%= @subject.stage_shixuns.count %>
+ <%= @subject.subject_challenges %>
+ <%= @subject.subject_score %>
<% elsif @subject.status == 0 && @subject.stages.count > 0 && User.current.manager_of_subject?(@subject) %>
<%= link_to '申请发布', publish_subject_path(@subject), :class => "course-btn fr", :remote => true %>
@@ -21,4 +24,38 @@
<% end %>
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/app/views/subjects/index.html.erb b/app/views/subjects/index.html.erb
index 6adc1f717..7efca3b78 100644
--- a/app/views/subjects/index.html.erb
+++ b/app/views/subjects/index.html.erb
@@ -3,7 +3,7 @@
diff --git a/app/views/subjects/new.html.erb b/app/views/subjects/new.html.erb
new file mode 100644
index 000000000..bfd4eb1a0
--- /dev/null
+++ b/app/views/subjects/new.html.erb
@@ -0,0 +1,29 @@
+
+
+
+ <%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to "实训套件", subjects_path() %>
+ > 新建
+
+
+ 新建实训套件
+
+
+ <%= labelled_form_for @subject do |f| %>
+
+ * 名称
+
+
+ 请输入名称
+
+
+ 简介
+
+
+
+
+ <%= link_to "取消", subjects_path(), :class => "task-btn fl mr10 ml20" %>
+ 保存
+
+ <% end %>
+
+
\ No newline at end of file
diff --git a/app/views/subjects/publish.js.erb b/app/views/subjects/publish.js.erb
index 04bdaeee6..846edc9ca 100644
--- a/app/views/subjects/publish.js.erb
+++ b/app/views/subjects/publish.js.erb
@@ -1,2 +1,7 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'subjects/publish_notice')%>";
-pop_box_new(htmlvalue,563,406);
\ No newline at end of file
+pop_box_new(htmlvalue,563,406);
+<% if @status == 2 %>
+ <% Shixun.where(:id => @subject.stage_shixuns.map(&:shixun_id), :status => [0, 1]).each do |shixun| %>
+ $("#stage_shixun_<%= shixun.id %>").find(".fa-exclamation-circle").parent().show();
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/subjects/show.html.erb b/app/views/subjects/show.html.erb
index 577eba13c..1ab903787 100644
--- a/app/views/subjects/show.html.erb
+++ b/app/views/subjects/show.html.erb
@@ -1,43 +1,102 @@
-
+
+<% if !@subject.description.blank? || (User.current.manager_of_subject?(@subject) && @subject.status == 0) %>
+
+
+ 简介
+ <% if User.current.manager_of_subject?(@subject) && @subject.status == 0 %>
+
+ <% end %>
+
+
<%= @subject.description.blank? ? "暂未填写" : @subject.description %>
+
+<% end %>
+
+
+
<% @stages.each do |stage| %>
-
-
-
<%= stage.name %>
- <% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %>
-
- 删除
- 编辑
-
- <% end %>
-
-
- <% stage.stage_shixuns.each_with_index do |stage_shixun, index| %>
- <% shixun = stage_shixun.shixun %>
-
-
<%= index + 1 %>
-
-
- <%= shixun.name %>
-
-
-
-
<%= shixun.language %>
-
<%= shixun.shixun_trainee %>
+
+
+
+ <%= stage.name %>
+ <% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %>
+
+
+ <% end %>
+
+
<%= stage.description %>
+ <% stage.stage_shixuns.each_with_index do |stage_shixun, index| %>
+ <% shixun = stage_shixun.shixun %>
+
+
+
+ <%= shixun.name %>
+
+
+
+ <%= shixun.challenges.count %>
+
+
+ <%= shixun.shixun_score %> 经验值
+
+ <% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %>
+ <%= shixun.shixun_status %>
+
+ <% else %>
+ <% case my_shixun_status(shixun, User.current) %>
+ <% when '已通关' %>
+
+ <% when '未通关' %>
+
+ <% when '未开启' %>
+
+ <% end %>
+ <% end %>
+
-
- <%= shixun.challenges.count %>
- <%= shixun.myshixuns.count %>
- <%= shixun.shixun_score %>
-
-
- <% end %>
-
-
+ <% end %>
+
<% end %>
+
<% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %>
<% if @stages.count == 0 %>
@@ -51,10 +110,16 @@
-
* 名称:
-
-
- 阶段名称不能为空
+
+ * 名称:
+
+ 阶段名称不能为空
+
+
+ 描述:
+
+
+
<%= link_to '+选择实训', choose_subject_shixun_subject_path(@subject), :remote => true, :class => 'add-sx' %>
至少选择一个实训
@@ -122,13 +187,21 @@
edithtml+="保存 ";
edithtml+="
";
edithtml+="
";
- edithtml+="
* 名称:";
- edithtml+="
";
- edithtml+=" ";
- edithtml+=" 阶段名称不能为空
";
+ edithtml+=" ";
+ edithtml+="* 名称: ";
+ edithtml+=" ";
+ edithtml+=" 阶段名称不能为空
";
+ edithtml+=" ";
+ edithtml+="
";
+ edithtml+=" 描述: ";
+ edithtml+=" ";
+ edithtml+="
";
edithtml+='<%= link_to '+选择实训', choose_subject_shixun_subject_path(@subject), :remote => true, :class => 'add-sx' %>';
- edithtml+="至少选择一个实训 选择实训后,在页面上通过拖拽进行排序调整
";
+ edithtml+="";
+ edithtml+="至少选择一个实训 ";
+ edithtml+="选择实训后,在页面上通过拖拽进行排序调整
";
edithtml+=" ";
+
edithtml+="
";
edithtml+="
";
edithtml+="<% end %>";
@@ -160,12 +233,12 @@
} else{
$("#stage_name_notice").hide();
}
- if($("input[name='shixun_id[]']").length == 0){
- status = false;
- $("#sx_none_notice").show();
- } else{
- $("#sx_none_notice").hide();
- }
+// if($("input[name='shixun_id[]']").length == 0){
+// status = false;
+// $("#sx_none_notice").show();
+// } else{
+// $("#sx_none_notice").hide();
+// }
if(status && flag){
flag = false;
$("#new_stage_form").submit();
diff --git a/config/routes.rb b/config/routes.rb
index 4dcd2a279..63d99e310 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -37,6 +37,7 @@ RedmineApp::Application.routes.draw do
get 'choose_subject_shixun'
get 'publish'
get 'cancel_publish'
+ post 'update_attr'
end
collection do
diff --git a/public/javascripts/edu/base_edu.js b/public/javascripts/edu/base_edu.js
index a9ea17630..6857e28f7 100644
--- a/public/javascripts/edu/base_edu.js
+++ b/public/javascripts/edu/base_edu.js
@@ -991,4 +991,13 @@ function destroy_all_hb(url){
}else{
$("#choose_homework_bank_to_send_notice_h").html("请先选择题目").show();
}
+}
+
+function submit_new_subject(){
+ if($("#new_subject_name").val().trim() == ""){
+ $("#new_subject_name_notice").show();
+ } else{
+ $("#new_subject_name_notice").hide();
+ $("#new_subject").submit();
+ }
}
\ No newline at end of file
diff --git a/public/stylesheets/css/edu-class.css b/public/stylesheets/css/edu-class.css
index dfbc8744a..8f49deccd 100644
--- a/public/stylesheets/css/edu-class.css
+++ b/public/stylesheets/css/edu-class.css
@@ -279,8 +279,6 @@ em{font-style:normal;}
.stud-class-set .people .right .person {background:#fff;min-height:600px;}
.stud-class-set .people .right .person .teacher ul li{width:100%;height:50px;line-height:50px;border-bottom:1px dashed #ddd;}
.stud-class-set .people .right .person .teacher p{width:100%;height:50px;line-height:50px;border-bottom:1px dashed #ddd;}
-.stud-class-set .people .right .person .teacher span{width:120px;display:inline-block;text-align:center;padding-right:91px;}
-.stud-class-set .people .right .person .teacher a{width:120px;display:inline-block;text-align:center;padding-right:91px;}
.stud-class-set .people .right .person .teacher .span1{text-align:left;padding:0;}
.stud-class-set .people .right .person .teacher .span5{padding:0;}
.stud-class-set .people .right .person .student{min-height:600px;}
diff --git a/public/stylesheets/css/edu-public.css b/public/stylesheets/css/edu-public.css
index 68b6c0bcb..310185d32 100644
--- a/public/stylesheets/css/edu-public.css
+++ b/public/stylesheets/css/edu-public.css
@@ -219,6 +219,7 @@ input.task-form-80,textarea.task-form-80,select.task-form-80,.task-form-80{paddi
input.task-form-90,textarea.task-form-90,select.task-form-90,.task-form-90{padding:5px;width:90%;}
input.task-form-100,textarea.task-form-100,select.task-form-100,.task-form-100{padding:5px;width:100%;}
input.task-height-40,textarea.task-height-40,.task-height-40,select.task-height-40{height:40px;}
+input.task-height-220,textarea.task-height-220,.task-height-220{height:220px;}
input.task-height-150,textarea.task-height-150,.task-height-150{height:150px;}
input.task-height-150,textarea.task-height-150,.task-height-100{height:100px;}
@@ -285,10 +286,10 @@ a:hover.task-btn-line{ border:1px solid #3498db;background:#3498db;color: #fff;}
/*input框移出后没有内容将边框阴影变为红色*/
.notinput_bg_shadow{border: none;box-shadow: 0px 0px 4px rgba(227,53,37,1);}
/*设置input框的placehoder的字体颜色*/
-input::-webkit-input-placeholder{color: #c4c4c4}
-input::-moz-placeholder { color:#c4c4c4;}
-input::-moz-placeholder { color:#c4c4c4;}
-input::-ms-input-placeholder {color:#c4c4c4;}
+input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color: #c4c4c4}
+input::-moz-placeholder,textarea::-moz-placeholder { color:#c4c4c4;}
+input::-moz-placeholder,textarea::-moz-placeholder { color:#c4c4c4;}
+input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#c4c4c4;}
/*班级讨论区置顶的样式*/
.btn-cir-red {background: red; color: #fff; font-weight: normal;}
.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;border-radius: 15px;line-height: 20px;font-size: 12px;}
diff --git a/public/stylesheets/css/edu-subject.css b/public/stylesheets/css/edu-subject.css
index 18abbbd61..c1fe54c60 100644
--- a/public/stylesheets/css/edu-subject.css
+++ b/public/stylesheets/css/edu-subject.css
@@ -20,6 +20,20 @@
.bot_li{text-align: center;}
.bot_li li{float: left;margin:9px 4px 0px 4px;}
.bot_li li span{display: inline-block;float: left; border: 2px solid #e8e8e8;color: #888;border-radius: 50%;text-align: center;line-height:28px;width: 28px;height: 28px;font-size: 13px}
+
+
+/*-----------新版新建实训------------*/
+.produce-content:hover i{color:#29bd8b!important;}
+.subject-main-name{outline: none}
+.subject-produce{outline: none;}
+.stage-info-line{padding-left: 50px}
+.stage-info-line:hover{background-color:rgba(142,212,254,0.3)}
+.lesson-saved-list-item:hover{box-shadow: 0 0 8px 0 rgba(0,0,0,.2);}
+.lesson-saved-list-item:hover .edit{color:#29bd8b!important;}
+.lesson-saved-list-item:hover .delete{color:#29bd8b!important;}
+li.li-width50{width: 50%;text-align: left}
+li.li-width20{width: 20%;text-align: left}
+li.li-width10{width: 10%;text-align: left}
/*------课程实训首页---------*/
.course_tip_box{width: 460px;padding: 10px;background-color: #FFFFFF;}
@@ -37,9 +51,10 @@
.stage-item{border:1px solid #d1d5da;}
.stage{padding: 7px 10px;border-bottom:1px solid #d1d5da;}
.stage-entry{padding: 10px 10px;}
-.stage-name{width: 100%;}
+.stage-name{width: 91%;padding: 5px;margin-left: 10px;border-color:#eeeeee}
.stage-name-label{width: 10%;text-align: center;line-height: 40px;}
.add-sx{padding:0px 5px;width: 99%;height: 40px;line-height: 40px;border: 1px dashed #ffbfaa;display: inline-block;color: #cccccc;}
+.bewrite{width: 90%;margin-left: 10px;border-color: #eeeeee;padding: 5px;}
.box-border{border:1px solid #e1e1e1}
.boxborder-dashed-orange{border: 1px dashed #ffbfaa;}
@@ -55,8 +70,7 @@
.allback{background-color:#FFFFFF}
-.last-all-count{width: 20%;text-align: right;}
-.last-all-count li{float: left;width: 33.3%;}
+.last-all-count{text-align: right;}
.course-option{width: 570px;padding: 10px;background-color: #FFFFFF;}
.magic-radio + label:before, .magic-checkbox + label:before{top: 11px;left: 5px;}
diff --git a/public/stylesheets/css/edu-user.css b/public/stylesheets/css/edu-user.css
index dba560039..9e5fea434 100644
--- a/public/stylesheets/css/edu-user.css
+++ b/public/stylesheets/css/edu-user.css
@@ -102,7 +102,7 @@
.-task-con-int .passageway .hascon .expand{display:block;;height:70px;line-height:70px;text-align:center;color:#5faee3;}
.-task-con-int .passageway .hascon .expand:hover{ color:#5faee3;}
.bg_shadow{-webkit-box-shadow: 0 0 10px #ccc;-moz-box-shadow: 0 0 10px #ccc;box-shadow: 0 0 10px #ccc;}
-.new_expand{display:block;;height:70px;line-height:70px;text-align:center;color:#5faee3; background: #fafbfb}
+.new_expand{display:block;;height:70px;line-height:70px;text-align:center;color:#5faee3; background: #FFFFFF}
.new_expand:hover{ color:#5faee3;}
/*--------------------------------------箭头动画效果-----------------------------------*/
.-task-con-int .passageway .hint .zhuan{
diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css
index 4b6469426..ed0fd30c0 100644
--- a/public/stylesheets/css/taskstyle.css
+++ b/public/stylesheets/css/taskstyle.css
@@ -12,7 +12,7 @@ html,body{ font-size:14px; line-height:2.0; height:100%;}
a.user-info-img{ display: block; width: 50px; height: 50px; margin:0 auto; }
a.user-info-img img{border-radius:100px;border:2px solid #666;}
a.user-info-img img:hover{border:2px solid #888;}
-a.user-info-name{ display: block; font-size: 16px; color: #fff; max-width:100px; margin: 10px auto; text-align: center;}
+a.user-info-name{ display: block; font-size: 16px; color: #fff; max-width:100px; margin: 10px auto; text-align: center; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.leftnav-box{ width: 80px; height: 60px; background:#292b3a; padding:10px 0; margin-bottom:2px;}
a.leftnav-box-inner{ display: block; width:77px; border-left:3px solid #292b3a; background:#292b3a; text-align: center; padding:10px 0; color:#575f6c;}
a:hover.leftnav-box-inner,a.leftnav-active{border-left:3px solid #3498db;color: #fff!important;}
@@ -98,6 +98,7 @@ input.panel-form-width-100{ padding:5px;width:100%; height:40px; min-width:700px
textarea.panel-form-width-100{ padding:5px;width:100%; height:150px; min-width:700px;}
textarea.panel-form-width-40{ padding:5px;width:100%; height: 40px; min-width:700px;}
textarea.panel-form-width-690{ padding:5px;width:90%; height:150px; min-width:700px;}
+textarea.panel-form-width2-690{ padding:5px;width:90%; height:40px; min-width:700px;}
.panel-form-width-670{ width: 670px; padding:5px;}
.panel-form-height-150{ height: 150px;}
.panel-form-height-30{height: 30px;}
@@ -333,3 +334,12 @@ a.shixun-task-ban-btn{background-color: #c2c4c6;display: inline-block;font-weigh
.comment-input{width: 90%;padding: 0px 10px;}
.comment-input textarea{border: none !important;width:86%; outline: none;height: 30px;border-radius: 4px;margin-right: 10px;padding-left: 5px;float:left}
.comment_position{ position: absolute;bottom: 8px;}
+
+/*-------新建阶段添加选项部分----------*/
+.option-item{border:1px solid #e2e2e2;}
+.add-option-item{border:1px dashed #e2e2e2;}
+.option-item,.add-option-item{display: block;width: 38px;height: 38px;text-align: center;line-height: 38px;border-radius: 4px}
+.check-option-bg{background: #ee4a1f;color: #ffffff!important;border: 1px solid #ee4a1f}
+.add-option-input{padding: 5px;width: 90%;height: 40px;min-width: 700px;border: 1px dashed #e2e2e2;}
+.add-option-input a{display: block;width: 100%;height: 100%;cursor: pointer}
+.position-delete{position: absolute;right: -17px;top: 12px;cursor: pointer}