学生匿评:第一次匿评,分数都不能自动刷新
This commit is contained in:
parent
c0de119969
commit
c3b237af67
|
@ -984,7 +984,7 @@ class StudentWorkController < ApplicationController
|
|||
|
||||
#更新CourseHomeworkStatistics中该学生的待匿评数, 只计算第一次评分
|
||||
if User.current.student_works_scores.where(:student_work_id => @work.id, :reviewer_role => 3).count == 1
|
||||
course_statistics = CourseHomeworkStatistics.find_by_course_id_and_user_id(@homework.course_id, student_work.user_id)
|
||||
course_statistics = CourseHomeworkStatistics.find_by_course_id_and_user_id(@homework.course_id, User.current.id)
|
||||
course_statistics.update_attribute('un_evaluation_work_num', (course_statistics.un_evaluation_work_num - 1) < 0 ? 0 : (course_statistics.un_evaluation_work_num - 1)) if course_statistics
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue