Search code examples
scormdesire2learn

SCORM 1.2 API calls to set the grade in gradebook


What javascript API calls are needed to set the grade after completing an activity? Now I have these three calls:

LMSSetValue("cmi.core.score.min", 0);
LMSSetValue("cmi.core.score.max", 100);
LMSSetValue("cmi.core.score.raw", score);

I also set the status to completed:

LMSSetValue("cmi.core.lesson_status", "completed");

When I complete the activity as a student, sometimes I can see icon which tells that activity is completed ("1 attempt(s)"), sometimes not. The gained score is never there.

Desire2Learn is at version 10.1


Solution

  • Not a SCORM expert by any means, but someone here that knows more about it than me makes these points:

    • You also need to call Commit and Terminate and/or LMSFinish; you can find some good technical resources to help developers at the SCORM website, in case you don't already know about them.

    • To verify scores and status getting to the Learning Environment, you can check the SCORM reports in the Web UI (Content > Table of Contents > View Report), which is the standard place to view SCORM results.

    • If scores are set there, you can get them into the grade book in two ways:

      1. You can preview the content topic as an instructor: below the topic view, you'll find a spot to associate a grade item with the topic.

      2. If the DOME configuration variable d2l.Tools.Content.AllowAutoSCORMGradeItem is on for the course, that should automatically create a grade item for that SCORM content object.