Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
zesje
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Works on my machine
zesje
Commits
0a14f898
Commit
0a14f898
authored
5 years ago
by
Ruben Young On
Browse files
Options
Downloads
Patches
Plain Diff
Changed MultipleChoice API get request
parent
be40f1fc
No related branches found
Branches containing commit
No related tags found
1 merge request
!11
MultipleChoiceOption is a widget, /exams API call now returns checkbox data
Pipeline
#17602
passed
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zesje/api/mult_choice.py
+10
-5
10 additions, 5 deletions
zesje/api/mult_choice.py
with
10 additions
and
5 deletions
zesje/api/mult_choice.py
+
10
−
5
View file @
0a14f898
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment