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

Changed MultipleChoice API get request

parent be40f1fc
No related branches found
No related tags found
1 merge request!11MultipleChoiceOption is a widget, /exams API call now returns checkbox data
Pipeline #17602 passed
......@@ -91,14 +91,19 @@ class MultipleChoice(Resource):
return dict(status=404, message='Multiple choice question does not exist.'), 404
json = {
"id": mult_choice.id,
"x": mult_choice.x,
"y": mult_choice.y,
"problem_id": mult_choice.problem_id,
"feedback_id": mult_choice.feedback_id
'id': mult_choice.id,
'name': mult_choice.name,
'x': mult_choice.x,
'y': mult_choice.y,
'type': mult_choice.type,
'problem_id': mult_choice.problem_id
}
# Nullable database fields
if mult_choice.label:
json['label'] = mult_choice.label
if mult_choice.feedback_id:
json['feedback_id'] = mult_choice.feedback_id
return json
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