You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are the notes from how we would like this to look like
mc1=MultipleChoiceExercise(
description='How many sides does a square have?',
key='square_sides',
options={
'one': 'One side',
'two': 'Two sides',
'three': 'Three sides',
'four': 'Four sides'
}
# OK, and then key and what you display is the same, you internally# do `options = {k: k for k in options}`options=['one', 'two', 'three', 'four'],
allow_multiple=False, # Default Falserandomize_order=False# Default False
)
### BEGIN HIDDEN TESTassertmc1.answer=='four'### END HIDDEN TESTmc1=MultipleChoiceExercise(
description='How many sides do a triangle or a square have?',
key='square_sides',
options={
'one': 'One side',
'two': 'Two sides',
'three': 'Three sides',
'four': 'Four sides'
}
# OK, and then key and what you display is the same, you internally# do `options = {k: k for k in options}`options=['one', 'two', 'three', 'four'],
allow_multiple=True, # Default Falserandomize_order=False# Default False
)
### BEGIN HIDDEN TESTprint(mc1.answer) # -> always returns a set, even if allow_multiple = Falseassertmc1.check_correct_answers(['four', 'three'])
assertmc1.check_correct_answers('four', 'three')
assertmc1.check_correct_answers('four')
### END HIDDEN TEST## Try on 3 students to see if the "time cost" for grading for the teacher does NOT scale with the number of students
The MultipleChoiceExercise would inherit from ExerciseWidget
These are the notes from how we would like this to look like
The
MultipleChoiceExercise
would inherit fromExerciseWidget
scicode-widgets/src/scwidgets/exercise/_widget_exercise_registry.py
Line 18 in 44495c4
One can look at the
TextExercise
for a simple implementation example inheriting from it https://github.com/osscar-org/scicode-widgets/blob/main/src/scwidgets/exercise/_widget_text_exercise.py to get an idea how to implement it.The text was updated successfully, but these errors were encountered: