Skip to content

Commit d9a5163

Browse files
committed
Fix points badge background color
1 parent 12a9e38 commit d9a5163

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

edit_course/exercise_forms.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ class RevealRuleForm(FieldsetModelForm):
9696

9797
class Meta:
9898
model = RevealRule
99-
fields = ['trigger', 'delay_minutes', 'time', 'currently_revealed', 'show_zero_points_immediately']
99+
fields = [
100+
'trigger',
101+
'delay_minutes',
102+
'time',
103+
'currently_revealed',
104+
'show_zero_points_immediately',
105+
]
100106
widgets = {'time': DateTimeLocalInput}
101107

102108
def __init__(self, *args: Any, is_submission_feedback: bool = False, **kwargs: Any) -> None:

exercise/templates/exercise/_points_badge.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
{% if difficulty %}
3939
<span class="difficulty align-middle">{{ difficulty }}</span>
4040
{% endif %}
41-
<span class="badge rounded-pill {{ classes }}"
41+
<span class="badge text-bg-secondary rounded-pill {{ classes }}"
4242
{% if badge_title %}data-bs-toggle="tooltip" data-bs-placement="bottom"{% endif %}
4343
title="{{ badge_title }}">
4444
{% if show_zero_points_immediately and best_submission_true_points == 0 %}

exercise/templatetags/exercise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def _points_data(
276276
'module_goal_points': module_goal_points,
277277
'module_goal_percentage': module_goal_percentage,
278278
'module_goal_achieved': module_goal_achieved,
279-
'show_zero_points_immediately': getattr(obj, 'show_zero_points_immediately', False),
279+
'show_zero_points_immediately': getattr(obj, 'show_zero_points_immediately', False),
280280
'best_submission_true_points': best_submission_true_points,
281281
}
282282
reveal_time = getattr(obj, 'feedback_reveal_time', None)

0 commit comments

Comments
 (0)