截止时间一到立即提交试卷
This commit is contained in:
parent
f8621cac76
commit
dec5980443
|
@ -1,5 +1,5 @@
|
|||
<div id="popbox" style="text-align: center;margin-top: 25px">
|
||||
<% if status == 0 && exercise.time != -1 %>
|
||||
<% if status == 0 && exercise.time != -1%>
|
||||
<h3 style="font-weight: normal;color: green">提交成功!您的分数是:<%=@score %>分。</h3>
|
||||
<%= link_to "确定", exercise_path(),:class => 'commit'%>
|
||||
<% elsif status == 0 && Time.parse(format_time(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") > Time.now.strftime("%Y-%m-%d %H:%M:%S") %>
|
||||
|
@ -8,8 +8,11 @@
|
|||
<% elsif status == 1 %>
|
||||
<h3 style="font-weight: normal;color: red">您还有尚未作答的题目请完成后再提交!</h3>
|
||||
<%= link_to "确定", "javascript:void(0)",:onclick => 'hidden_atert_form();',:class => 'commit'%>
|
||||
<% else %>
|
||||
<% elsif status == 2 %>
|
||||
<h3 style="font-weight: normal;color: red">发生未知错误,请检查您的网络。</h3>
|
||||
<%= link_to "确定", "javascript:void(0)",:onclick => 'hidden_atert_form();',:class => 'commit'%>
|
||||
<% else %>
|
||||
<h3 style="font-weight: normal;color: green">时间已到!您的分数是:<%=@score %>分。</h3>
|
||||
<%= link_to "确定", exercise_path(),:class => 'commit'%>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
//alert(end_time);
|
||||
now = new Date();
|
||||
var total_seconds = now.getTime()/1000 - end_time;
|
||||
if (total_seconds < 0) {
|
||||
if (total_seconds > 0) {
|
||||
$("#exercise_submit_btn").click();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<% else %>
|
||||
×
|
||||
<% end %></span><br />
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) if exercise_question.exercise_standard_answers.first %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ur_inputs">
|
||||
|
@ -117,7 +117,7 @@
|
|||
<% else %>
|
||||
×
|
||||
<% end %></span><br />
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) if exercise_question.exercise_standard_answers.first %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue