Search code examples
javadesire2learnvalence

Getting grades through the D2L with scheme applied


I'm able to get the final grade for a particular user with:

GET /d2l/api/le/(version)/(orgUnitId)/grades/final/values/(userId)

But I need to apply a grading scheme from the context of this user's final grade to turn it into a letter that's associated with the scheme:

"GradeObjectName": "Final Adjusted Grade",
"GradeObjectType": 8,
"GradeObjectTypeName": null,
"DisplayedGrade": "89 / 100", **Should be 'B+' **

Is there a way to get the transformed numerical value without extracting both the scheme and the final grade calculation and translating the values?

Additionally, is there a way to detect which scheme is applied to a class context?


Solution

  • Unfortunately, the final grade objects in the Brightspace APIs are treated specially and it's not possible to directly retrieve their properties (to see, for example, which scheme has been applied to them). However, assuming that the course's grade book is, in fact, set up to use a Letter Grade scheme with final grades, then what DisplayedGrade value you get back through the APIs depends upon the Display Options for the final grade object in the UI's Manage Grades tool.

    I believe that it's the Student View of the display options that pertains, whether you're using the "MyGradeValue" to get the calling user's final grade, or the API to get the final grade for a user by ID (as you are doing).

    I believe that, if the display options have set to show the Grade scheme symbol (instead of the Points grade), then the symbol will be sent back via the API.