From 8bc345339a7a2ecc003199f4e1ea4405d5a32b72 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 16 Oct 2012 13:50:42 +0800 Subject: [PATCH] MDL-36017 IMS-CC export does not filter result by numsections because it is now optional --- backup/cc/cc_lib/cc_convert_moodle2.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backup/cc/cc_lib/cc_convert_moodle2.php b/backup/cc/cc_lib/cc_convert_moodle2.php index 5f6d9e4be1e..56002a07a5a 100644 --- a/backup/cc/cc_lib/cc_convert_moodle2.php +++ b/backup/cc/cc_lib/cc_convert_moodle2.php @@ -83,14 +83,15 @@ abstract class cc_convert_moodle2 { $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);