mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
SCORM MDL-24735 fix some php warnings.
This commit is contained in:
parent
5ecfec6d7c
commit
36149cf064
@ -48,7 +48,7 @@ function scorm_get_manifest($blocks,$scoes) {
|
|||||||
$resources = array();
|
$resources = array();
|
||||||
$resources = scorm_get_resources($block['children']);
|
$resources = scorm_get_resources($block['children']);
|
||||||
$scoes = scorm_get_manifest($block['children'],$scoes);
|
$scoes = scorm_get_manifest($block['children'],$scoes);
|
||||||
if (count($scoes->elements) <= 0) {
|
if (empty($scoes->elements) || count($scoes->elements) <= 0) {
|
||||||
foreach ($resources as $item => $resource) {
|
foreach ($resources as $item => $resource) {
|
||||||
if (!empty($resource['HREF'])) {
|
if (!empty($resource['HREF'])) {
|
||||||
$sco = new stdClass();
|
$sco = new stdClass();
|
||||||
@ -66,7 +66,9 @@ function scorm_get_manifest($blocks,$scoes) {
|
|||||||
if (!isset($scoes->defaultorg) && isset($block['attrs']['DEFAULT'])) {
|
if (!isset($scoes->defaultorg) && isset($block['attrs']['DEFAULT'])) {
|
||||||
$scoes->defaultorg = $block['attrs']['DEFAULT'];
|
$scoes->defaultorg = $block['attrs']['DEFAULT'];
|
||||||
}
|
}
|
||||||
$scoes = scorm_get_manifest($block['children'],$scoes);
|
if (!empty($block['children'])) {
|
||||||
|
$scoes = scorm_get_manifest($block['children'],$scoes);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'ORGANIZATION':
|
case 'ORGANIZATION':
|
||||||
$identifier = $block['attrs']['IDENTIFIER'];
|
$identifier = $block['attrs']['IDENTIFIER'];
|
||||||
@ -83,7 +85,9 @@ function scorm_get_manifest($blocks,$scoes) {
|
|||||||
array_push($parents, $parent);
|
array_push($parents, $parent);
|
||||||
$organization = $identifier;
|
$organization = $identifier;
|
||||||
|
|
||||||
$scoes = scorm_get_manifest($block['children'],$scoes);
|
if (!empty($block['children'])) {
|
||||||
|
$scoes = scorm_get_manifest($block['children'],$scoes);
|
||||||
|
}
|
||||||
|
|
||||||
array_pop($parents);
|
array_pop($parents);
|
||||||
break;
|
break;
|
||||||
@ -123,7 +127,9 @@ function scorm_get_manifest($blocks,$scoes) {
|
|||||||
$parent->organization = $organization;
|
$parent->organization = $organization;
|
||||||
array_push($parents, $parent);
|
array_push($parents, $parent);
|
||||||
|
|
||||||
$scoes = scorm_get_manifest($block['children'],$scoes);
|
if (!empty($block['children'])) {
|
||||||
|
$scoes = scorm_get_manifest($block['children'],$scoes);
|
||||||
|
}
|
||||||
|
|
||||||
array_pop($parents);
|
array_pop($parents);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user