MDL-32507 SCORM fix some strict standard errors

This commit is contained in:
Dan Marsden 2012-05-08 08:59:54 +12:00
parent e16e2300c5
commit 37ca1722cd
3 changed files with 5 additions and 1 deletions

View File

@ -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 File

@ -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 File

@ -164,6 +164,7 @@ if ($mode == 'browse') {
}
$orgstr = '&currentorg='.$currentorg;
$SESSION->scorm = new stdClass();
$SESSION->scorm->scoid = $sco->id;
$SESSION->scorm->scormstatus = 'Not Initialized';
$SESSION->scorm->scormmode = $mode;