Skip to content
Browse files

MDL-32507 SCORM fix some strict standard errors

  • Loading branch information...
1 parent e16e230 commit 37ca1722cdfd4d835eab32f0e1977fd943b40e90 @danmarsden danmarsden committed May 8, 2012
Showing with 5 additions and 1 deletion.
  1. +2 −0 mod/scorm/datamodels/scormlib.php
  2. +2 −1 mod/scorm/locallib.php
  3. +1 −0 mod/scorm/player.php
View
2 mod/scorm/datamodels/scormlib.php
@@ -90,6 +90,7 @@ function scorm_get_manifest($blocks, $scoes) {
case 'ORGANIZATION':
$identifier = $block['attrs']['IDENTIFIER'];
$organization = '';
+ $scoes->elements[$manifest][$organization][$identifier] = new stdClass();
$scoes->elements[$manifest][$organization][$identifier]->identifier = $identifier;
$scoes->elements[$manifest][$organization][$identifier]->parent = '/';
$scoes->elements[$manifest][$organization][$identifier]->launch = '';
@@ -113,6 +114,7 @@ function scorm_get_manifest($blocks, $scoes) {
array_push($parents, $parent);
$identifier = $block['attrs']['IDENTIFIER'];
+ $scoes->elements[$manifest][$organization][$identifier] = new stdClass();
$scoes->elements[$manifest][$organization][$identifier]->identifier = $identifier;
$scoes->elements[$manifest][$organization][$identifier]->parent = $parent->identifier;
if (!isset($block['attrs']['ISVISIBLE'])) {
View
3 mod/scorm/locallib.php
@@ -410,6 +410,7 @@ function scorm_insert_track($userid, $scormid, $scoid, $attempt, $element, $valu
$id = $track->id;
}
} else {
+ $track = new stdClass();
$track->userid = $userid;
$track->scormid = $scormid;
$track->scoid = $scoid;
@@ -534,7 +535,7 @@ function scorm_get_user_data($userid) {
function scorm_grade_user_attempt($scorm, $userid, $attempt=1) {
global $DB;
- $attemptscore = null;
+ $attemptscore = new stdClass();
$attemptscore->scoes = 0;
$attemptscore->values = 0;
$attemptscore->max = 0;
View
1 mod/scorm/player.php
@@ -164,6 +164,7 @@
}
$orgstr = '&currentorg='.$currentorg;
+$SESSION->scorm = new stdClass();
$SESSION->scorm->scoid = $sco->id;
$SESSION->scorm->scormstatus = 'Not Initialized';
$SESSION->scorm->scormmode = $mode;

0 comments on commit 37ca172

Please sign in to comment.
Something went wrong with that request. Please try again.