0

I have created a small course for a tester on our Blackboard(2010). I am using the pipwerks wrapper (we use 2004) and though my success and completion statuses are being successfully sent through to our blackboard, the score is not getting communicated (have tested on ScormCloud). I will post relevant code below. Any assistance would be greatly appreciated!

$(document).ready(function () {
        pipwerks.SCORM.data.set('cmi.score.min', '0');
        pipwerks.SCORM.data.set('cmi.score.max', '100');
    });

// Loads questions if there are any remaining
        if (questionNumber < shuffledQuestions.length) {
            generateAssessmentSlides();
        } else {
            var finalScore = yourScore / 100;
            nextSlide();
            $(".score").html(yourScore);

            // Sets assessment score
            pipwerks.SCORM.data.set("cmi.score.raw", '' + finalScore + '');

            // Sets assessment as completed
            pipwerks.SCORM.data.set("cmi.completion_status", "completed");

            // Saves status before results
            pipwerks.SCORM.data.save();

            // Shows pass/fail screen depending on the score and shares that data with the LMS

            if (finalScore >= passingScore) {
                pipwerks.SCORM.data.set("cmi.success_status", "passed");
                pipwerks.SCORM.data.save();

            } else {
                pipwerks.SCORM.data.set("cmi.success_status", "failed");
                pipwerks.SCORM.data.save();

            }
        }
    });
}
  • In SCORM Cloud, when you look at the Debug Logs for your launch, do you see a SetValue line where the value for cmi.score.raw is being set? – patmortech Nov 07 '18 at 21:11
  • Also, with SCORM 2004, you will typically report min, max, raw, and scaled values. Based on your calculations above, I believe you want 'raw' to be the 'yourScore' value, and 'scaled' to be the 'finalScore' value (since you're dividing by 100). – patmortech Nov 07 '18 at 21:13
  • The only one I see is : 'SetValue('cmi.score.raw', '0.2') returned 'true' in 0 seconds'. I actually only divided by 100 as it seemed I should based upon some things I had read. I'd gladly remove that line if it will work the same. – Jonathan Sloan Nov 07 '18 at 21:25
  • So, that line in the debug log shows that your raw score did get recorded. My guess is that it may get rounded down to 0 in the LMS or it may be looking for the scaled value. I think if it was me, I would go ahead and just record all 4 data points in your code together: cmi.score.min (0), cmi.score.max (100), cmi.score.raw (your 'yourScore'), and cmi.score.scaled (your 'finalScore'). – patmortech Nov 08 '18 at 01:19
  • I'll post it as an answer. Thanks. – patmortech Nov 08 '18 at 19:43

1 Answers1

0

When recording a score for SCORM 2004, you typically will include four data points: the min, max, raw score, and the scaled score (calculated by raw / (max - min)). Based on your code above, you'd want to make calls like the following:

pipwerks.SCORM.data.set('cmi.score.min', '0');
pipwerks.SCORM.data.set('cmi.score.max', '100');
pipwerks.SCORM.data.set("cmi.score.scaled", '' + yourScore + '');
pipwerks.SCORM.data.set("cmi.score.scaled", '' + finalScore + '');

In your Debug logs we saw that the raw score was actually being reported to the LMS, but it's possible it was rounding the value down to zero due to the fact you were using the scaled score (0.2) for the raw score value (should have been 20).

patmortech
  • 10,139
  • 5
  • 38
  • 50