<% if @exercise.exercise_status == 1 %> 未发布 <% elsif @exercise.exercise_status == 2 %> 已发布 <% elsif @exercise.exercise_status == 3 %> 已截止 <% end%> [ 隐藏测验信息 ]
发布者:<%= @exercise.user.show_name %>
<%= @exercise.exercise_description.html_safe %>
截止时间:<%= format_time @exercise.end_time %>
<% if @exercise.exercise_status == 1 %>
发布时间:<%= format_time @exercise.publish_time %>
<% end %> <% end_time = @exercise.end_time.to_time.to_i %> <% if end_time > Time.now.to_i %>
提交剩余时间: <%= (end_time - Time.now.to_i) / (24*60*60) %><%= ((end_time - Time.now.to_i) % (24*60*60)) / (60*60)%> 小时 <%= (((end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%>
<% else %>
提交已截止
<% end %>
<%= render :partial => "exercise/student_exercise"%>