Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%100% correct answer feedback is not shown if checkbox_feedback is set #119

Open
markkuriekkinen opened this issue Oct 8, 2021 · 0 comments
Labels
area: grading quizzes Quiz feature effort: hours The issue seems to be small and should be doable in hours or few days. experience: good first issue Good for newcomers priority: low requester: internal The issue is raised by a person inside the A+ team type: bug This is a bug.

Comments

@markkuriekkinen
Copy link
Contributor

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.

common_hints = list_of_hints.get('not')

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

@markkuriekkinen markkuriekkinen added area: grading quizzes Quiz feature effort: hours The issue seems to be small and should be doable in hours or few days. experience: good first issue Good for newcomers priority: low requester: internal The issue is raised by a person inside the A+ team type: bug This is a bug. labels Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: grading quizzes Quiz feature effort: hours The issue seems to be small and should be doable in hours or few days. experience: good first issue Good for newcomers priority: low requester: internal The issue is raised by a person inside the A+ team type: bug This is a bug.
Projects
None yet
Development

No branches or pull requests

1 participant