Exercise Attempt List
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 Attempt List
curl --request GET \
--url 'https://<your-api-host>/nuSource/api/v1/exercises/{ResourceId}/attemptlist?class_id=<ClassId>'{
"code": 200,
"message": "Exercise Retrieved",
"exercises": [
{
"attempt_id": 6527747,
"exp": 200,
"grade": -4.17,
"mark": -1,
"passed": 0,
"perfect": 0,
"test_date": 1721046294,
"test_id": 7847,
"total_mark": 24,
"user_test_time": 52,
"is_finalized": 0,
"file_details": null,
"tutor_file_details": null,
"is_assignment": 0,
"student_comments": null,
"faculty_comments": null,
"codejudge_evaluated": null,
"grade_range": null,
"userIPInfo": {
"city": "Mumbai",
"country": "India",
"countryCode": "IN",
"regionName": "Maharashtra",
"timezone": "Asia/Kolkata",
"country_code_id": 103,
"dial_code": "+91",
"ip": "203.76.183.58",
"ipAdress": "203.76.183.58"
},
"is_attempt_reset": 0,
"attempt_reset_at": null,
"attempt_reset_by": null
}
],
"results_declared": 1,
"best_grade": -4.170000076293945,
"instructions": "<p><br></p>\n",
"exercise_name": "EXE"
}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:
6527747exercises.expinteger
Example:
200exercises.markinteger
Example:
-1exercises.passedinteger
Example:
0exercises.test_idinteger
Example:
7847exercises.total_markinteger
Example:
24Files the student uploaded
Files the tutor attached
exercises.is_assignmentinteger
Example:
0HTML
exercises.userIPInfoobject
Location of the device used
Show child attributesHide child attributes
Example:
MumbaiExample:
IndiaExample:
INExample:
MaharashtraExample:
Asia/KolkataExample:
103Example:
+91exercises.userIPInfo.ipstring
Example:
203.76.183.58Example:
203.76.183.58exercises.is_attempt_resetinteger
Example:
0results_declaredinteger
Example:
1best_gradenumber
Example:
-4.170000076293945instructionsstring
Example:
<p><br></p>
exercise_namestring
Example:
EXENotes: 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.