mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Make some extra chacks because there were some problems
with invalid manifests and PHP5.
This commit is contained in:
parent
194594871f
commit
4cce92bdb4
1 changed files with 9 additions and 0 deletions
|
@ -215,6 +215,9 @@
|
||||||
if ($CFG->debug) print_object('default_organization: '.$default_organization);
|
if ($CFG->debug) print_object('default_organization: '.$default_organization);
|
||||||
|
|
||||||
/// Iterate (reverse) over organizations until we find the default one
|
/// Iterate (reverse) over organizations until we find the default one
|
||||||
|
if (empty($data['#']['organization'])) { /// Verify <organization> exists
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$count_organizations = count($data['#']['organization']);
|
$count_organizations = count($data['#']['organization']);
|
||||||
if ($CFG->debug) print_object('count_organizations: '.$count_organizations);
|
if ($CFG->debug) print_object('count_organizations: '.$count_organizations);
|
||||||
|
|
||||||
|
@ -236,6 +239,9 @@
|
||||||
|
|
||||||
/// Extract items map from organization
|
/// Extract items map from organization
|
||||||
$items = $organization['#']['item'];
|
$items = $organization['#']['item'];
|
||||||
|
if (empty($data['#']['item'])) { /// Verify <item> exists
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!$itemmap = ims_process_items($items)) {
|
if (!$itemmap = ims_process_items($items)) {
|
||||||
return false; //Error, no items found
|
return false; //Error, no items found
|
||||||
}
|
}
|
||||||
|
@ -302,6 +308,9 @@
|
||||||
|
|
||||||
$resources = array();
|
$resources = array();
|
||||||
|
|
||||||
|
if (empty($data)) { /// Verify <resource> exists
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$count_resources = count($data);
|
$count_resources = count($data);
|
||||||
if ($CFG->debug) print_object('count_resources: '.$count_resources);
|
if ($CFG->debug) print_object('count_resources: '.$count_resources);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue