diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 866eecbd4..251fd80c4 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -370,6 +370,8 @@ class StudentWorkController < ApplicationController
student_work.late_penalty = @homework.late_penalty
student_work.save
end
+
+ @homework.save
end
unless homework_detail_manual.absence_penalty.to_s == params[:absence_penalty].to_s
@@ -382,6 +384,8 @@ class StudentWorkController < ApplicationController
student_work.save
end
end
+
+ homework_detail_manual.save if homework_detail_manual
end
teacher_priority = params[:teacher_priority] ? 1 : 0
@@ -389,15 +393,16 @@ class StudentWorkController < ApplicationController
homework_detail_manual.ta_proportion = params[:ta_proportion]
homework_detail_programing.ta_proportion = params[:sy_proportion] if homework_detail_programing
@homework.teacher_priority = teacher_priority
+
+ @homework.save
+ homework_detail_manual.save if homework_detail_manual
+ homework_detail_programing.save if homework_detail_programing
+
@homework.student_works.each do |student_work|
set_final_score @homework,student_work
student_work.save
end
end
-
- @homework.save
- homework_detail_manual.save if homework_detail_manual
- homework_detail_programing.save if homework_detail_programing
respond_to do |format|
format.html{redirect_to student_work_index_url(:homework => @homework.id)}
end
diff --git a/app/views/homework_common/stop_anonymous_comment.js.erb b/app/views/homework_common/stop_anonymous_comment.js.erb
index 70122c7ab..3cbac1bf6 100644
--- a/app/views/homework_common/stop_anonymous_comment.js.erb
+++ b/app/views/homework_common/stop_anonymous_comment.js.erb
@@ -1,2 +1,2 @@
-$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('匿评结束');
+$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('匿评结束');
alert('关闭成功');
\ No newline at end of file