You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/exercise/setting.html.erb

377 lines
23 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<style>
.magic-radio + label:before, .magic-checkbox_show + label:before{
width: 16px;
height: 16px;
}
</style>
<div class="edu-class-container edu-position">
<p class="mb10 font-14">
<%= link_to @course.name, course_path(@course), :class => "color-grey-9" %> &gt; <%= link_to "试卷列表", exercise_index_path(:course_id => @course.id), :class => "color-grey-9" %> &gt; #<%= get_ex_index(@exercise, @course, @is_teacher) + 1 %>
</p>
<div class="edu-con-top user_bg_shadow bor-grey-e clearfix mb20">
<p class="ml15 fl color-grey3">
<i class="fa fa-lock mr5 color-grey-c"></i>
<%= @exercise.exercise_name %>
</p>
<%= link_to "返回", student_exercise_list_exercise_path(@exercise), :class => "fr font-12 mr15 mt3 color-grey" %>
</div>
<div class="user_bg_shadow bor-grey-e clearfix">
<% edit_mode = @is_new && @is_teacher %>
<div id="homework_publish_setting">
<!--发布设置-->
<div>
<div class="<%= edit_mode ? 'none' : '' %>" id="show_exercise_setting">
<div class="bor-bottom-greyE pt10 pb10 pr10">
<div class="clearfix mb15">
<p class="ml15 fl font-16 mt5">发布设置</p>
<% if @is_teacher %>
<a href="javascript:void(0);" class="white-btn orange-btn fr mr15 mt15" title="编辑" onclick="show_ex_edit_setting();">编辑</a>
<% end %>
</div>
<div class="ml30 mr30">
<div class="clearfix">
<ul>
<li class="clearfix mb15 edu-position pl30">
<label class="panel-form-label fl mr10">发布时间</label>
<input type="text" class="disabled-bg fl task-form-15 task-height-40 panel-box-sizing" value="<%= format_time @exercise.publish_time %>" disabled>
<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px; width:405px;">
<em></em>
<span></span>
<p>发布之前,学生不会收到试卷</p>
</div>
</li>
<li class="clearfix mb15 edu-position pl30">
<label class=" panel-form-label fl mr10">截止时间</label>
<input type="text" class="disabled-bg fl task-form-15 task-height-40 panel-box-sizing" id="show_end_time" value="<%= format_time @exercise.end_time %>" disabled>
<div class="cl"></div>
</li>
<!--<li class="clearfix mb15 edu-position pl30">-->
<!--<label class=" panel-form-label fl mr10">结束时间</label>-->
<!--<input type="text" class="disabled-bg fl task-form-15 task-height-40 panel-box-sizing" id="show_archive_time" value="" disabled="">-->
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p>结束之后,系统自动归档试卷</p>-->
<!--</div>-->
<!--</li>-->
</ul>
</div>
</div>
</div>
<div class="bor-bottom-greyE pt10 pb10 pr10">
<div class="clearfix mb15">
<p class="ml15 fl font-16 mt10">答题设置</p>
</div>
<div class="ml30 mr30" style="padding-bottom:20px;">
<div class="clearfix">
<ul>
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">答题时长</label>-->
<!--<input type="text" value="<%#= @exercise.time.to_i == -1 ? '' : @exercise.time %>" disabled class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg">-->
<!--<label class="fl mt8 ml5">分钟</label>-->
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p>答题时长不填写,则表示不限时长</p>-->
<!--<p>学生答题时间即使没有超过答题时长的限制</p>-->
<!--<p>但是已到截止时间点,则系统自动为正在答题的学生提交试卷</p>-->
<!--</div>-->
<!--</li>-->
<li class="clearfix mb20 edu-position pl30">
<label class="panel-form-label fl mr10">答题显示</label>
<input class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_1" disabled type="checkbox" <%= @exercise.question_random == 1 ? 'checked' : '' %>>
<label class="fl" for="dt_1">题目顺序随机打乱</label>
<span class="fl color-grey mt5">(选中则学生答题时,题目顺序按照题型随机显示)</span>
<div class="cl"></div>
<input class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_2" disabled type="checkbox" <%= @exercise.choice_random == 1 ? 'checked' : '' %>>
<label class="fl" for="dt_2" style="margin-left: 11%;">选项顺序随机打乱</label>
<span class="fl color-grey mt5">(选中则学生答题时,选项顺序随机显示)</span>
</li>
</ul>
<!--<ul>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">补交答题</label>-->
<!--<input id="edit_allow_late_1" disabled="" class="magic-radio fl" type="radio" name="homework_allow_late" value="1">-->
<!--<label for="edit_allow_late_1" class="fl mr30">允许</label>-->
<!--<input id="edit_allow_late_0" disabled="" class="magic-radio fl" type="radio" name="homework_allow_late" value="0" checked="">-->
<!--<label for="edit_allow_late_0" class="fl">禁止</label>-->
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p>允许补交,则在补交截止日期之前,未答题的学生可以补交答题</p>-->
<!--<p>但是在发布截止日期~补交截止时间内才答题的学生,将被扣迟交分</p>-->
<!--</div>-->
<!--</li>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">&nbsp;</label>-->
<!--<label class="mt8 fl mr10">截止时间</label>-->
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg" disabled="" placeholder="5">-->
<!--</li>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">&nbsp;</label>-->
<!--<label class="mt8 fl mr10">迟交扣分</label>-->
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg" disabled="" placeholder="5">-->
<!--</li>-->
<!--</ul>-->
</div>
</div>
</div>
<div class="bor-bottom-greyE pt10 pb10 pr10">
<div class="clearfix mb15">
<p class="ml15 fl font-16 mt10">公开设置</p>
</div>
<div class="ml30 mr30 mb15">
<div class="clearfix">
<ul>
<li class="clearfix">
<label class="panel-form-label fl mr10">&nbsp;</label>
<input class="magic-checkbox fl mt5 magic-checkbox_show" type="checkbox" disabled <%= @exercise.score_open ? 'checked' : '' %>>
<label class="fl" style="top: 0px">公开成绩</label>
<span class="fl color-grey">(选中则在截止时间之后对班级学生公开所有成员的成绩,否则不公开)</span>
</li>
<li class="clearfix">
<label class="panel-form-label fl mr10">&nbsp;</label>
<input class="magic-checkbox fl mt5 magic-checkbox_show" type="checkbox" disabled <%= @exercise.answer_open ? 'checked' : '' %>>
<label class="fl" style="top: 0px">公开答案</label>
<span class="fl color-grey">(选中则在截止时间之后对班级学生公开试卷题目的答案,否则不公开)</span>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="<%= edit_mode ? '' : 'none' %>" id="edit_exercise_setting">
<%= form_tag(ex_setting_exercise_path(@exercise), :method => "post", :id => 'exercise_setting_form') do |f| %>
<div class="bor-bottom-greyE pt10 pb10 pr10">
<div class="clearfix mb15">
<p class="ml15 fl font-16 mt5">发布设置</p>
</div>
<div class="ml30 mr30">
<div class="clearfix">
<ul>
<li class="clearfix mb15 edu-position pl30">
<label class="panel-form-label fl mr10">发布时间</label>
<input type="text" name="exercise_publish_time" readonly value="<%= format_time @exercise.publish_time %>" <%= @exercise.try(:exercise_status) > 1 ? 'disabled' : '' %> class="fl task-form-15 task-height-40 panel-box-sizing <%= @exercise.try(:exercise_status) > 1 ? 'disabled-bg' : '' %>" placeholder="请选择发布时间">
<span class="color-orange fl ml20 mt5 none" id="exercise_publish_time_notice"><i class="fa fa-exclamation-circle mr5 color-orange"></i></span>
<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px; width:405px;">
<em></em>
<span></span>
<p>发布之前,学生不会收到试卷</p>
</div>
</li>
<li class="clearfix mb15 edu-position pl30">
<label class="panel-form-label fl mr10">截止时间</label>
<input type="text" name="exercise_end_time" readonly value="<%= format_time @exercise.end_time %>" <%= @exercise.try(:exercise_status) == 3 ? 'disabled' : '' %> class="fl task-form-15 task-height-40 panel-box-sizing <%= @exercise.try(:exercise_status) == 3 ? 'disabled-bg' : '' %>" placeholder="请选择截止时间">
<span class="color-orange fl ml20 mt5 none" id="exercise_end_time_notice">
<i class="fa fa-exclamation-circle mr5 color-orange"></i>
</span>
<span class="color-orange fl mt5 none">不能早于发布时间</span>
</li>
<!--<li class="clearfix mb15 edu-position pl30">-->
<!--<label class=" panel-form-label fl mr10">结束时间</label>-->
<!--<input type="text" name="homework_archive_time" readonly="" value="" class=" fl task-form-15 task-height-40 panel-box-sizing" placeholder="请选择结束时间">-->
<!--<span class="color-orange fl ml20 mt5 none" id="homework_archive_time_notice"><i class="fa fa-exclamation-circle mr5 color-orange"></i></span>-->
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p>结束之后,系统自动归档试卷</p>-->
<!--</div>-->
<!--</li>-->
</ul>
</div>
</div>
</div>
<div class="bor-bottom-greyE pt10 pb10 pr10">
<div class="clearfix mb15">
<p class="ml15 fl font-16 mt10">答题设置</p>
</div>
<div class="ml30 mr30" style="padding-bottom:20px;">
<div class="clearfix">
<ul>
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">答题时长</label>-->
<!--<input type="text" name="time" <%#= @exercise.try(:exercise_status) == 3 ? 'disabled' : '' %> value="<%#= @exercise.time.to_i == -1 ? '' : @exercise.time %>" class="fl task-form-15 task-height-40 panel-box-sizing">-->
<!--<label class="fl mt8 ml5">分钟</label>-->
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p>答题时长不填写,则表示不限时长</p>-->
<!--<p>学生答题时间即使没有超过答题时长的限制</p>-->
<!--<p>但是已到截止时间点,则系统自动为正在答题的学生提交试卷</p>-->
<!--</div>-->
<!--</li>-->
<li class="clearfix mb20 edu-position pl30">
<label class="panel-form-label fl mr10">答题显示</label>
<input name="question_random" <%= @exercise.try(:exercise_status) == 3 ? 'disabled' : '' %> class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_3" type="checkbox" <%= @exercise.question_random == 1 ? 'checked' : '' %>>
<label class="fl" for="dt_3">题目顺序随机打乱</label>
<span class="fl color-grey mt5">(选中则学生答题时,题目顺序按照题型随机显示)</span>
<div class="cl"></div>
<input name="choice_random" <%= @exercise.try(:exercise_status) == 3 ? 'disabled' : '' %> class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_4" type="checkbox" <%= @exercise.choice_random == 1 ? 'checked' : '' %>>
<label class="fl" for="dt_4" style="margin-left: 11%;">选项顺序随机打乱</label>
<span class="fl color-grey mt5">(选中则学生答题时,选项顺序随机显示)</span>
</li>
</ul>
<!--<ul>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">补交答题</label>-->
<!--<input id="edit_allow_late_2" class="magic-radio fl" type="radio" name="homework_allow_late_1" value="1">-->
<!--<label for="edit_allow_late_2" class="fl mr30 mt3">允许</label>-->
<!--<input id="edit_allow_late_3" class="magic-radio fl" type="radio" name="homework_allow_late_1" value="0" checked="">-->
<!--<label for="edit_allow_late_3" class="fl mt3">禁止</label>-->
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p>允许补交,则在补交截止日期之前,未答题的学生可以补交答题</p>-->
<!--<p>但是在发布截止日期~补交截止时间内才答题的学生,将被扣迟交分</p>-->
<!--</div>-->
<!--</li>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">&nbsp;</label>-->
<!--<label class="mt8 fl mr10">截止时间</label>-->
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing" placeholder="5">-->
<!--</li>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">&nbsp;</label>-->
<!--<label class="mt8 fl mr10">迟交扣分</label>-->
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing" placeholder="5">-->
<!--</li>-->
<!--</ul>-->
</div>
</div>
</div>
<div class="pt10 pb10 pr10">
<div class="clearfix mb15">
<p class="ml15 fl font-16 mt10">公开设置</p>
</div>
<div class="ml30 mr30">
<div class="clearfix">
<ul>
<li class="clearfix">
<label class="panel-form-label fl mr10">&nbsp;</label>
<input name="score_open" class="magic-checkbox fl magic-checkbox_show" type="checkbox" id="public_scroe" <%= @exercise.score_open ? 'checked' : '' %>>
<label class="fl" for="public_scroe" style="top:0px">公开成绩</label>
<span class="fl color-grey">(选中则在截止时间之后对班级学生公开所有成员的成绩,否则不公开)</span>
</li>
<li class="clearfix">
<label class="panel-form-label fl mr10">&nbsp;</label>
<input name="answer_open" class="magic-checkbox fl magic-checkbox_show" type="checkbox" id="public_answer" <%= @exercise.answer_open ? 'checked' : '' %>>
<label class="fl" for="public_answer" style="top:0px">公开答案</label>
<span class="fl color-grey">(选中则在截止时间之后对班级学生公开试卷题目的答案,否则不公开)</span>
</li>
</ul>
</div>
</div>
</div>
<% end %>
</div>
</div>
<!--主观题评分设置-->
<!--<div class="bor-bottom-greyE pt10 pb10 pr10">-->
<!--<div class="none" id="show_late_setting">-->
<!--<div class="clearfix mb15">-->
<!--<p class="ml15 fl font-16 mt10">主观题评分设置</p>-->
<!--</div>-->
<!--<div class="ml30 mr30" style="padding-bottom:20px;">-->
<!--<div class="clearfix">-->
<!--<ul>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">助教评分</label>-->
<!--<input class="magic-radio fl mt5 magic-checkbox_show" id="zg_1" name="zg[]_1" disabled="" type="radio" checked="">-->
<!--<label class="fl" for="zg_1">普通模式</label>-->
<!--<span class="fl color-grey mt5">(选中则取各助教最终评分的平均分)</span>-->
<!--<div class="cl"></div>-->
<!--<input class="magic-radio fl mt5 magic-checkbox_show" id="zg_2" name="zg[]_1" disabled="" type="radio">-->
<!--<label class="fl" for="zg_2" style="margin-left: 11%;">复审模式</label>-->
<!--<span class="fl color-grey mt5">(选中则只取最终次的助教评分)</span>-->
<!--</li>-->
<!--</ul>-->
<!--<ul>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">最终成绩</label>-->
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p>计算说明</p>-->
<!--<p class="mb10">教师评分*其百分比+助教评分+其百分比+迟交扣分</p>-->
<!--<p>注意</p>-->
<!--<p>非零百分比的评分选项,在没有评分记录的情况下,其百分比平摊到另外</p><p>的评分选项上。例如教师评分60% + 助教评分40% 学生A没有得到</p><p>教师评分则最终成绩将按照助教评分100% 进行计算 </p>-->
<!--</div>-->
<!--</li>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">&nbsp;</label>-->
<!--<label class="mt8 fl mr10">教师评分</label>-->
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg" disabled="" placeholder="5">-->
<!--</li>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">&nbsp;</label>-->
<!--<label class="mt8 fl mr10">助教评分</label>-->
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg" disabled="" placeholder="5">-->
<!--</li>-->
<!--</ul>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="" id="edit_late_setting">-->
<!--<div class="clearfix mb15">-->
<!--<p class="ml15 fl font-16 mt10">主观题评分设置</p>-->
<!--</div>-->
<!--<div class="ml30 mr30" style="padding-bottom:20px;">-->
<!--<div class="clearfix">-->
<!--<ul>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">助教评分</label>-->
<!--<input class="magic-radio fl mt5 magic-checkbox_show" id="zg_3" name="zg[]_2" type="radio" checked="">-->
<!--<label class="fl" for="zg_3">普通模式</label>-->
<!--<span class="fl color-grey mt5">(选中则取各助教最终评分的平均分)</span>-->
<!--<div class="cl"></div>-->
<!--<input class="magic-radio fl mt5 magic-checkbox_show" id="zg_4" name="zg[]_2" type="radio" checked="">-->
<!--<label class="fl" for="zg_4" style="margin-left: 11%;">复审模式</label>-->
<!--<span class="fl color-grey mt5">(选中则只取最终次的助教评分)</span>-->
<!--</li>-->
<!--</ul>-->
<!--<ul>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">最终成绩</label>-->
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p>计算说明</p>-->
<!--<p class="mb10">教师评分*其百分比+助教评分*其百分比-迟交扣分</p>-->
<!--<p>注意</p>-->
<!--<p>非零百分比的评分选项,在没有评分记录的情况下,其百分比平摊到另外</p><p>的评分选项上。例如教师评分60% + 助教评分40% 学生A没有得到</p><p>教师评分则最终成绩将按照助教评分100% 进行计算 </p>-->
<!--</div>-->
<!--</li>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">&nbsp;</label>-->
<!--<label class="mt8 fl mr10">教师评分</label>-->
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing" placeholder="5">-->
<!--</li>-->
<!--<li class="clearfix mb20 edu-position pl30">-->
<!--<label class="panel-form-label fl mr10">&nbsp;</label>-->
<!--<label class="mt8 fl mr10">助教评分</label>-->
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing" placeholder="5">-->
<!--</li>-->
<!--</ul>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="clearfix mt15 mb15 mr15 pr10 <%= edit_mode ? '' : 'none' %>" id="exam_setting_submit_block">
<a href="javascript:void(0);" onclick="ex_setting_form_submit();" class="task-btn task-btn-orange fr">保存</a>
<a href="javascript:void(0);" onclick="s_op_confirm_box('<%= student_exercise_list_exercise_path(@exercise) %>', '修改的内容将全部丢失<br/>是否确认取消保存')" class="task-btn fr mr10">取消</a>
</div>
</div>
</div>
</div>