MDL-30419: IMS package content missing when using Blackboard packages

This commit is contained in:
Tim Lock 2011-11-23 12:50:55 +10:30 committed by Eloy Lafuente (stronk7)
parent b2b9890d08
commit cb140ca0d6

View file

@ -153,9 +153,17 @@ function imscp_parse_manifestfile($manifestfilecontents) {
$xmlbase = '';
}
if (!$href = $res->attributes->getNamedItem('href')) {
continue;
// If href not found look for <file href="help.htm"/>
$fileresources = $res->getElementsByTagName('file');
foreach ($fileresources as $file) {
$href = $file->getAttribute('href');
}
if (empty($href)) {
continue;
}
} else {
$href = $href->nodeValue;
}
$href = $href->nodeValue;
if (strpos($href, 'http://') !== 0) {
$href = $xmlbase.$href;
}