编程作业不可编辑教辅评分比例
This commit is contained in:
parent
62e2f38c95
commit
3a59303de9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue