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
66d8cc3a
Commit
66d8cc3a
authored
5 years ago
by
Ruben Young On
Browse files
Options
Downloads
Patches
Plain Diff
Changed exams api call to add mc_options in the right place
parent
92a1e913
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
#17626
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/exams.py
+15
-15
15 additions, 15 deletions
zesje/api/exams.py
with
15 additions
and
15 deletions
zesje/api/exams.py
+
15
−
15
View file @
66d8cc3a
...
...
@@ -113,20 +113,7 @@ class Exams(Resource):
'
feedback
'
:
[
fb
.
id
for
fb
in
sol
.
feedback
],
'
remark
'
:
sol
.
remarks
if
sol
.
remarks
else
""
,
'
mc_options
'
:
[
{
'
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
}
}
for
mc_option
in
sol
.
problem
.
mc_options
]
'
remark
'
:
sol
.
remarks
if
sol
.
remarks
else
""
}
for
sol
in
sub
.
solutions
# Sorted by sol.problem_id
],
}
for
sub
in
exam
.
submissions
...
...
@@ -167,7 +154,20 @@ class Exams(Resource):
'
width
'
:
prob
.
widget
.
width
,
'
height
'
:
prob
.
widget
.
height
,
},
'
graded
'
:
any
([
sol
.
graded_by
is
not
None
for
sol
in
prob
.
solutions
])
'
graded
'
:
any
([
sol
.
graded_by
is
not
None
for
sol
in
prob
.
solutions
]),
'
mc_options
'
:
[
{
'
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
}
}
for
mc_option
in
prob
.
mc_options
]
}
for
prob
in
exam
.
problems
# Sorted by prob.id
],
'
widgets
'
:
[
...
...
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