编程作业不可编辑教辅评分比例

This commit is contained in:
sw 2015-07-20 16:37:40 +08:00
parent 62e2f38c95
commit 3a59303de9
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,7 @@ class HomeworkCommonController < ApplicationController
homework_detail_programing = HomeworkDetailPrograming.new
homework_detail_programing.language = "C++"
homework_detail_programing.standard_code = params[:standard_code]
homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
question = {title:homework.name,content:homework.description}
question[:input] = []
question[:output] = []
@ -211,6 +211,7 @@ class HomeworkCommonController < ApplicationController
if @homework.homework_type == 2 && @homework_detail_programing #编程作业
@homework_detail_programing.language = "C++"
@homework_detail_programing.standard_code = params[:standard_code]
@homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
homework_tests = @homework.homework_tests
#需要删除的测试
ids = homework_tests.map(&:id) - params[:input].keys.map(&:to_i)