Skip to content

Commit

Permalink
MDL-36017 IMS-CC export does not filter result by numsections because…
Browse files Browse the repository at this point in the history
… it is now optional
  • Loading branch information
marinaglancy committed Nov 2, 2012
1 parent 0e984d9 commit 8bc3453
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions backup/cc/cc_lib/cc_convert_moodle2.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ public static function convert($packagedir, $outdir) {
$coursef = new XMLGenericDocument();
$course_file = $dir . DIRECTORY_SEPARATOR .'course' . DIRECTORY_SEPARATOR . 'course.xml';
$coursef->load($course_file);
$numsections = (int)$coursef->nodeValue('/course/numsections');
//$numsections = (int)$coursef->nodeValue('/course/numsections');
// TODO MDL-35781, this is commented because numsections is now optional attribute
$section_list = $docp->nodeList('/moodle_backup/information/contents/sections/section');
if (!empty($section_list)) {
$count = 0;
foreach ($section_list as $node) {
if ($count > $numsections) {
break;
}
//if ($count > $numsections) {
// break;
//}
$sectionid = $docp->nodeValue('sectionid', $node);
$sectiontitle = $docp->nodeValue('title' , $node);
$sectionpath = $docp->nodeValue('directory', $node);
Expand Down

0 comments on commit 8bc3453

Please sign in to comment.