38 include_once
"./classes/class.ilXmlWriter.php";
62 $this->EXPORT_VERSION =
"2";
73 if ($this->attach_users)
84 #$this->__buildObject($this->course_obj->getRefId());
91 #var_dump("<pre>", htmlentities($this->xmlDumpMem()),"<pre>");
98 if ($a_tag ==
"Identifier" && $a_param ==
"Entry")
100 $a_value =
"il_".$this->ilias->getSetting(
'inst_id').
"_crs_".$this->course_obj->getId();
109 $this->
xmlSetDtdDef(
"<!DOCTYPE Course PUBLIC \"-//ILIAS//DTD Course//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_course_3_9.dtd\">");
110 $this->
xmlSetGenCmt(
"Export of ILIAS course ". $this->course_obj->getId().
" of installation ".$this->ilias->getSetting(
'inst_id').
".");
113 $attrs[
"exportVersion"] = $this->EXPORT_VERSION;
114 $attrs[
"id"] =
"il_".$this->ilias->getSetting(
'inst_id').
'_crs_'.$this->course_obj->getId();
115 #$attrs['showMembers'] = ($this->course_obj->getShowMembers() ? 'Yes' : 'No');
122 include_once
'Services/MetaData/classes/class.ilMD2XML.php';
124 $md2xml =
new ilMD2XML($this->course_obj->getId(),$this->course_obj->getId(),
'crs');
139 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
145 $this->course_obj->initCourseMemberObject();
147 foreach($this->course_obj->members_obj->getAdmins() as $id)
149 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
150 $attr[
'notification'] = ($this->course_obj->members_obj->isNotificationEnabled($id)) ?
'Yes' :
'No';
151 $attr[
'passed'] = $this->course_obj->members_obj->hasPassed($id) ?
'Yes' :
'No';
161 $this->course_obj->initCourseMemberObject();
163 foreach($this->course_obj->members_obj->getTutors() as $id)
165 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
166 $attr[
'notification'] = ($this->course_obj->members_obj->isNotificationEnabled($id)) ?
'Yes' :
'No';
167 $attr[
'passed'] = $this->course_obj->members_obj->hasPassed($id) ?
'Yes' :
'No';
176 $this->course_obj->initCourseMemberObject();
178 foreach($this->course_obj->members_obj->getMembers() as $id)
180 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
181 $attr[
'blocked'] = ($this->course_obj->members_obj->isBlocked($id)) ?
'Yes' :
'No';
182 $attr[
'passed'] = $this->course_obj->members_obj->hasPassed($id) ?
'Yes' :
'No';
192 $this->course_obj->initCourseMemberObject();
194 foreach($this->course_obj->members_obj->getSubscribers() as $id)
196 $data = $this->course_obj->members_obj->getSubscriberData($id);
198 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
199 $attr[
'subscriptionTime'] =
$data[
'time'];
209 include_once
'Modules/Course/classes/class.ilCourseWaitingList.php';
213 foreach($waiting_list->getAllUsers() as
$data)
215 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.
$data[
'usr_id'];
216 $attr[
'position'] =
$data[
'position'];
217 $attr[
'subscriptionTime'] =
$data[
'time'];
232 if($this->course_obj->getOfflineStatus())
236 elseif($this->course_obj->getActivationUnlimitedStatus())
243 $this->
xmlElement(
'Start',null,$this->course_obj->getActivationStart());
244 $this->
xmlElement(
'End',null,$this->course_obj->getActivationEnd());
245 $this->
xmlEndTag(
'TemporarilyAvailable');
250 $this->
xmlElement(
'Syllabus',null,$this->course_obj->getSyllabus());
251 $this->
xmlElement(
'ImportantInformation',null,$this->course_obj->getImportantInformation());
256 $this->
xmlElement(
'Name',null,$this->course_obj->getContactName());
257 $this->
xmlElement(
'Responsibility',null,$this->course_obj->getContactResponsibility());
258 $this->
xmlElement(
'Phone',null,$this->course_obj->getContactPhone());
259 $this->
xmlElement(
'Email',null,$this->course_obj->getContactEmail());
260 $this->
xmlElement(
'Consultation',null,$this->course_obj->getContactConsultation());
268 $attr[
'registrationType'] =
'Confirmation';
272 $attr[
'registrationType'] =
'Direct';
276 $attr[
'registrationType'] =
'Password';
279 $attr[
'maxMembers'] = $this->course_obj->getSubscriptionMaxMembers();
280 $attr[
'notification'] = $this->course_obj->getSubscriptionNotify() ?
'Yes' :
'No';
281 $attr[
'waitingList'] = $this->course_obj->enabledWaitingList() ?
'Yes' :
'No';
296 $this->
xmlElement(
'Start',null,$this->course_obj->getSubscriptionStart());
297 $this->
xmlElement(
'End',null,$this->course_obj->getSubscriptionEnd());
298 $this->
xmlEndTag(
'TemporarilyAvailable');
300 if(strlen($pwd = $this->course_obj->getSubscriptionPassword()))
310 $attr[
'type'] =
'Manual';
314 $attr[
'type'] =
'Title';
318 $attr[
'type'] =
'Activation';
326 $attr[
'Access'] =
'Disabled';
330 $attr[
'Access'] =
'Read';
334 $attr[
'Access'] =
'Download';
338 $this->
xmlElement(
'Start',null,$this->course_obj->getArchiveStart());
339 $this->
xmlElement(
'End',null,$this->course_obj->getArchiveEnd());
352 $this->course_obj->initCourseItemObject();
353 $this->course_obj->items_obj->setParentId($a_parent_id);
355 foreach($this->course_obj->items_obj->getAllItems() as $item)
364 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_'.$tmp_obj->getType().
'_'.$item[
'child'];
365 $attr[
'type'] = $tmp_obj->getType();
366 $attr[
'Unlimited'] = $item[
'activation_unlimited'] ? 1 : 0;
367 $attr[
'Position'] = $item[
'position'];
370 $this->
xmlElement(
'Title',null,$item[
'title']);
371 $this->
xmlElement(
'Description',null,$item[
'description']);
372 $this->
xmlElement(
'Start',null,$item[
'activation_start']);
373 $this->
xmlElement(
'End',null,$item[
'activation_end']);
375 if($item[
'type'] ==
'file')
377 $this->
xmlElement(
'FileType',null,$tmp_obj->getFileType());
399 $this->attach_users = $value ?
true :
false;