diff --git a/mod/imscp/locallib.php b/mod/imscp/locallib.php index 6936d4d4edc..6eb6ebb9650 100644 --- a/mod/imscp/locallib.php +++ b/mod/imscp/locallib.php @@ -153,9 +153,17 @@ function imscp_parse_manifestfile($manifestfilecontents) { $xmlbase = ''; } if (!$href = $res->attributes->getNamedItem('href')) { - continue; + // If href not found look for + $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; }