|
|
|
@ -557,7 +557,7 @@ class StudentWorksController < ApplicationController
|
|
|
|
|
@work.student_works_scores.where.not(score: nil).update_all(is_invalid: 1)
|
|
|
|
|
reviewer_role = @user_course_identity == Course::ASSISTANT_PROFESSOR ? 2 : 1
|
|
|
|
|
new_score = StudentWorksScore.new(student_work_id: @work.id, score: params[:score].to_f,
|
|
|
|
|
comment: "使用调分功能调整了作业最终成绩:#{params[:comment]}",
|
|
|
|
|
comment: params[:comment],
|
|
|
|
|
homework_common_id: @work.homework_common_id, user_id: current_user.id,
|
|
|
|
|
reviewer_role: reviewer_role, is_ultimate: 1)
|
|
|
|
|
new_score.save!
|
|
|
|
|