<div id="popbox" style="text-align: center;margin-top: 25px">
  <% if @save == 1 %>
      <h3 style="font-weight: normal;color: green">保存成功，测验日期截止前您还可以继续答题。</h3>
      <%= link_to "确定", exercise_index_path(:course_id => @course.id),:class => 'commit'%>
  <% elsif 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 && 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: red">提交成功，您还有未完成的题目，测验日期截止前您还可以继续答题，祝您考高分。</h3>
      <%= link_to "确定",exercise_index_path(:course_id => @course.id),:class => 'commit'%>
  <% elsif status == 1 && 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: red">时间已到!</h3>
      <%= link_to "确定", exercise_path(),: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>
