Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b2c1c4b

Browse files
committedMay 30, 2023
Hide maintenance-mode content from ToC
Fixes #1124 Fixes #438
1 parent ddd4b66 commit b2c1c4b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎exercise/cache/hierarchy.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,10 @@ def is_listed(cls, entry):
302302
return (
303303
entry.get('category_status') != LearningObjectCategory.STATUS.HIDDEN
304304
and entry.get('module_status') != CourseModule.STATUS.UNLISTED
305-
and entry['status'] != LearningObject.STATUS.UNLISTED
305+
and not entry['status'] in (
306+
LearningObject.STATUS.UNLISTED,
307+
LearningObject.STATUS.MAINTENANCE,
308+
)
306309
)
307310
if t == 'module':
308311
return entry['status'] != CourseModule.STATUS.UNLISTED

‎exercise/templates/exercise/_children.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{% if entry.is_empty %}
1616
{{ entry.name|parse_localization }}
1717
{% else %}
18-
<a href="{{ entry.link }}" class="{% if entry|is_in_maintenance %}maintenance{% endif %}">{{ entry.name|parse_localization }}</a>
18+
<a href="{{ entry.link }}">{{ entry.name|parse_localization }}</a>
1919
{% endif %}
2020
{% if entry.submission_count %}
2121
{% points_badge entry %}

0 commit comments

Comments
 (0)
Please sign in to comment.