diff --git a/mod/imscp/locallib.php b/mod/imscp/locallib.php index 522cc545bb1..938e283dfa6 100644 --- a/mod/imscp/locallib.php +++ b/mod/imscp/locallib.php @@ -139,9 +139,17 @@ function imscp_parse_structure($imscp, $context) { $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; }