Picture of Markus Görlich
Update cmi.core.score.raw on each assessment
by Markus Görlich - Monday, 20 April 2020, 6:08 PM
 

Hello everyone,

Is it possible to update cmi.core.score.raw on each assessment submit?

Right now it seems that the LMS is only updated when the last assessment in a course is submitted. Is this standard procedure? I would like use cmi.core.score to act as some kind of progress for the learner.

For example have two quizzes, answer one quiz correctly, exit the course and see a score of 50 % in the LMS.

Is there a setting that I missed?

Thanks

Picture of Markus Görlich
Re: Update cmi.core.score.raw on each assessment
by Markus Görlich - Tuesday, 21 April 2020, 1:39 PM
 

My understanding is that first of all I do have to use adapt-contrib-assessment and not just adapt-contrib-spoor.

I did build the course that there is one assessment per article and multiple articles in multiple pages. I basically want to update the score, so that a user sees his progress after an assessment (that’s when he usually takes a break and gets back to the LMS).

There is already an event listener (assessments:complete) that triggers when the user submits the last question of one of the assessments, which is fine as I did structure the course as previously mentioned.

But I struggle to post the score to the LMS. When I call _postScoreToLms in the assessments:complete event, score is always set to NaN. I think I can figure out how to calculate the correct score (completed assessments / total assessments), but I’m unable to basically set cmi.core.score.raw.

Any help is greatly appreciated.

PS: I’m using framework version 2.4.0 and authoring tool version 0.10.1.

Picture of Matt Leathes
Re: Update cmi.core.score.raw on each assessment
by Matt Leathes - Tuesday, 21 April 2020, 2:22 PM
 

https://github.com/adaptlearning/adapt-contrib-spoor/blob/8cf72154910d041951c9d649d26e5ced408a1ade/js/adapt-stateful-session.js#L184

Picture of Markus Görlich
Re: Update cmi.core.score.raw on each assessment
by Markus Görlich - Tuesday, 21 April 2020, 3:30 PM
 

🤦‍♂️

Thank you very much!

Picture of Markus Görlich
Re: Update cmi.core.score.raw on each assessment
by Markus Görlich - Monday, 25 May 2020, 10:04 AM
 

Hi,

I have a follow up on this topic:

A client uses IM|S Classroom Manager as an LMS, where on the left side, the actual SCORM course is displayed and on a right pane, some course information like completion status and score is displayed.

Right now, I added the plugin that sends the cmi.score.raw after each assessment is completed (with Adapt.offlineStorage.set()). The LMS correctly tracks the score, however, only after the course is closed. So if I would complete all assessments, the right pane would show 0/100 score. When I close the course and go back to the LMS course overview, I see the correct value of 100/100 score.

As the LMS supports live updates, I probably shouldn’t use offlineStorage, should I? Is there a way to force the LMS to manually update or sync the offlineStorage with the runtime?

Any help is as always greatly appreciated.

Picture of Matt Leathes
Re: Update cmi.core.score.raw on each assessment
by Matt Leathes - Tuesday, 26 May 2020, 10:41 AM
 

You could see if triggering an LMSCommit call forces it to update? You can do that simply by either changing tabs or minimising the course window. Equally you could set the _timedCommitFrequency to 1 to force adapt to call LMSCommit every minute. If that works, you could investigate a more robust solution.

FYI 'offlineStorage' is really just an abstraction between Adapt and whatever is actually handling the tracking. In this case, that's SCORM.

Picture of Markus Görlich
Re: Update cmi.core.score.raw on each assessment
by Markus Görlich - Tuesday, 26 May 2020, 3:50 PM
 

I see, so the offlineStorage is where all the tracking is saved and it gets synced on specific LMSCommit events?

The score is updated by minimizing the window. Can I manually call API.LMSCommit() from anywhere (any plugin for example) or is there a preferred way?

Picture of Matt Leathes
Re: Update cmi.core.score.raw on each assessment
by Matt Leathes - Tuesday, 26 May 2020, 4:44 PM
 

Not quite, the LMS' SCORM API is where all the data gets saved - the LMS will save it back to the server whenever LMSCommit is called.

You could set the spoor 'advanced setting _timedCommitFrequency to 1 which will force it to call LMSCommit every minute - but if that's not suitable then your best option (other than to wait for 'save' to be added to offlineStorage, which might be a while and not necessarily compatible with the FW version you're using) is to call the 'commit' function of wrapper.js in spoor)

I think you need to do something like var scorm = require('extensions/adapt-contrib-spoor/js/scorm'); scorm.commit(); but I haven't actually tried that so you might need to tweak it a little! If you mess around in the browser console you should be able to figure it out.