编辑作业时分组作业的评分比例

This commit is contained in:
cxt 2016-10-20 17:31:48 +08:00
parent ab0280aa30
commit 0ccb6b884a
1 changed files with 2 additions and 2 deletions

View File

@ -96,9 +96,9 @@ class HomeworkCommonController < ApplicationController
anonymous = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment].to_i : 1
if anonymous != @homework.anonymous_comment
if anonymous == 1
homework_detail_manual.ta_proportion = @homework.homework_type == 1 ? 1.0 : 0.4
homework_detail_manual.ta_proportion = @homework.homework_type == 2 ? 0.4 : 1.0
else
homework_detail_manual.ta_proportion = @homework.homework_type == 1 ? 0.6 : 0.3
homework_detail_manual.ta_proportion = @homework.homework_type == 2 ? 0.3 : 0.6
end
end