发布作业界面取消开启匿评日期和关闭匿评日期的设置

删除无效代码文件
This commit is contained in:
sw 2015-09-23 09:51:30 +08:00
parent 20e9cba93a
commit 3cb125ccbf
6 changed files with 0 additions and 432 deletions

View File

@ -1,110 +0,0 @@
<ul class="hwork_new_basic mb10">
<li>
<label class="label02 mb20">
<span class="c_red">*</span>
&nbsp;<%= l(:field_name)%>&nbsp;
</label>
<input type="text" name="homework_common[name]" id="homework_name" class="w548 h26 fl" maxlength="255" onkeyup="regex_homework_name();" value="<%= homework.name%>" >
<p id="homework_name_span" class="c_red ml110"></p>
</li>
<div class="cl"></div>
<li >
<label class="label02 ">&nbsp;&nbsp;&nbsp;<%= l(:field_quote)%>&nbsp;</label>
<div style="width: 83%;float: left;">
<% if edit_mode %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
<% else %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor' %>
<% end %>
</div>
</li>
<div class="cl"></div>
<li class="mt10">
<label class="label02">&nbsp;&nbsp;附件:&nbsp;</label>
<%= render :partial => 'attachments/new_form', :locals => {:container => homework} %>
</li>
<div class="cl"></div>
<li class="fl">
<label class="label02">
<span class="c_red">*</span>
&nbsp;<%= l(:label_limit_time)%>&nbsp;
</label>
<input type="text" name="homework_common[end_time]" id="homework_end_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.end_time%>" >
<%= calendar_for('homework_end_time')%>
<div class="cl"></div>
</li>
<li class="fl ml100" style="display: none;">
<label class="label02">&nbsp;发布日期:&nbsp;</label>
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.publish_time%>" >
<%= calendar_for('homework_publish_time')%>
<div class="cl"></div>
</li>
<div class="cl"></div>
</ul><!--hwork_new_basic end--->
<div class="hwork_new_set" >
<p class="fl ml20 f14 mb10 c_orange">基本规则设置总分为100分</p>
<div class="cl"></div>
<ul class="ml10">
<li>
<label class="label02">迟交扣分:&nbsp;</label>
<%#= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
<input type="number" value="<%= homework.late_penalty%>" min="0" max="50" class="fl mb10 h26 w70" name="late_penalty" onkeyup="check_late_penalty()">
<span class="fl mt5">&nbsp;分</span>
<div class="cl"></div>
</li>
<li style="display: none;">
<label class="label02" >是否匿评:&nbsp;</label>
<%= f.check_box :homework_type, :class => "mb10 mt5 fl" %>
<div class="cl"></div>
</li>
<li >
<label class="label02">评分比例:&nbsp;</label>
<%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_manual.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_manual.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>
</ul>
</div><!--hwork_new_set end-->
<div class="hwork_new_set" id="evaluation_setting" >
<p class="fl ml20 f14 mb10 c_orange">学生互评设置</p>
<div class="cl"></div>
<ul class="ml10">
<li style="display: none;">
<label class="label02">互评启动时间:&nbsp;</label>
<input type="text" name="evaluation_start" id="evaluation_start_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_start%>" >
<%= calendar_for('evaluation_start_time')%>
<div class="cl"></div>
</li>
<li style="display: none;">
<label class="label02">互评结束时间:&nbsp;</label>
<input type="text" name="evaluation_end" id="evaluation_end_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_end%>" >
<%= calendar_for('evaluation_end_time')%>
<div class="cl"></div>
</li>
<li >
<label class="label02">匿评分配数:&nbsp;</label>
<input type="text" name="evaluation_num" id="evaluation_num" class=" hwork_input02 fl" value="<%= homework.homework_detail_manual.evaluation_num%>" maxlength="2" onkeyup="regex_evaluation_num()">
<p class="ml5 fl mt5" id="evaluation_num_notice">每个学生将收到<span class="c_red">&nbsp;3&nbsp;</span>份待匿评作品</p>
<div class="cl"></div>
</li>
<li>
<label class="label02">缺评扣分:&nbsp;</label>
<%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %>
<span class="fl mt5">&nbsp;分</span>
<p class="ml5 fl mt5">学生漏评1个作品将扣<span class="c_red" id="absence_penalty_notice">&nbsp;<%= homework.homework_detail_manual.absence_penalty%>&nbsp;</span>分</p>
<div class="cl"></div>
</li>
</ul> <!-- h1 end--->
</div><!--hwork_new_set end-->

View File

@ -1,193 +0,0 @@
<ul class="hwork_new_basic">
<li >
<label class="label02 mb20">
<span class="c_red">*</span>
&nbsp;<%= l(:field_name)%>&nbsp;
</label>
<input type="text" name="homework_common[name]" id="homework_name" class="w548 h26 fl" maxlength="255" onkeyup="regex_homework_name();" value="<%= homework.name%>" >
<p id="homework_name_span" class="c_red ml110"></p>
</li>
<div class="cl"></div>
<li >
<label class="label02 ">&nbsp;&nbsp;&nbsp;<%= l(:field_quote)%>&nbsp;</label>
<div style="width: 83%;float: left;">
<% if edit_mode %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
<% else %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor' %>
<% end %>
</div>
</li>
<div class="cl"></div>
<li class="mt10">
<label class="label02">&nbsp;&nbsp;附件:&nbsp;</label>
<%= render :partial => 'attachments/new_form', :locals => {:container => homework} %>
</li>
<div class="cl"></div>
<li class="fl">
<label class="label02">
<span class="c_red">*</span>
&nbsp;<%= l(:label_limit_time)%>&nbsp;
</label>
<input type="text" name="homework_common[end_time]" id="homework_end_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.end_time%>" >
<%= calendar_for('homework_end_time')%>
<div class="cl"></div>
</li>
<li class="fl ml100" style="display: none;">
<label class="label02">&nbsp;发布日期:&nbsp;</label>
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.publish_time%>" >
<%= calendar_for('homework_publish_time')%>
<div class="cl"></div>
</li>
<li>
<label class="label02">迟交扣分:&nbsp;</label>
<%#= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
<input type="number" value="<%= homework.late_penalty%>" min="0" max="50" class="fl mb10 h26 w70" name="late_penalty" onkeyup="check_late_penalty()">
<span class="fl mt5">&nbsp;分</span>
<div class="cl"></div>
</li>
</ul><!--hwork_new_basic end--->
<div class="cl"></div>
<div class="hwork_new_set">
<p class="fl ml20 f14 mb10 c_orange">编程评测设置</p>
<div class="cl"></div>
<ul>
<li >
<label class="label02">&nbsp;开发语言:&nbsp;</label>
<%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language.to_i), {:class => "fl mb10 h26 w70",:onchange => "homework_language_change($(this));"} %>
<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 h400 mb10 fl" oninput="init_programing_test();" onpropertychange="init_programing_test()"><%= homework.homework_detail_programing.standard_code || c_stantard_code_teacher%></textarea>
<div class="cl"></div>
</li>
<% if edit_mode %>
<% homework.homework_tests.each do |homework_test|%>
<div>
<li>
<label class="label02">&nbsp;测试输入:&nbsp;</label>
<input type="text" class="fl h26 w190 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
</li>
<li >
<label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label>
<input type="text" class="fl h26 w190 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
</li>
<li>
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
<% if homework_test.result && !homework_test.result.to_s.empty?%>
<% if homework_test.result == 0%>
<a class="green_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">正确</a>
<% else%>
<a class="red_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">错误</a>
<% end%>
<% else%>
<a class="blue_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">测试</a>
<% end%>
<input type="hidden" id="test_result_<%= homework_test.id%>" name="result[<%= homework_test.id%>]" value="<%= homework_test.result%>"/>
</li>
<div class="cl"></div>
</div>
<% end%>
<% else %>
<div>
<li>
<label class="label02">&nbsp;测试输入:&nbsp;</label>
<input type="text" class="fl h26 w190 mb10" name="input[0]" value="1 2"/>
</li>
<li >
<label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label>
<input type="text" class="fl h26 w190 mb10" name="output[0]" value="3"/>
</li>
<li>
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
<a class="blue_btn fl ml5 mt programing_test" onclick="programing_test('0')" id="test_send_0">测试</a>
<input type="hidden" id="test_result_0" name="result[0]" />
</li>
<div class="cl"></div>
</div>
<% end %>
<input type="hidden" name="error_msg" id="homework_test_error_msg" value="<%= homework.homework_tests.first.error_msg if homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg%>">
<table class="border_ce" cellpadding="0" cellspacing="0" id="homework_work_test_show" style="display: <%= homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg && !homework.homework_tests.first.error_msg.empty? ? "block" : "none"%>">
<tbody>
<tr class="border_t" >
<td class="td_end fb c_red w60 td_board_left">
错误信息:
</td>
<td class="td_end wl" id="homework_work_test_desc">
<% if homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg %>
<%= homework.homework_tests.first.error_msg%>
<% end%>
</td>
</tr>
</tbody>
</table>
</ul>
</div>
<script type="text/javascript">
//点击测试,发送
function programing_test(obj) {
$.post(
'<%= programing_test_homework_common_index_path%>',
{
src: $("textarea[name='standard_code']").val(),
input: $("input[name='input[" + obj +"]']").val(),
output: $("input[name='output[" + obj + "]']").val(),
language: $("select[name='language']").val(),
index: obj
},
function (data) {
}
);
}
function init_programing_test()
{
$(".programing_test").each(function(){
$(this).removeClass("green_btn red_btn").addClass("blue_btn").text("测试");
$(this).next("input").val("");
});
}
function homework_language_change(obj)
{
if(obj.val() == "1")
{
// alert(1);
$("textarea[name='standard_code']").val("<%= escape_javascript c_stantard_code_teacher%>");
}
else if(obj.val() == "2")
{
// alert(2);
$("textarea[name='standard_code']").val("<%= escape_javascript c_stantard_code_teacher_%>");
}
}
</script>

View File

@ -1,74 +0,0 @@
<div class="homepageRight">
<div class="HomeWork">
<div class="RightBanner">
<div class="NewsBannerName">发布作业</div>
</div>
<div class="HomeWorkCon">
<div class="mt15">
<textarea class="InputBox W700 " placeholder="请输入作业标题" name="homework_common[name]" id="homework_name" maxlength="255" onkeyup="regex_homework_name();" value="<%= homework.name%>"></textarea>
</div>
<div class=" mt10">
<a href="javascript:void(0);" class="BlueCirBtn fl mr10">导入作业</a>
<input type="text" name="homework_common[end_time]" id="homework_end_time" class="InputBox fl W120 date-input" readonly="readonly" value="<%= homework.end_time%>" placeholder="截止日期"></input>
<div class="fl DateBorder mr10"><a href="javascript:void(0);" class="pic_date"></a></div>
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" class="InputBox fl W120 date-input" readonly="readonly" value="<%= homework.publish_time%>" placeholder="发布日期"></input>
<div class="fl DateBorder"><a href="javascript:void(0);" class="pic_date"></a></div>
<div class="cl"></div>
</div>
<div class="mt10">
<% if edit_mode %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
<% else %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor' %>
<% end %>
</div>
<div class="mt10">
<textarea class="InputBox W700 SearchIcon" placeholder="发送到课程" style="margin-top: 0px; margin-bottom: 0px; height: 29px;"></textarea>
</div>
<div class="mt5">
<a href="javascript:void(0);" class="AnnexBtn fl mt3 mr20">上传附件</a>
<a href="javascript:void(0);" class="FilesBtn fl mr15 mt3">资源库</a>
<div class="cl"></div>
</div>
<div class="mt10">
<a href="javascript:void(0);" class=" fl DropBtn">高级功能</a>
<div class="DropLine"></div>
<div class="cl"></div>
</div>
<div class="advanced_option" style="display:none;">
<div class="mt10">
<select class="InputBox W120" required="true">
<option value="语言选择">语言选择</option>
<option value="C语言">C语言</option>
<option value="C++">C++</option>
</select>
</div>
<div class="mt10">
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" required></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" required></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a>
<div class="cl"></div>
</div>
</div>
<div class="mt10">
<a href="javascript:void(0);" onClick="submit_homework('new_homework_common');" class="BlueCirBtnMini fr">发布</a>
<span class="fr mr10 mt3">或</span><%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'fr mr10 mt3'%>
<div class="cl"></div>
</div>
</div>
</div><!----HomeWork end-->
</div>
<script id="t:test-answer-list" type="text/html">
<div class="mt10">
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" required></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" required></textarea>
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
<a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a>
<div class="cl"></div>
</div>
</script>

View File

@ -1,17 +0,0 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
<%= error_messages_for 'homework_common' %>
<div class="project_r_h">
<h2 class="project_h2">
<%= l(:label_course_homework_new)%>
</h2>
</div>
<div class="hwork_new">
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
<%= hidden_field_tag "course",@course.id%>
<%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a>
<%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
<% end%>
</div><!--hwork_new end-->
<div class="cl"></div>

View File

@ -1,30 +0,0 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<%= error_messages_for 'homework_common' %>
<div class="project_r_h">
<h2 class="project_h2">
<%= l(:label_course_homework_new)%>
</h2>
</div>
<% if @homework_type == "1"%>
<div class="hwork_new">
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
<%= hidden_field_tag "course",@course.id%>
<%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a>
<%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
<% end%>
</div><!--hwork_new end-->
<% elsif @homework_type == "2"%>
<div class="hwork_new">
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
<%= hidden_field_tag "course",@course.id%>
<%= hidden_field_tag "homework_common[homework_type]","2"%>
<%= render :partial => 'homework_common/homework_detail_programing_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a>
<%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
<% end%>
</div><!--hwork_new end-->
<div class="cl"></div>
<% end%>

View File

@ -21,14 +21,6 @@
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time%>" >
<%= calendar_for('homework_end_time')%>
</div>
<div class="calendar_div fl ml10">
<input type="text" name="evaluation_start" id="evaluation_start_time" placeholder="开启匿评日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_start%>" >
<%= calendar_for('evaluation_start_time')%>
</div>
<div class="calendar_div fl ml10">
<input type="text" name="evaluation_end" id="evaluation_end_time" placeholder="关闭匿评日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_end%>" >
<%= calendar_for('evaluation_end_time')%>
</div>
</div>
<div class="cl"></div>
<p id="homework_end_time_span" class="c_red mt5"></p>