mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-32507 SCORM fix some strict standard errors
This commit is contained in:
parent
e16e2300c5
commit
37ca1722cd
@ -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'])) {
|
||||
|
@ -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;
|
||||
|
@ -164,6 +164,7 @@ if ($mode == 'browse') {
|
||||
}
|
||||
$orgstr = '¤torg='.$currentorg;
|
||||
|
||||
$SESSION->scorm = new stdClass();
|
||||
$SESSION->scorm->scoid = $sco->id;
|
||||
$SESSION->scorm->scormstatus = 'Not Initialized';
|
||||
$SESSION->scorm->scormmode = $mode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user