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

Help with NaN Error! [Cap2019]

Explorer ,
May 19, 2022 May 19, 2022

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!

TOPICS
Editing , Quizzing and LMS

Views

41

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

nan_error.png

Likes

Translate

Translate

Report

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
Community Expert ,
May 19, 2022 May 19, 2022

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.

Likes

Translate

Translate

Report

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

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?

Likes

Translate

Translate

Report

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
Community Expert ,
May 19, 2022 May 19, 2022

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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