parent
4b83265508
commit
859fe01c52
|
@ -453,7 +453,7 @@ class UsersController < ApplicationController
|
|||
render_attachment_warning_if_needed(homework)
|
||||
|
||||
homework_detail_manual = HomeworkDetailManual.new
|
||||
homework_detail_manual.ta_proportion = homework.homework_type == 1 ? 0.6 : 0.2
|
||||
homework_detail_manual.ta_proportion = homework.homework_type == 1 ? 0.6 : 0.3
|
||||
homework_detail_manual.comment_status = 1
|
||||
homework_detail_manual.evaluation_start = Time.now
|
||||
homework_detail_manual.evaluation_end = Time.now
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<% if homework.homework_type == 2%>
|
||||
<div>
|
||||
<span class="f14 fontGrey3 mr10">系统评分</span>
|
||||
<%= select_tag :sy_proportion,options_for_select(ta_proportion_option), {:class => "markPercentage"} %>
|
||||
<%= select_tag :sy_proportion,options_for_select(ta_proportion_option,homework.homework_detail_programing.ta_proportion), {:class => "markPercentage"} %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<span class="f14 fontGrey3 mr10">学生匿评</span>
|
||||
<input type="text" id="student_proportion" value="<%= (100 - homework.homework_detail_manual.ta_proportion* 100).to_i%>%" class="markPercentage" readonly>
|
||||
<input type="text" id="student_proportion" value="<%= (100 - homework.homework_detail_manual.ta_proportion * 100).to_i - (homework.homework_detail_programing ? homework.homework_detail_programing.ta_proportion * 100 : 0).to_i%>%" class="markPercentage" readonly>
|
||||
</div>
|
||||
<div class="mb20">
|
||||
<span class="f14 fontGrey3 mr10">教师优先</span>
|
||||
|
|
|
@ -67,10 +67,10 @@
|
|||
<% end%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("导出缺评情况", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey') if @homework.homework_type == 1%>
|
||||
<%= link_to("导出缺评情况", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey') if @homework.homework_type == 1%>
|
||||
<%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="hworkSetting resourcesGrey" onclick="set_score_rule();">评分设置</a>
|
||||
|
|
|
@ -482,18 +482,18 @@ function regex_evaluation_num()
|
|||
|
||||
//点击是否开启匿评单选框效果
|
||||
$(function(){
|
||||
$("#homework_common_homework_type").click(function(){
|
||||
if($("#homework_common_homework_type").attr("checked") == "checked")
|
||||
{
|
||||
$("#evaluation_setting").slideDown();
|
||||
$("#ta_proportion").removeAttr("disabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#evaluation_setting").slideUp();
|
||||
$("#ta_proportion").attr("disabled","disabled");
|
||||
}
|
||||
});
|
||||
//$("#homework_common_homework_type").click(function(){
|
||||
// if($("#homework_common_homework_type").attr("checked") == "checked")
|
||||
// {
|
||||
// $("#evaluation_setting").slideDown();
|
||||
// $("#ta_proportion").removeAttr("disabled");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $("#evaluation_setting").slideUp();
|
||||
// $("#ta_proportion").attr("disabled","disabled");
|
||||
// }
|
||||
//});
|
||||
|
||||
$("#absence_penalty").change(function(){
|
||||
$("#absence_penalty_notice").html(" "+ $("#absence_penalty").val() +" ");
|
||||
|
@ -520,21 +520,21 @@ function build_selector(max_num){
|
|||
}
|
||||
|
||||
//第一次加载时,如果未开启匿评作业,隐藏显示匿评配置信息
|
||||
$(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();
|
||||
$("#ta_proportion").removeAttr("disabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#evaluation_setting").hide();
|
||||
$("#ta_proportion").attr("disabled","disabled");
|
||||
}
|
||||
}
|
||||
});
|
||||
//$(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();
|
||||
// $("#ta_proportion").removeAttr("disabled");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $("#evaluation_setting").hide();
|
||||
// $("#ta_proportion").attr("disabled","disabled");
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
|
||||
//老师提交 新建/修改 作业
|
||||
function submit_homework(id)
|
||||
|
|
Loading…
Reference in New Issue