diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index e71fd5e29..951abfdec 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -209,7 +209,7 @@ class HomeworkCommonController < ApplicationController end if @homework.homework_type == 2 && @homework_detail_programing #编程作业 - @homework_detail_programing.language = "C++" + @homework_detail_programing.language = params[:language] @homework_detail_programing.standard_code = params[:standard_code] @homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6 homework_tests = @homework.homework_tests diff --git a/app/views/homework_common/_homework_detail_programing_form.html.erb b/app/views/homework_common/_homework_detail_programing_form.html.erb index 5d1d5ce88..be08dd107 100644 --- a/app/views/homework_common/_homework_detail_programing_form.html.erb +++ b/app/views/homework_common/_homework_detail_programing_form.html.erb @@ -56,7 +56,7 @@