Diff for /loncom/interface/londocs.pm between versions 1.198 and 1.199

version 1.198, 2005/07/26 16:41:43 version 1.199, 2005/07/26 22:30:20
Line 490  sub create_ims_store { Line 490  sub create_ims_store {
 ' identifier="MANIFEST-'.$env{'request.course.id'}.'-'.$now.'"'.  ' identifier="MANIFEST-'.$env{'request.course.id'}.'-'.$now.'"'.
 '  xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1imscp_v1p1.xsd'.  '  xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1imscp_v1p1.xsd'.
 '  http://www.imsglobal.org/xsd/imsmd_v1p2 imsmd_v1p2p2.xsd">'."\n".  '  http://www.imsglobal.org/xsd/imsmd_v1p2 imsmd_v1p2p2.xsd">'."\n".
   '  <metadata>
       <schema></schema>
       <imsmd:lom>
         <imsmd:general>
           <imsmd:identifier>'.$env{'request.course.id'}.'</imsmd:identifier>
           <imsmd:title>
             <imsmd:langstring xml:lang="en">'.$env{'course.'.$env{'request.course.id'}.'.description'}.'</imsmd:langstring>
           </imsmd:title>
         </imsmd:general>
       </imsmd:lom>
     </metadata>'."\n".
 '  <organizations default="ORG-'.$env{'request.course.id'}.'-'.$now.'">'."\n".  '  <organizations default="ORG-'.$env{'request.course.id'}.'-'.$now.'">'."\n".
 '    <organization identifier="ORG-'.$env{'request.course.id'}.'-'.$now.'"'.  '    <organization identifier="ORG-'.$env{'request.course.id'}.'-'.$now.'"'.
 ' structure="hierarchical">'."\n".  ' structure="hierarchical">'."\n".
 '      <title>'.$env{'request.'.$env{'request.course.id'}.'.description'}.'</title>'  '      <title>'.$env{'course.'.$env{'request.course.id'}.'.description'}.'</title>'
     } else {      } else {
         $$outcome .= 'An error occurred opening the IMS manifest file.<br />'          $$outcome .= 'An error occurred opening the IMS manifest file.<br />'
 ;  ;
Line 541  sub build_package { Line 552  sub build_package {
     $count = 0;      $count = 0;
     my $imsresources;      my $imsresources;
     my $pkgdepth;      my $pkgdepth;
     my $included = 0;  
     while ($curRes = $it->next()) {      while ($curRes = $it->next()) {
         if ($curRes == $it->BEGIN_MAP()) {          if ($curRes == $it->BEGIN_MAP()) {
             $prevdepth = $depth;              $prevdepth = $depth;
Line 564  sub build_package { Line 574  sub build_package {
                 unless ($curRes->is_sequence()) {                  unless ($curRes->is_sequence()) {
                     $resourceref = 'identifierref="RES-'.$env{'request.course.id'}.'-'.$count.'"';                      $resourceref = 'identifierref="RES-'.$env{'request.course.id'}.'-'.$count.'"';
                 }                  }
                 if (($depth <= $prevdepth) && ($count > 1) && ($included)) {                  my $step = $prevdepth - $depth;
                     print $ims_manifest "\n".'  </item>'."\n";                  if (($step >= 0) && ($count > 1)) {
                       while ($step >= 0) {
                           print $ims_manifest "\n".'  </item>'."\n";
                           $step --;
                       }
                 }                  }
                 $included = 1;  
                 $prevdepth = $depth;                  $prevdepth = $depth;
   
                 my $itementry =                  my $itementry =
Line 609  sub build_package { Line 622  sub build_package {
                     }                      }
                 }                  }
                 $pkgdepth = $depth;                  $pkgdepth = $depth;
             } else {  
                 $included = 0;  
             }              }
         }          }
     }      }

Removed from v.1.198  
changed lines
  Added in v.1.199


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>