25 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
67 $this->EXPORT_VERSION =
"2";
75 $this->mode = $a_mode;
85 if($this->
getMode() == self::MODE_SOAP)
92 if ($this->attach_users)
102 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
107 elseif($this->
getMode() == self::MODE_EXPORT)
113 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
122 #var_dump("<pre>", htmlentities($this->xmlDumpMem()),"<pre>");
129 if ($a_tag ==
"Identifier" && $a_param ==
"Entry")
131 $a_value =
"il_".$this->ilias->getSetting(
'inst_id').
"_crs_".$this->course_obj->getId();
140 $this->
xmlSetDtdDef(
"<!DOCTYPE Course PUBLIC \"-//ILIAS//DTD Course//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_crs_5_0.dtd\">");
141 $this->
xmlSetGenCmt(
"Export of ILIAS course ". $this->course_obj->getId().
" of installation ".$this->ilias->getSetting(
'inst_id').
".");
150 $attrs[
"exportVersion"] = $this->EXPORT_VERSION;
151 $attrs[
"id"] =
"il_".$this->ilias->getSetting(
'inst_id').
'_crs_'.$this->course_obj->getId();
152 $attrs[
'showMembers'] = ($this->course_obj->getShowMembers() ?
'Yes' :
'No');
158 include_once
'Services/MetaData/classes/class.ilMD2XML.php';
160 $md2xml =
new ilMD2XML($this->course_obj->getId(),$this->course_obj->getId(),
'crs');
175 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
181 foreach($this->course_obj->getMembersObject()->getAdmins() as $id)
183 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
184 $attr[
'notification'] = ($this->course_obj->getMembersObject()->isNotificationEnabled($id)) ?
'Yes' :
'No';
185 $attr[
'passed'] = $this->course_obj->getMembersObject()->hasPassed($id) ?
'Yes' :
'No';
195 foreach($this->course_obj->getMembersObject()->getTutors() as $id)
197 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
198 $attr[
'notification'] = ($this->course_obj->getMembersObject()->isNotificationEnabled($id)) ?
'Yes' :
'No';
199 $attr[
'passed'] = $this->course_obj->getMembersObject()->hasPassed($id) ?
'Yes' :
'No';
208 foreach($this->course_obj->getMembersObject()->getMembers() as $id)
210 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
211 $attr[
'blocked'] = ($this->course_obj->getMembersObject()->isBlocked($id)) ?
'Yes' :
'No';
212 $attr[
'passed'] = $this->course_obj->getMembersObject()->hasPassed($id) ?
'Yes' :
'No';
222 foreach($this->course_obj->getMembersObject()->getSubscribers() as $id)
224 $data = $this->course_obj->getMembersObject()->getSubscriberData($id);
226 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
227 $attr[
'subscriptionTime'] = $data[
'time'];
237 include_once
'Modules/Course/classes/class.ilCourseWaitingList.php';
241 foreach($waiting_list->getAllUsers() as $data)
243 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$data[
'usr_id'];
244 $attr[
'position'] = $data[
'position'];
245 $attr[
'subscriptionTime'] = $data[
'time'];
260 if($this->course_obj->getOfflineStatus())
264 elseif($this->course_obj->getActivationUnlimitedStatus())
271 $this->
xmlElement(
'Start',null,$this->course_obj->getActivationStart());
272 $this->
xmlElement(
'End',null,$this->course_obj->getActivationEnd());
273 $this->
xmlEndTag(
'TemporarilyAvailable');
278 $this->
xmlElement(
'Syllabus',null,$this->course_obj->getSyllabus());
279 $this->
xmlElement(
'ImportantInformation',null,$this->course_obj->getImportantInformation());
284 $this->
xmlElement(
'Name',null,$this->course_obj->getContactName());
285 $this->
xmlElement(
'Responsibility',null,$this->course_obj->getContactResponsibility());
286 $this->
xmlElement(
'Phone',null,$this->course_obj->getContactPhone());
287 $this->
xmlElement(
'Email',null,$this->course_obj->getContactEmail());
288 $this->
xmlElement(
'Consultation',null,$this->course_obj->getContactConsultation());
296 $attr[
'registrationType'] =
'Confirmation';
300 $attr[
'registrationType'] =
'Direct';
304 $attr[
'registrationType'] =
'Password';
307 $attr[
'maxMembers'] = $this->course_obj->isSubscriptionMembershipLimited() ?
308 $this->course_obj->getSubscriptionMaxMembers() : 0;
309 $attr[
'notification'] = $this->course_obj->getSubscriptionNotify() ?
'Yes' :
'No';
310 $attr[
'waitingList'] = $this->course_obj->enabledWaitingList() ?
'Yes' :
'No';
325 $this->
xmlElement(
'Start',null,$this->course_obj->getSubscriptionStart());
326 $this->
xmlElement(
'End',null,$this->course_obj->getSubscriptionEnd());
327 $this->
xmlEndTag(
'TemporarilyAvailable');
329 if(strlen($pwd = $this->course_obj->getSubscriptionPassword()))
339 $attr[
'Access'] =
'Disabled';
343 $attr[
'Access'] =
'Read';
347 $attr[
'Access'] =
'Download';
351 $this->
xmlElement(
'Start',null,$this->course_obj->getArchiveStart());
352 $this->
xmlElement(
'End',null,$this->course_obj->getArchiveEnd());
372 $this->attach_users = $value ?
true :
false;