コード例 #1
0
ファイル: doExport.php プロジェクト: eguicciardi/ada
     if (isset($XMLElementForCourse)) {
         $XMLcourse->appendChild($XMLElementForCourse);
         unset($XMLElementForCourse);
     }
 }
 // ok, course model datas are all set
 // now get all the requested nodes for the current course
 // if passed list of nodes to be exported is empty, export the whole course!
 if (!is_array($nodeList) || is_array($nodeList) && empty($nodeList)) {
     $nodeList = array($course_id . exportHelper::$courseSeparator . $course_data['id_nodo_iniziale']);
 }
 $XMLAllNodes = $domtree->createElement("nodi");
 $XMLNodeChildren = array();
 // loop the nodes to be exported
 foreach ($nodeList as &$aNodeId) {
     $XMLNodeChildren[] = $exportHelper->exportCourseNodeChildren($course_id, $aNodeId, $domtree, $dh, true);
 }
 // now add all the children to the all nodes element, this array
 // is kept for possible future uses!
 foreach ($XMLNodeChildren as &$XMLNodeChild) {
     $XMLAllNodes->appendChild($XMLNodeChild);
 }
 unset($XMLNodeChildren);
 // at least XMLAllNodes should be always set, anyway...
 if (isset($XMLAllNodes)) {
     $XMLcourse->appendChild($XMLAllNodes);
 }
 unset($XMLAllNodes);
 // tests and surveys are objects related to the course, not to the node
 // so this is out of the nodes loop
 if (MODULES_TEST) {