<% if status == 0 && exercise.time != -1%>
提交成功!您的分数是:<%=@score %>分。
<%= 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") %>
提交成功!
<%= 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")%>
保存成功!
<%= 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")%>
时间已到!
<%= link_to "确定", exercise_path(),:class => 'commit'%>
<% elsif status == 2 %>
发生未知错误,请检查您的网络。
<%= link_to "确定", "javascript:void(0)",:onclick => 'hidden_atert_form();',:class => 'commit'%>
<% else %>
时间已到!您的分数是:<%=@score %>分。
<%= link_to "确定", exercise_path(),:class => 'commit'%>
<% end %>