socialforge/app/views/exercise/_commit_alert.html.erb

19 lines
1.2 KiB
Plaintext

<div id="popbox" style="text-align: center;margin-top: 25px">
<% 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") %>
<h3 style="font-weight: normal;color: green">提交成功!</h3>
<%= link_to "确定", exercise_index_path(:course_id => @course.id),:class => 'commit'%>
<% elsif status == 1 %>
<h3 style="font-weight: normal;color: red">您还有尚未作答的题目请完成后再提交!</h3>
<%= link_to "确定", "javascript:void(0)",:onclick => 'hidden_atert_form();',:class => 'commit'%>
<% 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>