Copy link to clipboard
Copied
Hi folks,
I got an error report from my LMS provider, that there´s an "NaN" but instead there should be an number. The content does not contain any quizzes, only a non-scored drag&drop. The settings should be either to "slide visits", counting e.g. 28 of 29 or 90%. The main problem: I did not create the captivate files, they are from a supplier ...
Is there anything I can do with the exported files? And if not, what do I have to tell my supplier to do?
Thanks in advance!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
This shouldn't be affecting completion or break the course in any way.
Is this SCORM 2004?
The only thing you could do is to edit the scormdriver.js to see where the NaN is coming from and fix it there.
Copy link to clipboard
Copied
Yes, it´s SCORM2004.
"see where the NaN is coming from and fix it there" --> What exactly do you mean? How can I find where the NaN is coming from? And how should a fix look like?
Copy link to clipboard
Copied
In the scormdriver.js, it uses a funtion RoundToPrecision for all of the vaules concerning the score.
So you would need to unminify the scormdriver.js here: https://beautifier.io/
Find the function that looks like this on line 660:
function RoundToPrecision(number, significantDigits) {
number = parseFloat(number);
return (Math.round(number * Math.pow(10, significantDigits)) / Math.pow(10, significantDigits))
}
and replace it with this:
function RoundToPrecision(number, significantDigits) {
number = parseFloat(number);
var getNum = (Math.round(number * Math.pow(10, significantDigits)) / Math.pow(10, significantDigits));
if ( isNaN.getNum )
{
return 0;
}
else
{
return getNum;
}
}