Communication with LMS - updating score
Jul 21, 2016
Hello!
Here's part of my javascript, that sends quiz score to the LMS (in my case - moodle):
lmsAPI.SetScore(player.GetVar("FinalResultPercent"), 100, 0);
So im entering quiz in Moodle, trying to solve it and get, let's say, 60% points.
Now, I want to have an next attempt. Moodle (and my course) asking me, if I want to resume where I have left. I click ok, I do the quiz one more time, and got 90% (inside the quiz every reset result etc. works fine, because I got in the final screen the new score). And there is the problem - in Moodle in Gradebook I still see old grade. It looks like Moodle doesn't allow course javascript update the score.
Has anyone came upon the same problem? How it can be solved? Is it Moodle or storyline output problem?
I can add, that when I check in Moodle "Start a new attempt" the new score get registered, but in anther attempt (so now I have two attempts with two different scores) - but you know, I can't assume that every user entering the quiz will check that box.
Thanks!
6 Replies
Sounds like the course is being put into review mode, which happens when you pass the scorm, have you set a pass grade in the grade book? What is the pass grade for the course?
Thank you Phil for your reply, my course indeed goes into review mode!
In my course I have following piece of javascript passed to Moodle:
And my relevant Moodle options for SCORM Activity are following:
Tried to mess around with compability settings but neither of them gives me fine results.
Strangely, when showing TOCC, I have green tick after submitting the whole Quiz. And according to my JS, passed status should be set only after getting the 80 in quiz. :(
Setting the status as failed will ensure it goes into review mode can you set it to incomplete that should do it
Well now I'm a little bit confused!
I've dropped IF statement and simply on failed layer put code SetStatus incomplete, and on passed layer setstatus passed.
Now the fun part - I pass the test, I can see the green tick in TOCC, I can see my grade in grade book. And then I click button with trigger Exit Course and... course grade reset to 0 and status to incomplete.
When I don't pass - grade isn't stored in moodle (earlier it was), status is not changed, but when I click exit, I have grade 0 for the attempt and status failed, and when I resume - I'm in review mode.
Inside the tracking options in storyline I have tracking: slides viewed (40 of 40), and report to lms as "Passed/incomplete".
Can they achieve 40/40? If they can when you close the course at that point Storyline will overwrite whatever you send to the LMS if you add this to slide master it will ensure Storyline does not overwrite you course
Phil thank you for your help,
I've just got tired of it sadly. :)
editing lms/lms.js in package, at lines:
I've just commented line 78 ReportStatus (thanks to your tip). Now everything works fine - status and grade are updated as I want, nothing gets overriden or something. Maybe not as elegant as it should be, but works :)
This discussion is closed. You can start a new discussion or contact Articulate Support.