Skip to content

Commit 793b6cb

Browse files
committed
Describe soft deadlines
1 parent af47936 commit 793b6cb

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

app/views/exercises/show.html.erb

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,36 @@
5757
<% end %>
5858
<% end %>
5959

60+
<% if @exercise.soft_deadline_for(current_user) %>
61+
<li>
62+
Deadline: <%= @exercise._softdeadline_for(current_user) %>
63+
<% if @exercise.soft_deadline_spec_obj.universal_description %>
64+
(<%= @exercise.soft_deadline_spec_obj.universal_description %>)
65+
<% end %>
66+
<% if Exercise.deadline_expired?(@exercise.soft_deadline_for(current_user)) %>
67+
<% if current_user.administrator? %>
68+
(expired (if you weren't an admin))
69+
<% else %>
70+
(expired)
71+
<% end %>
72+
<% end %>
73+
</li>
74+
<% end %>
75+
6076
<% if @exercise.deadline_for(current_user) %>
6177
<li>
62-
Deadline: <%= @exercise.deadline_for(current_user) %>
78+
After the deadline has passed, you can still return the exercise until <%= @exercise.deadline_for(current_user) %>
6379
<% if @exercise.deadline_spec_obj.universal_description %>
6480
(<%= @exercise.deadline_spec_obj.universal_description %>)
6581
<% end %>
66-
<% if @exercise.expired_for?(current_user) %>
82+
<% if Exercise.deadline_expired?(@exercise.deadline_for(current_user)) %>
6783
<% if current_user.administrator? %>
6884
(expired (if you weren't an admin))
6985
<% else %>
7086
(expired)
7187
<% end %>
7288
<% end %>
89+
<br>However, you will only get <%= @course.soft_deadline_point_multiplier * 100 %>% of the points.
7390
</li>
7491
<% end %>
7592

0 commit comments

Comments
 (0)