-
Notifications
You must be signed in to change notification settings - Fork 29
Description
In questionnaires (mooc-grader v1.10), if a checkbox question has enabled the checkbox_feedback
setting, then feedback for correct answers set with the %100%
value is not rendered at all in the feedback HTML. (Checkbox_feedback
causes the feedback for the choice to be rendered directly under each checkbox when it is selected.)
This is not important to fix if nobody really needs this small feature. Checkbox_feedback
is usually not enabled.
This is probably very easy to fix in the templatetag find_common_hints
. It should just read the key %100%
from the hints and add it to the returned list.
mooc-grader/access/templatetags/access.py
Line 31 in 4de2d4a
common_hints = list_of_hints.get('not') |
mooc-grader/access/types/forms.py
Lines 612 to 634 in 4de2d4a
if comparison == "%100%": | |
add = ok | |
else: | |
# Freetext questions with 'string', 'subdiff' or 'regexp' | |
# compare method can have reqular expression based hints. | |
if methods[0] in ('string', 'regexp', 'subdiff'): | |
if fb.get('compare_regexp', False): | |
methods_used = 'regexp' | |
else: | |
methods_used = 'string' | |
methods_used = '-'.join([methods_used] + mods) | |
else: | |
methods_used = method | |
r = self.compare_values(methods_used, value, comparison) | |
add = not r if fb.get('not', False) else r | |
# Checkbox-hints should be linkable with their options: | |
if t == "checkbox" and checkbox_feedback and add: | |
if fb.get('not'): | |
hints['not'] = hints.get('not') or OrderedDict() | |
hints['not'][fb.get('value', '')] = new_hint | |
else: | |
hints[fb.get('value', '')] = new_hint |
Related to apluslms/a-plus-rst-tools#112