How do you use the Brightspace API to associate a grade item with a topic in a course?

Options
Malte.W.235
Malte.W.235 Posts: 9 🌱
edited March 4 in Development

Using the Brightspace Valence API : https://docs.valence.desire2learn.com/reference.html

I am creating a grade item with this call:

https://docs.valence.desire2learn.com/res/grade.html#post--d2l-api-le-(version)-(orgUnitId)-grades-

But I don't see how I can then associate this new grade item with content in a Course. I can retrieve a topic within a course and see it's ContentObject JSON block:

https://docs.valence.desire2learn.com/res/content.html#get--d2l-api-le-(version)-(orgUnitId)-content-topics-(topicId)

This ContentObject JSON block has a "GradeItemId":

But there is no way to set this via PUT or POST command.

In essence what I am trying to do programmatically is the equivalent of adding a grade item to a topic item by first clicking "Edit" on the topic item:

and then adding points here:

which seems to automatically add a grade item here:

Is it possible to do this programmatically? Thanks,

Tagged:

Answers

  • Megan.S.88
    Megan.S.88 Posts: 54
    Options

    Hi @Malte.W.235 - In this case, you'll want to use the Quiz API to associate the grade item to the quiz, not the content API.

  • Malte.W.235
    Malte.W.235 Posts: 9 🌱
    Options

    Thanks @Megan.S.88, The only issue is that I'm trying to associate a SCORM quiz with a Grade Item. SCORM interactions load as Topics when loaded via the API import call, I think. When you use the Brightspace UI to import SCORM content you are presented with the choice to associate it with a grade item:

    There doesn't seem to be the equivalent for an API call. In the image below there are two SCORM items in the "Quiz" Module. The first, "Begin Quiz" was loaded via the API import call, and the second, "TsunamiW…." via the Brightspace UI and it looks like they are considered different products.

    Is there a better way to import SCORM content via the API to associate it with a Grade Item. Thanks