-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
area: configRelated to course configurationRelated to course configurationarea: grading quizzesQuiz featureQuiz featureeffort: hoursThe issue seems to be small and should be doable in hours or few days.The issue seems to be small and should be doable in hours or few days.experience: beginnerrequired knowledge estimaterequired knowledge estimaterequester: Aalto teacherThe issue is raised by a teacher from Aalto UniversityThe issue is raised by a teacher from Aalto Universitystatus: requires a priorityusing this label to flag that need EDIT decision ASAPusing this label to flag that need EDIT decision ASAPtype: bugThis is a bug.This is a bug.
Description
If I have a submit exercise with a radio field:
# -- snip --
max_points: 1
view_type: access.types.stdsync.createForm
fieldgroups:
- title: Radio Form
type: radio
required: true
points: 1
options:
- label: Option 1
value: 100
correct: true
- label: Option 2
value: 200
correct: true
All options are correct so I should receive points regardless of which one I pick, but the result is always 0 points.
I believe I've located the cause to the method grade_radio
mooc-grader/access/types/forms.py
Lines 742 to 759 in 5b8b120
def grade_radio(self, configuration, value, hints=None): | |
hints = hints or [] | |
# There may be several correct options, but only one of them needs to | |
# be selected in the submission in order to gain points. | |
correct = False | |
i = 0 | |
for opt in configuration.get("options", []): | |
name = self.option_name(i, opt) | |
if opt.get("correct", False): | |
if name == value: | |
correct = True | |
else: | |
self.append_hint(hints, opt) | |
elif name == value: | |
self.append_hint(hints, opt) | |
i += 1 | |
return correct, hints, 'string' |
Where on line 752 the if name == value
is performing a str to int comparison, so it is always false.
Metadata
Metadata
Assignees
Labels
area: configRelated to course configurationRelated to course configurationarea: grading quizzesQuiz featureQuiz featureeffort: hoursThe issue seems to be small and should be doable in hours or few days.The issue seems to be small and should be doable in hours or few days.experience: beginnerrequired knowledge estimaterequired knowledge estimaterequester: Aalto teacherThe issue is raised by a teacher from Aalto UniversityThe issue is raised by a teacher from Aalto Universitystatus: requires a priorityusing this label to flag that need EDIT decision ASAPusing this label to flag that need EDIT decision ASAPtype: bugThis is a bug.This is a bug.
Type
Projects
Status
No status