修改编程作业语言不成功

This commit is contained in:
sw 2015-07-22 17:00:41 +08:00
parent 01576449c8
commit 7d3a9adfcd
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -56,7 +56,7 @@
<ul>
<li >
<label class="label02">&nbsp;开发语言:&nbsp;</label>
<%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language), {:class => "fl mb10 h26 w70"} %>
<%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language.to_i), {:class => "fl mb10 h26 w70"} %>
<div class="cl"></div>
</li>