Docs home

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}/attemptlist
Exercise 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......&nbsp;</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 &lsquo;choose file&rsquo; 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 &lsquo;open&rsquo; button to upload the file. Click on &lsquo;submit&rsquo; 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
exercise_idintegerrequired
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.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Exercise Retrieved
exercisesobject[]
The attempts, oldest first
Show child attributesHide child attributes
Example: 1863381
Example: 0
Percent
Example: 0
Example: 0
Example: 0
0/1
Example: 0
Unix timestamp
Example: 1659722854
Example: 0
Example: 0
Seconds taken
Example: 0
1 once marks are final
Example: 0
Files the student uploaded
Show child attributesHide child attributes
Example: My_learnings.pdf
Example: 1
Example: 1
best_gradeinteger
Example: 0
Example: Upload Weekly Learnings Sheet

Notes: 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.

Updated yesterday

Ask AI