导入的试卷进入查看页报500
This commit is contained in:
parent
710c06e41a
commit
6dfebd447c
|
@ -56,7 +56,7 @@ class ExerciseController < ApplicationController
|
|||
end
|
||||
end
|
||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||
exercise_end = @exercise.end_time > Time.now
|
||||
exercise_end = @exercise.end_time.nil? ? false : @exercise.end_time > Time.now
|
||||
if @exercise.time == -1
|
||||
@can_edit_excercise = exercise_end
|
||||
else
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
<% unless exercise.publish_time.nil? %>
|
||||
<span class="mr100">发布时间:<%=Time.parse(h(exercise.publish_time)).strftime("%Y-%m-%d %H:%M:%S") %></span>
|
||||
<% end %>
|
||||
<span class="mr100">截止时间:<%=Time.parse(h(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") %></span>
|
||||
<% unless exercise.end_time.nil? %>
|
||||
<span class="mr100">截止时间:<%=Time.parse(h(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") %></span>
|
||||
<% end %>
|
||||
<% if exercise.time != -1 %>
|
||||
<span class="fr">测验时长:<%=exercise.time %>分钟</span>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue