Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help with NaN Error! [Cap2019]

Explorer ,
May 19, 2022 May 19, 2022

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!

TOPICS
Editing , Quizzing and LMS
824
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 19, 2022 May 19, 2022

nan_error.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
May 19, 2022 May 19, 2022

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 19, 2022 May 19, 2022

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
May 19, 2022 May 19, 2022
LATEST

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;
}
}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources