Skip to content

Commit d8c74d4

Browse files
reppuli92ihalaij1
authored andcommitted
Make DL extensions visible after the extended DL
Fixes #1495
1 parent 5131ded commit d8c74d4

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

course/templatetags/course.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def _prepare_topmenu(context):
2222
return context['topmenu']
2323

2424

25-
def _deadline_extended_exercise_open(entry, now):
25+
def _deadline_extended_exercise_open(entry):
2626
personal_deadline = entry.personal_deadline
27-
return personal_deadline is not None and entry.opening_time <= now <= personal_deadline
27+
return personal_deadline is not None
2828

2929

3030
@register.inclusion_tag("course/_course_dropdown_menu.html", takes_context=True)
@@ -77,14 +77,14 @@ def exercises_open(entry, now):
7777

7878

7979
@register.filter
80-
def deadline_extended_exercise_open(entry, now):
81-
return _deadline_extended_exercise_open(entry, now)
80+
def deadline_extended_exercise_open(entry):
81+
return _deadline_extended_exercise_open(entry)
8282

8383

8484
@register.filter
85-
def deadline_extended_exercises_open(entry, now):
85+
def deadline_extended_exercises_open(entry):
8686
return any(
87-
_deadline_extended_exercise_open(entry, now)
87+
_deadline_extended_exercise_open(entry)
8888
for entry in entry.flatted
8989
if isinstance(entry, ExercisePoints)
9090
)

exercise/templates/exercise/_user_results.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{% for requirement in module.requirements %}{{ requirement }}{% endfor %}
5959
</span>
6060
{% endif %}
61-
{% if module|deadline_extended_exercises_open:now %}
61+
{% if module|deadline_extended_exercises_open %}
6262
<span class="badge text-primary bg-white float-end text-wrap">
6363
{% translate "ASSIGNMENTS_WITH_PERSONAL_DEADLINE_DEVIATION" %}
6464
</span>
@@ -151,7 +151,7 @@
151151
<td>
152152
{% if exercise_accessible and entry.is_revealed or is_course_staff %}
153153
<a href="{{ entry.link }}" class="{% if entry.is_in_maintenance %}maintenance{% endif %}">{{ entry.name|parse_localization }}</a>
154-
{% if entry|deadline_extended_exercise_open:now %}
154+
{% if entry|deadline_extended_exercise_open %}
155155
<span
156156
data-bs-toggle="tooltip"
157157
title="{% translate 'PERSONAL_EXTENDED_DEADLINE' %} {{ entry.personal_deadline }}"

exercise/templates/exercise/_user_toc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{% if accessible %}
1212
<h3>
1313
<a href="{{ module.link }}" class="{% if module.is_in_maintenance %}maintenance{% endif %}">{{ module.name|parse_localization }}</a>
14-
{% if module|deadline_extended_exercises_open:now %}
14+
{% if module|deadline_extended_exercises_open %}
1515
<span class="badge text-bg-secondary">
1616
{% translate "ASSIGNMENTS_WITH_PERSONAL_DEADLINE_DEVIATION" %}
1717
</span>

0 commit comments

Comments
 (0)