编程作业分配比例添加以及界面显示

This commit is contained in:
sw 2015-07-08 11:17:59 +08:00
parent 9a2cb324ab
commit 6af6fdd5a3
3 changed files with 32 additions and 11 deletions

View File

@ -61,6 +61,23 @@
</select>
<div class="cl"></div>
</li>
<li >
<label class="label02">评分比例:&nbsp;</label>
<%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_programing.ta_proportion), {:class => "fl mb10 h26 w70"} %>
<span class="ml5 fl mt5">×&nbsp;教辅评分</span>
<span class="ml5 fl mt5">&nbsp;&nbsp;+&nbsp;&nbsp;</span>
<input type="text" id="student_proportion" value="<%= (100 - homework.homework_detail_programing.ta_proportion* 100).to_i%>%" class="fl mb10 h26 w70" readonly>
<span class="ml5 fl mt5">×&nbsp;系统评分</span>
<span class="ml5 fl mt5">=&nbsp;学生得分</span>
<div class="cl"></div>
</li>
<li >
<label class="label02" >&nbsp;&nbsp;</label>
<span class=" fl c_red">如果教师对学生作品进行了评分,则教师评分为学生最终得分。</span>
<div class="cl"></div>
</li>
<li >
<label class="label02">&nbsp;标准代码:&nbsp;</label>
<textarea name="standard_code" class=" w547 h150 mb10 fl"><%= homework.homework_detail_programing.standard_code%></textarea>

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150702073308) do
ActiveRecord::Schema.define(:version => 20150708025533) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -588,6 +588,7 @@ ActiveRecord::Schema.define(:version => 20150702073308) do
t.integer "homework_common_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.float "ta_proportion", :default => 0.1
end
create_table "homework_evaluations", :force => true do |t|

View File

@ -473,6 +473,8 @@ $(function(){
});
//第一次加载时,如果未开启匿评作业,隐藏显示匿评配置信息
$(function(){
if($("#homework_common_homework_type").attr("id") != null && $("#homework_common_homework_type").val() != 2)
{
if($("#homework_common_homework_type").attr("checked") == "checked")
{
$("#evaluation_setting").show();
@ -483,6 +485,7 @@ $(function(){
$("#evaluation_setting").hide();
$("#ta_proportion").attr("disabled","disabled");
}
}
});
//老师提交 新建/修改 作业