Exercise User Attempt Details
Lists a student's attempts at one exercise (test or assignment), with marks, submission time and any uploaded files. Put the exercise ID in the URL. Students get their own attempts; admins and tutors pass `user_id` to see a student's attempts.
GET
/exercises/{resourceId}/attemptlistExercise User Attempt Details
curl --request GET \
--url 'https://<your-api-host>/nuSource/api/v1/exercises/{resourceId}/attemptlist?class_id=<classId>&user_id=<userid>&is_quiz=false'{
"code": 200,
"message": "Exercise Retrieved",
"exercises": [
{
"attempt_id": 1863381,
"exp": 0,
"grade": 0,
"mark": 0,
"passed": 0,
"perfect": 0,
"test_date": 1659722854,
"test_id": 0,
"total_mark": 0,
"user_test_time": 0,
"is_finalized": 0,
"file_details": [
{
"name": "My_learnings.pdf",
"file_path": "https://dme2wmiz2suov.cloudfront.net/User(89122018)/Course(34329)/Section(159004)/Exercise(40938)/Attempt(1863381)/1699147-My_learnings.pdf?Expires=1706771377&Signature=GaZGelDWyO0OZefLLaa9zKkaU1um6y7BdQtrIn3AGXKcxLyx1habW~pEN4G2tc1rg-gAe1CCPy9ca0qkigRuJFaIdPXsFMoTn5raGu0EC8RCGOCLRqLOGficX8OaeKrkTB9FKOG43YnW5Z8ZkgAAYWXCC-p8bIraz~V~pP9WcFqyPMH668tAU7dKn-ZMtz4YlhBOii3s8FrOOSYpX-sHuspUknpzYnzFSPdRxy37aiDtzQfIQKMC72hr1vSd-aPL9FCj1P7tLG8xB3HtMGWv~wkHFSUOu4pBME99vvmvY-P80NJ6JpC3BSsC45xju0SEvHh2jtDmrb7T7ogah146dQ__&Key-Pair-Id=APKAIIFZDCEANAVU2VTA"
}
],
"is_assignment": 1,
"student_comments": "<p>I have learnt how to relax..... And not to take stress for marks...... </p>",
"faculty_comments": null,
"codejudge_evaluated": null,
"grade_range": null
},
{
"attempt_id": 2140252,
"exp": 0,
"grade": 0,
"mark": 0,
"passed": 1,
"perfect": 0,
"test_date": 1668177167,
"test_id": 0,
"total_mark": 0,
"user_test_time": 0,
"is_finalized": 0,
"file_details": [
{
"name": "1689130-My_Learnings_5.pdf",
"file_path": "https://dme2wmiz2suov.cloudfront.net/User(89122018)/Course(34329)/Section(159004)/Exercise(40938)/Attempt(2140252)/1792407-1689130-My_Learnings_5.pdf?Expires=1706771377&Signature=uikp44-UGHUA0JUxbZ3Od1q2LT4JZBEaW4U7QMDmoRLUReXvtcbHZm7kkEQHjPAbC9xFk9ggRmf15ifEiMoCPGdAep2fLzzuEQuANxBeo9zjvmI1-J8ormV7c3FVWOoKvP7T4u39VASej8UFKM3EBTLMZlOfOPcqNi0MueVsuZGaHngmHSnWoQrOSoExBtKwwuOH8eoumKGpCFTnLCGZfpWGobo5piL3AtcSIMTP04oqkZnCKGpwz2bTDo8qkRlG7H2PDslTzkAHrOggGR~vnEc6qbXhwwuZxyDFXm~J-IPOIPM0J1GfI4IfEEA97Uh8VofpKHQpLZKoFBIDM~TCoA__&Key-Pair-Id=APKAIIFZDCEANAVU2VTA"
}
],
"is_assignment": 1,
"student_comments": "<p><br></p>",
"faculty_comments": null,
"codejudge_evaluated": null,
"grade_range": null
}
],
"results_declared": 1,
"best_grade": 0,
"instructions": "<p>To upload your file, click on the ‘choose file’ link on the right-hand side of the page. Upon clicking on it the files on your computer will be displayed. Choose your activity file and click on the ‘open’ button to upload the file. Click on ‘submit’ for the final submission of the activity.</p>\n",
"exercise_name": "Upload Weekly Learnings Sheet"
}Access: Admins; tutors who contribute to the exercise's course; students who have access to the exercise.
Path parameters
The exercise.
Query parameters
user_idinteger
The student whose attempts you want. Defaults to you.
class_idinteger
Only attempts made in this class (subject batch). Leave it out to get attempts from all classes.
Response
codeinteger
Example:
200messagestring
Example:
Exercise Retrievedexercisesobject[]
The attempts, oldest first
Show child attributesHide child attributes
exercises.attempt_idinteger
Example:
1863381exercises.expinteger
Example:
0exercises.markinteger
Example:
0exercises.passedinteger
Example:
0exercises.test_idinteger
Example:
0exercises.total_markinteger
Example:
0exercises.file_detailsobject[]
Files the student uploaded
Show child attributesHide child attributes
Example:
My_learnings.pdfexercises.is_assignmentinteger
Example:
1HTML
results_declaredinteger
Example:
1best_gradeinteger
Example:
0instructionsstring
exercise_namestring
Example:
Upload Weekly Learnings SheetNotes: When a student calls it before results are declared, marks, grades and comments are left out unless that attempt's result has been released. Students don't see reset attempts. File links expire. Rate limit: 30 requests per minute; going over locks you out for 30 minutes.