Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 1.58 KB

finalgrades.md

File metadata and controls

22 lines (18 loc) · 1.58 KB

Final Grades

The code for this API sample can be found in the grades.js file. This example shows how to make a call to the classlist in order to fetch all the users and then asynchronously gather each user's final grade.

API Route Overview

In order to fetch the Final Grades for a specific course, two API calls are used:

The Code

The example provided exposes a route for accessing the Final Grade information for a given course. The course is determined from the orgUnitId query parameter passed into this route. The index page has this value hardcoded and it can be changed. Please read Configurations for more information on making this change.

The route provided is /finalgrades

  • This route takes the result from the classlist and combines each user object with the object received from calling the final grades route resulting in a list of users and their final grade.
  • The route can be accessed using OAuth 2.0 Authentication or the ID/Key authentication.
  • To asynchronously call the final grades route for each user in the classlist the Node async library was used.