SCORM Package - undefined offset error

SCORM Package - undefined offset error

by Luke Baker -
Number of replies: 13

Environment:
Moodle 2.5.2+
SCORM 1.2
Authoring-Software: Articulate Studio

Error:
Some SCORM-Packages don't start from one day to the next. Please find attached the Screenshot.
We haven't changed any server or activities settings.

previous attempts to solve this issue:

  1. Imported package in other course with and without user data
  2. cleared moodle cache

Does anybody have tipps or hints concerning this error?


Best regards,
Luke

Attachment 000527-https___elearning.hartlauer.at_mod_scorm_player.php.png
Average of ratings: -
In reply to Luke Baker

Re: SCORM Package - undefined offset error

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Moodle 2.5.2 is quite an old release and contains a number of known issues related to SCORM. The 2.5 branch itself is no longer supported either.

You should upgrade to a more recent stable supported release.

In reply to Dan Marsden

Re: SCORM Package - undefined offset error

by Scott Karren -

Luke and Dan,

I am using Moodle 2.6.6+ and am experiencing the same errors. This started happening after we upgraded our Articulate software to Update 5.  Luke, what version of Studio are you using?

Scott

In reply to Scott Karren

Re: SCORM Package - undefined offset error

by Luke Baker -

@Dan:
We are preparing the update smile, but unfurtunatly it always takes some time.

@Scott:
Thanks, for your tip. I had articulate studio version 6.3.

After your hint i updated with  articulate studio update 10.

First Module:
I published the learning module once again and updated it in moodle - now it works.

Second Module:
I published the module once again and updated it in moodle - quiz started, but now i saw only the loading icon. I think the quiz project is broken, because the error also happend if i started the quiz local on my pc. Then i updated the quiz with the previous version - and now this module is also running fine.






In reply to Luke Baker

Re: SCORM Package - undefined offset error

by Scott Karren -

Hmmm... This is interesting.  We are using Articulate Studio 13 update 5 and I didn't start seeing these errors until after I updated Articulate. 

What you are saying is that you were experiencing these errors before you updated (since you say you updated to update 10 I am assuming you are using Articulate Studio 09) but the errors disappeared after you updated, is that correct?

Scott

In reply to Scott Karren

Re: SCORM Package - undefined offset error

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Scott,
you could share here only the imsmanifest.xml file to understand why Moodle considers it bad enough to break on launching the player.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: SCORM Package - undefined offset error

by Scott Karren -

Matteo,

That's the funny thing, the file appears to run just fine.  I have attached the manifest file and below are the php errors that I get.

[22-Jan-2015 17:47:27 America/Denver] PHP Notice:  Undefined offset: 0 in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1557
[22-Jan-2015 17:47:27 America/Denver] PHP Warning:  Invalid argument supplied for foreach() in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1557
[22-Jan-2015 17:47:27 America/Denver] PHP Notice:  Undefined offset: 0 in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1584
[22-Jan-2015 17:47:27 America/Denver] PHP Warning:  array_keys() expects parameter 1 to be array, null given in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1584
[22-Jan-2015 17:47:27 America/Denver] PHP Notice:  Undefined offset: 0 in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1585
[22-Jan-2015 17:47:27 America/Denver] PHP Notice:  Undefined variable: usertracks in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1509
[22-Jan-2015 17:47:27 America/Denver] PHP Notice:  Trying to get property of non-object in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1789
[22-Jan-2015 17:47:28 America/Denver] PHP Notice:  Undefined offset: 0 in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1557
[22-Jan-2015 17:47:28 America/Denver] PHP Warning:  Invalid argument supplied for foreach() in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1557
[22-Jan-2015 17:47:28 America/Denver] PHP Notice:  Undefined offset: 0 in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1584
[22-Jan-2015 17:47:28 America/Denver] PHP Warning:  array_keys() expects parameter 1 to be array, null given in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1584
[22-Jan-2015 17:47:28 America/Denver] PHP Notice:  Undefined offset: 0 in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1585
[22-Jan-2015 17:47:28 America/Denver] PHP Notice:  Undefined variable: usertracks in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1509
[22-Jan-2015 17:47:28 America/Denver] PHP Notice:  Trying to get property of non-object in C:\WWWstage\WWW\mod\scorm\locallib.php on line 1789

Thanks for your help on this.

Scott

In reply to Scott Karren

Re: SCORM Package - undefined offset error

by Luke Baker -

Hi Scott,

we are using Articulate Studio 09 and the errors dissapeared after the update to Studio 09 Update 10.

Unfortunately, this issue is already closed:
https://tracker.moodle.org/browse/MDL-43517

Before i solved the error, i also noticed that the supposed broken scorm package is working fine, if i created the activity once again new. But in my case i didn't want to loose the tracking data and so an update of the scorm package was the only acceptable solution for me.



Luke

In reply to Dan Marsden

Re: SCORM Package - undefined offset error

by Azmat Ullah -
Hi Dan,

I've upgraded Moodle 2.6 to 2.8 and I'm also getting same error only on one scorm package.

Regards,
Azmat
In reply to Azmat Ullah

Re: SCORM Package - undefined offset error

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Hi Azmat, 

can you please provide more information? - usually the full error string will mention line numbers and other related information.

In reply to Dan Marsden

Re: SCORM Package - undefined offset error

by Doug Swenson -

Dan,

You asked Azmat for the error log - below is mine. Can you assist in this matter? We have 21 SCORM modules that are loaded and all work after upgrading from 2.6 to 2.8 except 1. I have republished the module and get the same results. I have compared the manifest files to the working ones and see nothing different that is not related to the module name or files specific to that module.

Doug

[14-Apr-2015 07:17:55 America/Denver] PHP Notice:  Undefined offset: 0 in /home/*****/public_html/mod/scorm/locallib.php on line 1608
[14-Apr-2015 07:17:55 America/Denver] PHP Warning:  Invalid argument supplied for foreach() in /home/*****/public_html/mod/scorm/locallib.php on line 1608
[14-Apr-2015 07:17:55 America/Denver] PHP Notice:  Undefined offset: 0 in /home/*****/public_html/mod/scorm/locallib.php on line 1635
[14-Apr-2015 07:17:55 America/Denver] PHP Warning:  array_keys() expects parameter 1 to be array, null given in /home/*****/public_html/mod/scorm/locallib.php on line 1635
[14-Apr-2015 07:17:55 America/Denver] PHP Notice:  Undefined offset: 0 in /home/*****/public_html/mod/scorm/locallib.php on line 1636
[14-Apr-2015 07:17:55 America/Denver] PHP Notice:  Undefined variable: usertracks in /home/*****/public_html/mod/scorm/locallib.php on line 1560
[14-Apr-2015 07:17:55 America/Denver] PHP Notice:  Trying to get property of non-object in /home/*****/public_html/mod/scorm/locallib.php on line 1844
[14-Apr-2015 07:17:55 America/Denver] PHP Notice:  Undefined offset: 0 in /home/*****/public_html/mod/scorm/locallib.php on line 1608
[14-Apr-2015 07:17:55 America/Denver] PHP Warning:  Invalid argument supplied for foreach() in /home/*****/public_html/mod/scorm/locallib.php on line 1608
[14-Apr-2015 07:17:55 America/Denver] PHP Notice:  Undefined offset: 0 in /home/*****/public_html/mod/scorm/locallib.php on line 1635
[14-Apr-2015 07:17:55 America/Denver] PHP Warning:  array_keys() expects parameter 1 to be array, null given in /home/*****/public_html/mod/scorm/locallib.php on line 1635
[14-Apr-2015 07:17:55 America/Denver] PHP Notice:  Undefined offset: 0 in /home/*****/public_html/mod/scorm/locallib.php on line 1636
[14-Apr-2015 07:17:55 America/Denver] PHP Notice:  Undefined variable: usertracks in /home/*****/public_html/mod/scorm/locallib.php on line 1560
[14-Apr-2015 07:17:55 America/Denver] PHP Warning:  Invalid argument supplied for foreach() in /home/*****/public_html/mod/scorm/locallib.php on line 1950

In reply to Azmat Ullah

Re: SCORM Package - undefined offset error

by Doug Swenson -

Azmat,

I am having this issue as well. Republish did not solve the issue. Did you find a solution?

Doug

In reply to Doug Swenson

Re: SCORM Package - undefined offset error

by Doug Swenson -

We have resolved this issue. Not sure why the difference in 2.5 and 2.8, but our issue was the manifest contained an "&" that was stopping the manifest from ever loading all the way. Once we edited the mdl_scorm_scoes table entries to remove the "&" everything worked again.

Warning: if you update your imsmanifest.xml file and update the Scorm activity it will erase all past data. This is why I recommend editing the database directly.

Hope this helps.

Doug

Average of ratings: Useful (1)
In reply to Luke Baker

Re: SCORM Package - undefined offset error

by Alexander Mamonov -

Have the same problem now

Package scorm build in Websoft CourceLab 2.7

Scorm 1.2 

Created fresh moodle 2.9 without any modifications

Notice: Undefined offset: 0 in /home/......../moodle/mod/scorm/locallib.php on line 1625

Warning: Invalid argument supplied for foreach() in /home/......../moodle/mod/scorm/locallib.php on line 1625
Notice: Undefined offset: 0 in /home/......../moodle/mod/scorm/locallib.php on line 1652
Warning: array_keys() expects parameter 1 to be array, null given in /home/......../moodle/mod/scorm/locallib.php on line 1652
Notice: Undefined offset: 0 in /home/......../moodle/mod/scorm/locallib.php on line 1653
Notice: Undefined variable: usertracks in /home/......../moodle/mod/scorm/locallib.php on line 1573
Notice: Trying to get property of non-object in /home/......../moodle/mod/scorm/locallib.php on line 1861

----------------------------------------------------------------------------------

Code from moodle/mod/scorm/locallib.php on line 1625:

for ($i = 0; $i <= $level; $i++) {
$prevparent = '';
foreach ($final[$i] as $ident => $sco) { //line 1625
if (empty($prevparent)) {
$prevparent = $ident;
}
if (!isset($final[$i][$prevparent]->children)) {
$final[$i][$prevparent]->children = array();
}
if ($sco->parent == $prevparent) {
$final[$i][$prevparent]->children[] = $sco;
$prevparent = $ident;
} else {
$parent = false;
foreach ($final[$i] as $identifier => $scoobj) {
if ($identifier == $sco->parent) {
$parent = $identifier;
}
}

if ($parent !== false) {
$final[$i][$parent]->children[] = $sco;
}
}
}
}


Maybe some probles with hosting?

Enclose packet: https://drive.google.com/open?id=0B4a8NPpfyUnNUUtXcnlEcmZUOGc


Please help