Skip to content
Snippets Groups Projects
Commit 4e2fc62e authored by Thomas Roos's avatar Thomas Roos
Browse files

Extend submission api with more info about student

parent 9d8745d8
No related branches found
No related tags found
No related merge requests found
......@@ -36,14 +36,26 @@ class Submissions(Resource):
raise orm.core.ObjectNotFound(Submission)
return {
'id': s.copy_number,
'studentID': s.student.id if s.student else None,
'student':
{
'id': s.student.id,
'firstName': s.student.first_name,
'lastName': s.student.last_name,
'email': s.student.email
} if s.student else None,
'validated': s.signature_validated,
}
return [
{
'id': s.copy_number,
'studentID': s.student.id if s.student else None,
'student':
{
'id': s.student.id,
'firstName': s.student.first_name,
'lastName': s.student.last_name,
'email': s.student.email
} if s.student else None,
'validated': s.signature_validated,
}
for s in Submission.select(lambda s: s.exam == exam)
......
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