Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit e460b8846da342c8ffc0c9bfd6733d31dbff5f7d 1 parent 2ef91b5
@tlock tlock authored stronk7 committed
Showing with 10 additions and 2 deletions.
  1. +10 −2 mod/imscp/locallib.php
View
12 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 <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;
}

0 comments on commit e460b88

Please sign in to comment.
Something went wrong with that request. Please try again.