Skip to content
Snippets Groups Projects
Commit f1470c6f authored by Ruben Young On's avatar Ruben Young On
Browse files

Added mc_options to exam api call

parent bd8d8016
No related branches found
No related tags found
1 merge request!11MultipleChoiceOption is a widget, /exams API call now returns checkbox data
Pipeline #17593 passed
...@@ -113,7 +113,21 @@ class Exams(Resource): ...@@ -113,7 +113,21 @@ class Exams(Resource):
'feedback': [ 'feedback': [
fb.id for fb in sol.feedback fb.id for fb in sol.feedback
], ],
'remark': sol.remarks if sol.remarks else "" 'remark': sol.remarks if sol.remarks else "",
'mc_option': [
{
'id': mc_option.id,
'label': mc_option.label,
'problem_id': mc_option.problem_id,
'feedback_id': mc_option.feedback_id,
'widget': {
'name': mc_option.name,
'x': mc_option.x,
'y': mc_option.y,
'type': mc_option.type,
}
} for mc_option in sol.problem.mc_options
]
} for sol in sub.solutions # Sorted by sol.problem_id } for sol in sub.solutions # Sorted by sol.problem_id
], ],
} for sub in exam.submissions } for sub in exam.submissions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment