Using Moodle 3.1
I wanted to ask a quick question about Moodle’s scorm reporting and the track details. We are seeing a slightly confusing issue where a user is showing 100% in the cmi.objectives_X.score.raw, but a zero in the cmi.core.score.raw.
Moodle appears to be reading the core.score value, and recording that in the main scorm report - in truth I don’t understand the difference between the two types of score.. but it would appear that the user is ‘passing’ the scorm object (and can produce relevant screen shots to show the scorm final score which they get within this particular scorm object) but that Moodle is recording a zero for that attempt.
Is there anything specific I can be checking to see why this happens - or is there a relatively simple explanation for why it occurs? Does Moodle rely on the core.score and if so, what is the objectives.score?
The knock-on effect seems to be that if we set a scorm object as required 'Passed' in order to collect a certificate, for example, the user is able to get the certificate (cmi.objectives_0.status => passed), but the grade book, scorm attempts and all other locations show '0':
- cmi.core.lesson_status => passed
- cmi.core.score.max => 100
- cmi.core.score.min => 0
- cmi.core.score.raw => 0
The user is confused (me too!) about how they get a 'zero' and a certificate.
So - what is actually happening under the hood here... and more importantly, how do I set this so the score is reported as well as the status?
Just by way of update - the scorm settings are also very relevant here. We have 'force completed' set to 'Yes', because we have found if we do not that a user can overwrite their earlier score in the scorm report.
This seems to be when there is a test included in the scorm, and a results page is shown. If the user scores 100 in the first attempt, but then goes back into the scorm object and scores a zero... AND visits the results page, this seems to trigger the object to overwrite the earlier data and Moodle displays the zero.
So the current thinking is that the certificate item (Simple Certificate) has a restriction to be unavailable until the scorm is showing as 'passed'... which of course on the first attempt it is. However, it doesn't appear to retract that access to the certificate if a revised score is recorded - i.e. a second attempt overwrites the first.
Therefore, Force New Attempt should be 'Yes' and this should prevent the overwriting.
However, in the particular course where this issue has arisen, Force New Attempt is already set to yes... most users complete perfectly well. One user has not... so we are a little puzzled!
Moodle only looks at the score.raw value when deciding on which grade to pass to the gradebook, so if your SCORM package doesn't set this value this will be why the grade is showing as 0.
There can be multiple objectives in a single SCORM package and each interaction can have it's own "grade" - we could implement some form of handling in the Moodle code to aggregate all objective scores into a raw score, but as I haven't seen a package like this before I'm not sure how useful that would actually be - ideally you would get whoever has authored this package to update it so that is passes a raw_score instead of using the objective score fields.
The other thing that sounds like is occurring is the user is entering the same attempt - instead of generating a new attempt on re-entry to the scorm - which is causing the score to be overwritten on re-entry to that same attempt. It sounds like you might need to have "force new attempt" set to "yes" - (force new attempt is not named well - it basically means if the "previous" attempt is complete, create a new attempt on re-entry instead of entering the same old attempt.)
There is some more info on how attempts vs entries work here:
hope that helps!
My best guess right now is to look at the user's actions and see if I can find out whether they re-entered the same 'attempt' by using the 'retake' option in the scorm. What confuses me a little here is that for the raw score to differ, Moodle must have received notification of completion at the end of the first attempt, which is what has 'released' the certificate and then the user reattempting the quiz (and perhaps not completing it) has re-written the raw score to zero, leaving the objectives score untouched. Incidentally, the 'Force New Attempt' was set to 'Yes'... however I think the scorm 'retake' option may not trigger a new attempt from Moodle's perspective if the user doesn't actually close the scorm window.
I'd like to understand the sequence of events when Moodle commits the scores and status to the database - if the scorm object was completed and passed, and that gets recorded (thus releasing the certificate access restriction), and the user then retakes the test in the scorm, Moodle only updates the raw score...? This would explain why the user is showing as 'completed' with '0' scored, and able to access the certificate.
The bigger question then is how to prevent this happening again ;)
Whenever the SCORM package passes a score.raw value or when the lesson_status is set to "completed" or "passed" it will run the update grades function in Moodle.
It might be interesting to add a "compatibility" setting that would prevent a grade to be "saved" when it is "0" which might prevent a lot of these packages which set the grade to 0 on re-entry from overwriting the grade.
Yes, that might well work. Would it need to take account of the grading method (highest grade, first grade, etc), or is it independent of that? In effect, if first grade is set as the grading method, and a user retakes the same test in scorm, and achieves a higher score on that retake, would that cause a different problem in Moodle i.e. the first attempt is low, the second attempt is higher... ? I guess not if it is limited to not saving if the score is zero on subsequent attempts - all other scoring attempts would be saved...
I would expect it to work independently. The only pain is that the grade function is also called on lessonstatus being set to complete/passed and that might also reset the raw score to 0 at the same time so you might need to bury the check a bit lower in scorm_update_grades instead of in the scorm_insert_track function.
So, if you build your package to prevent re-test in an individual attempt, the force new would be unnecessary. I don't know what you use to build scorms, but I know it is possible in Lectora and Captivate. Also, you might be able to adjust the value in Moodle by using variables. (basically, and on show modify variable X to = variable Y, very easy in Lectora, more complicated in Captivate)
Thanks Melanie - we use Composica for all authoring these days.
I will speak to the client who authored it - they do have a re-take option in there, but the force new attempt was already set to 'yes' (we usually set that as a default in the system). The thing that is bugging me here is that it is one or perhaps two users who see this behaviour, out of several hundred, if not thousands who don't. It leads me to believe the user has done something differently and Moodle has interpreted it appropriately, if not in the way we would perhaps desire.
Could you explain a little more on what you mean by 'adjust the value in Moodle using variables'? DO you mean use variables within the scorm authoring tool to trigger different result sets being submitted to Moodle?
I love hearing about new authoring software! That's not one I've seen before. That sounds interesting.
I looked at their help stuff on line--a quick look suggests your (relevant for this conversation) variables are Last global score (or total score in test variables--but generally I think most scorms overwrite something like last global score with total test score unless you force something else) and Last status. From what the docs say, you can likely force values. And yes, that's exactly what I mean. It basically tells the authoring tool to do something it isn't doing yet.
If all else fails, you could probably write some sort of script you could paste into your final page after publishing which would report completion. And by that...I mean opening the zip scorm file, finding the final page, looking at the page code, figuring out what it does and modifying it to do what you want. It can be done. I've done it (and my techie skills are dramatically inferior--I leave the heavy teching to real professionals). It isn't easy. It isn't fun (unless you like that sort of thing). But it will work (eventually). I'm not recommending this, just saying it is possible.
It looks like there is access to variables in your software in the More tab...but, with no practical knowledge, that's a guess.