diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb
index acc174659..048f62296 100644
--- a/app/controllers/homework_common_controller.rb
+++ b/app/controllers/homework_common_controller.rb
@@ -175,6 +175,7 @@ class HomeworkCommonController < ApplicationController
end
end
@homework_detail_manual.update_column('comment_status', 2)
+ @homework_detail_manual.update_column('evaluation_start', Date.today)
@statue = 1
# 匿评开启消息邮件通知
send_message_anonymous_comment(@homework, m_status = 2)
@@ -194,6 +195,7 @@ class HomeworkCommonController < ApplicationController
#关闭匿评
def stop_anonymous_comment
@homework_detail_manual.update_column('comment_status', 3)
+ @homework_detail_manual.update_column('evaluation_end', Date.today)
#计算缺评扣分
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
@homework.student_works.each do |student_work|
@@ -274,7 +276,13 @@ class HomeworkCommonController < ApplicationController
#启动匿评参数设置
def start_evaluation_set
-
+ if params[:user_activity_id]
+ @user_activity_id = params[:user_activity_id]
+ else
+ @user_activity_id = -1
+ end
+ @is_in_course = params[:is_in_course]
+ @course_activity = params[:course_activity].to_i
end
#设置匿评参数
@@ -290,6 +298,9 @@ class HomeworkCommonController < ApplicationController
@homework_detail_manual.evaluation_num = params[:evaluation_num]
@homework_detail_manual.save
+ @user_activity_id = params[:user_activity_id].to_i
+ @is_in_course = params[:is_in_course].to_i
+ @course_activity = params[:course_activity].to_i
end
end
diff --git a/app/views/homework_common/_set_evalutation_att.html.erb b/app/views/homework_common/_set_evalutation_att.html.erb
index d51713e9a..59df88680 100644
--- a/app/views/homework_common/_set_evalutation_att.html.erb
+++ b/app/views/homework_common/_set_evalutation_att.html.erb
@@ -1,5 +1,5 @@
<%end%>
- 提交
+ 提交
-<% end%>
-
\ No newline at end of file
+<% end%>
\ No newline at end of file
diff --git a/app/views/student_work/set_score_rule.js.erb b/app/views/student_work/set_score_rule.js.erb
index db9fd6d66..52a13f632 100644
--- a/app/views/student_work/set_score_rule.js.erb
+++ b/app/views/student_work/set_score_rule.js.erb
@@ -1,5 +1,5 @@
clickCanel();
-<% if @user_activity_id %>
+<% if @user_activity_id != -1 %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@courae_activity}) %>");
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
<% else %>
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index f02105fb6..33286c8fc 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -102,7 +102,7 @@
迟交扣分:<%= activity.late_penalty%>分
-
+
匿评开启时间:<%= activity.homework_detail_manual.evaluation_start%> 00:00
@@ -111,7 +111,7 @@
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
-
+
匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59
@@ -172,7 +172,7 @@
<% if activity.anonymous_comment == 0 %>
- <%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
+ <%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity,:user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
<%= homework_anonymous_comment activity,-1,user_activity_id,course_activity %>
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb
index 5bfe1814d..e49a7ed17 100644
--- a/app/views/users/_user_homework_detail.html.erb
+++ b/app/views/users/_user_homework_detail.html.erb
@@ -107,7 +107,7 @@
迟交扣分:<%= homework_common.late_penalty%>分
-
+
匿评开启时间:<%= homework_common.homework_detail_manual.evaluation_start%> 00:00
@@ -116,7 +116,7 @@
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
-
+
匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%> 23:59
@@ -177,7 +177,7 @@
<% if homework_common.anonymous_comment == 0 &&(comment_status == 0 || comment_status == 1)%>
- <%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true)%>
+ <%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common, :is_in_course => is_in_course,:course_activity=>-1),:class => "postOptionLink", :remote => true)%>
<% end %>
<% if homework_common.anonymous_comment == 0%>