教辅评分、系统评分、学生匿评 比例默认设置

This commit is contained in:
sw 2015-09-17 10:21:01 +08:00
parent 22d4499f8f
commit 1ed1957899
2 changed files with 4 additions and 5 deletions

View File

@ -156,7 +156,6 @@ class HomeworkCommonController < ApplicationController
if @homework.homework_type == 2
@homework.homework_detail_programing ||= HomeworkDetailPrograming.new
@homework_detail_programing = @homework.homework_detail_programing
@homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
@homework_detail_programing.language = params[:language_type].to_i
@homework.homework_tests.delete_all

View File

@ -444,7 +444,7 @@ class UsersController < ApplicationController
homework.end_time = params[:homework_common][:end_time] || Time.now
homework.publish_time = Time.now
homework.homework_type = params[:homework_type].to_i || 1
homework.late_penalty = 2
homework.late_penalty = 10
homework.user_id = User.current.id
homework.course_id = params[:course_id]
@ -452,19 +452,19 @@ class UsersController < ApplicationController
render_attachment_warning_if_needed(homework)
homework_detail_manual = HomeworkDetailManual.new
homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6
homework_detail_manual.ta_proportion = homework.homework_type == 1 ? 0.6 : 0.2
homework_detail_manual.comment_status = 1
homework_detail_manual.evaluation_start = Time.now
homework_detail_manual.evaluation_end = Time.now
homework_detail_manual.evaluation_num = params[:evaluation_num] || 3
homework_detail_manual.absence_penalty = 2
homework_detail_manual.absence_penalty = 5
homework.homework_detail_manual = homework_detail_manual
#编程作业相关属性
if homework.homework_type == 2
homework_detail_programing = HomeworkDetailPrograming.new
homework.homework_detail_programing = homework_detail_programing
homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
homework_detail_programing.ta_proportion = 0.5
homework_detail_programing.language = params[:language_type].to_i
inputs = params[:program][:input]