Explore the community Forums Lectora LMS Integration Manually setting cmi.score.min and cmi.score.max in LMS?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #335110 Score: 0
    Profile photo of Cam Phillips
    Cam Phillips
    Member
    beginner
    intermediate
    friend finder
    wise owl
    curious george
    contributor
    19 pts
    @_

    Hi Everyone,

    Wondering if anyone has any experience in manually setting LMS variables from within Lectora?

    I’m deploying an assessment module to Brightspace (Desire2Learn) LMS – the overall learner score (cmi.score.raw) is being successfully communicated to the LMS, however I also need to write back the cmi.score.min and cmi.score.max variables for the score to be correctly stored in the LMS’s ‘Gradebook’.

    Is it possible to manually set these values within Lectora so they’re written to the LMS upon completion of the assessment?

    I suspect this can be done with a Javascript call or HTML extension but I don’t have the faintest idea where to start!

    Any clues? Thanks!

    Cam

    #335280 Score: 0
    Profile photo of Cam Phillips
    Cam Phillips
    Member
    beginner
    intermediate
    friend finder
    wise owl
    curious george
    contributor
    19 pts
    @_

    Figured it out – I hardcoded the values into trivantis-cookies.js in the SCORM package:

     if( this.aiccgroup ) {
              LMSSetValue( this.name, lmsVal )
              if( this.name == 'cmi.score.raw' ){
                var scaled = this.value / 100
                LMSSetValue( 'cmi.score.scaled', scaled )
                LMSSetValue( 'cmi.score.min', 0 )
                LMSSetValue( 'cmi.score.max', 100 )
                LMSCommit( "" );
              } 

    Probably not the most elegant solution but it does work!

    #429481 Score: 0
    Profile photo of Indra Van Caesbroeck
    Indra Van Caesbroeck
    Member
    beginner
    intermediate
    curious george
    wise owl
    contributor
    1 pt
    @ivancaesbroeck1298

    Hi Cam, could you maybe help me out.

    Where exactly would you paste that code in the trivantis-cookie.js?

    #429502 Score: 0
    Profile photo of Indra Van Caesbroeck
    Indra Van Caesbroeck
    Member
    beginner
    intermediate
    curious george
    wise owl
    contributor
    1 pt
    @ivancaesbroeck1298

    Ok never mind, trial and error got me figuring it out.

    For those coming across this post:

    First of all, this concerns SCORM 2004 packages!! Not 1.2. See more information here: https://support.scorm.com/hc/en-us/articles/206166466-cmi-score-raw-whole-numbers-

    Secondly, I use this technique for the following situation: I have a course, with questions that are not part of a test and are not graded as such. All I do is use a button right at the end of the module to 1) set the course to passed, 2) to completion, 3) to tell the LMS “Give users 100(%)” and 4) to exit the course.

    Thirdly, because of that I want to modify the code to reflect a minimum score of 0, and a maximum score of 100. You can change this to reflect whatever it is that you need, but be aware that you might need to edit your cmi.raw.score as well (mine is 100). I have not tried this myself, though.

    In publishing to Lectora SCORM 2004 (3rd edition) you need to edit the trivantis-cookie.js file in your zipped package (unzip first, edit, and then rezip).

    Find the following code in your original file (see image ‘trivantis cookie_original file’):

    if (A.aiccgroup){LMSSetValue(A.name,C);if (A.name=='cmi.score.raw'){var D=A.value/100;LMSSetValue('cmi.score.scaled',D);LMSCommit("");}

    Now modify it to (see image ‘trivantis cookie_edited file’):

    if (A.aiccgroup){LMSSetValue(A.name,C);if (A.name=='cmi.score.raw'){var D=A.value/100;LMSSetValue('cmi.score.scaled',D);LMSSetValue('cmi.score.min',0);LMSSetValue('cmi.score.max',100);LMSCommit("");}

    And that’s what worked for me!

    See image ‘scorm cloud_registration state’. Here you see cmi.min.score and cmi.max.score filled in just as I wanted them to be.

    #429904 Score: 0
    Profile photo of Cam Phillips
    Cam Phillips
    Member
    beginner
    intermediate
    friend finder
    wise owl
    curious george
    contributor
    19 pts
    @_

    <span class=”bbp-user-nicename”><span class=”handle-sign”>@</span>ivancaesbroeck1298</span> Sorry for the lack of reply – I didn’t see the notification until just now!

    Glad you figured it out. I can’t even remember where I was trying to deploy this course or why I needed to use SCORM 2004.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.