--- loncom/interface/londocs.pm 2005/07/26 16:41:43 1.198
+++ loncom/interface/londocs.pm 2005/07/26 22:30:20 1.199
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.198 2005/07/26 16:41:43 raeburn Exp $
+# $Id: londocs.pm,v 1.199 2005/07/26 22:30:20 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -490,10 +490,21 @@ sub create_ims_store {
' identifier="MANIFEST-'.$env{'request.course.id'}.'-'.$now.'"'.
' xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1imscp_v1p1.xsd'.
' http://www.imsglobal.org/xsd/imsmd_v1p2 imsmd_v1p2p2.xsd">'."\n".
+'
+
+
+
+ '.$env{'request.course.id'}.'
+
+ '.$env{'course.'.$env{'request.course.id'}.'.description'}.'
+
+
+
+ '."\n".
' '."\n".
' '."\n".
-' '.$env{'request.'.$env{'request.course.id'}.'.description'}.''
+' '.$env{'course.'.$env{'request.course.id'}.'.description'}.''
} else {
$$outcome .= 'An error occurred opening the IMS manifest file.
'
;
@@ -541,7 +552,6 @@ sub build_package {
$count = 0;
my $imsresources;
my $pkgdepth;
- my $included = 0;
while ($curRes = $it->next()) {
if ($curRes == $it->BEGIN_MAP()) {
$prevdepth = $depth;
@@ -564,10 +574,13 @@ sub build_package {
unless ($curRes->is_sequence()) {
$resourceref = 'identifierref="RES-'.$env{'request.course.id'}.'-'.$count.'"';
}
- if (($depth <= $prevdepth) && ($count > 1) && ($included)) {
- print $ims_manifest "\n".' '."\n";
+ my $step = $prevdepth - $depth;
+ if (($step >= 0) && ($count > 1)) {
+ while ($step >= 0) {
+ print $ims_manifest "\n".' '."\n";
+ $step --;
+ }
}
- $included = 1;
$prevdepth = $depth;
my $itementry =
@@ -609,8 +622,6 @@ sub build_package {
}
}
$pkgdepth = $depth;
- } else {
- $included = 0;
}
}
}