Forum Discussion

storyline1ameri's avatar
storyline1ameri
Community Member
4 years ago

How to send quiz results to LMS without sending score value ?

Hi all,

I need to send quiz results to LMS (answers) without sending score value.
Does anybody know how I can do that ? And if it's even possible ?

Thanks,

Marianna

  • ChrisWalsh's avatar
    ChrisWalsh
    Community Member

    Hi Marianna,

    I'm a bit confused as to why you may want to do that, however, I think that should be possible.

    I assume you're publishing the course as SCORM?

    All quiz questions are posted through from Storyline to the LMS's "SCORM Adaptor" after each question is answered. These are done using the cmi.interaction.n. scorm values as well as a "ongoing score value" in cmi.core.score.raw/min/max. (See attachment Capture.png.  The red lines are the SCORM Adaptor receiving scorm messages from Storyline).

    The SCORM Adaptor keeps a local copy (in the browser) of these values and writes these back to the LMS (server) when an LMSCommit occurs (for Storyline, this is done automatically every 1 minute).

    So quiz results are already being sent to the LMS, all you need to do is to block those cmi.core.score.raw/min/max values from being sent from Storyline to the SCORM adaptor. You can do this as follows:

    (Assumes Scorm 1.2 published course)

    1. Open up lms\scormdriver.js file within the course (I would recommend using Notepad++ or Visual Studio for this). 
    2. Locate the function that writes SCORM data to the SCORM Adaptor.  I found the function SCORM2004_CallSetValue(strElement, strValue) on line 3585.  You can then check to see if the strElement value starts with "cmi.score" and if it does, you could just return true instead of the call to SCORM2004_objAPI.SetValue.

    e.g. see Capture2.png screenshot.  I have highlighted the "added code" which checks for, logs and exits the function if a cmi.score value is written.

    The added code in text is:

    // If a score value, then don't write to SCORM and just return true
    if(strElement.substring(0, 10) === "cmi.score."){
    WriteToDebug("Skip writing score");
    return true;
    }

    3. Save the file and test.