Permalink
Browse files

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

  • Loading branch information...
1 parent aa423bd commit 10be5e22f30b1e365735bbd64bc1f41afd4accc3 @tlock tlock committed with stronk7 Nov 23, 2011
Showing with 10 additions and 2 deletions.
  1. +10 −2 mod/imscp/locallib.php
View
@@ -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;
}

0 comments on commit 10be5e2

Please sign in to comment.