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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Réouven ASSOULY
zesje
Commits
249f01df
Commit
249f01df
authored
7 years ago
by
Joseph Weston
Browse files
Options
Downloads
Patches
Plain Diff
rename submission field
parent
57889dce
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zesje/resources/submissions.py
+6
-6
6 additions, 6 deletions
zesje/resources/submissions.py
with
6 additions
and
6 deletions
zesje/resources/submissions.py
+
6
−
6
View file @
249f01df
...
...
@@ -7,7 +7,7 @@ class Submissions(Resource):
"""
Getting a list of submissions, and assigning students to them.
"""
@orm.db_session
def
get
(
self
,
exam_id
,
copy_number
=
None
):
def
get
(
self
,
exam_id
,
submission_id
=
None
):
"""
get submissions for the given exam, ordered by copy number.
Parameters
...
...
@@ -16,7 +16,7 @@ class Submissions(Resource):
Returns
-------
If
'
copy_number
'
not provided provides a single instance of
If
'
submission_id
'
not provided provides a single instance of
(otherwise a list of):
copyID: int
studentID: int or null
...
...
@@ -27,19 +27,19 @@ class Submissions(Resource):
# This makes sure we raise ObjectNotFound if the exam does not exist
exam
=
Exam
[
exam_id
]
if
copy_number
is
not
None
:
s
=
Submission
.
get
(
exam
=
exam
,
copy_number
=
copy_number
)
if
submission_id
is
not
None
:
s
=
Submission
.
get
(
exam
=
exam
,
copy_number
=
submission_id
)
if
not
s
:
raise
orm
.
core
.
ObjectNotFound
(
Submission
)
return
{
'
copyID
'
:
s
.
copy_number
,
'
id
'
:
s
.
copy_number
,
'
studentID
'
:
s
.
student
.
id
if
s
.
student
else
None
,
'
validated
'
:
s
.
signature_validated
,
}
return
[
{
'
copyID
'
:
s
.
copy_number
,
'
id
'
:
s
.
copy_number
,
'
studentID
'
:
s
.
student
.
id
if
s
.
student
else
None
,
'
validated
'
:
s
.
signature_validated
,
}
...
...
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