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)
105 elseif($this->
getMode() == self::MODE_EXPORT)
117 #var_dump("<pre>", htmlentities($this->xmlDumpMem()),"<pre>");
124 if ($a_tag ==
"Identifier" && $a_param ==
"Entry")
126 $a_value =
"il_".$this->ilias->getSetting(
'inst_id').
"_crs_".$this->course_obj->getId();
135 $this->
xmlSetDtdDef(
"<!DOCTYPE Course PUBLIC \"-//ILIAS//DTD Course//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_course_3_10.dtd\">");
136 $this->
xmlSetGenCmt(
"Export of ILIAS course ". $this->course_obj->getId().
" of installation ".$this->ilias->getSetting(
'inst_id').
".");
145 $attrs[
"exportVersion"] = $this->EXPORT_VERSION;
146 $attrs[
"id"] =
"il_".$this->ilias->getSetting(
'inst_id').
'_crs_'.$this->course_obj->getId();
147 $attrs[
'showMembers'] = ($this->course_obj->getShowMembers() ?
'Yes' :
'No');
153 include_once
'Services/MetaData/classes/class.ilMD2XML.php';
155 $md2xml =
new ilMD2XML($this->course_obj->getId(),$this->course_obj->getId(),
'crs');
170 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
176 foreach($this->course_obj->getMembersObject()->getAdmins() as $id)
178 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
179 $attr[
'notification'] = ($this->course_obj->getMembersObject()->isNotificationEnabled($id)) ?
'Yes' :
'No';
180 $attr[
'passed'] = $this->course_obj->getMembersObject()->hasPassed($id) ?
'Yes' :
'No';
190 foreach($this->course_obj->getMembersObject()->getTutors() as $id)
192 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
193 $attr[
'notification'] = ($this->course_obj->getMembersObject()->isNotificationEnabled($id)) ?
'Yes' :
'No';
194 $attr[
'passed'] = $this->course_obj->getMembersObject()->hasPassed($id) ?
'Yes' :
'No';
203 foreach($this->course_obj->getMembersObject()->getMembers() as $id)
205 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
206 $attr[
'blocked'] = ($this->course_obj->getMembersObject()->isBlocked($id)) ?
'Yes' :
'No';
207 $attr[
'passed'] = $this->course_obj->getMembersObject()->hasPassed($id) ?
'Yes' :
'No';
217 foreach($this->course_obj->getMembersObject()->getSubscribers() as $id)
219 $data = $this->course_obj->getMembersObject()->getSubscriberData($id);
221 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
222 $attr[
'subscriptionTime'] =
$data[
'time'];
232 include_once
'Modules/Course/classes/class.ilCourseWaitingList.php';
236 foreach($waiting_list->getAllUsers() as
$data)
238 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.
$data[
'usr_id'];
239 $attr[
'position'] =
$data[
'position'];
240 $attr[
'subscriptionTime'] =
$data[
'time'];
255 if($this->course_obj->getOfflineStatus())
259 elseif($this->course_obj->getActivationUnlimitedStatus())
266 $this->
xmlElement(
'Start',null,$this->course_obj->getActivationStart());
267 $this->
xmlElement(
'End',null,$this->course_obj->getActivationEnd());
268 $this->
xmlEndTag(
'TemporarilyAvailable');
273 $this->
xmlElement(
'Syllabus',null,$this->course_obj->getSyllabus());
274 $this->
xmlElement(
'ImportantInformation',null,$this->course_obj->getImportantInformation());
279 $this->
xmlElement(
'Name',null,$this->course_obj->getContactName());
280 $this->
xmlElement(
'Responsibility',null,$this->course_obj->getContactResponsibility());
281 $this->
xmlElement(
'Phone',null,$this->course_obj->getContactPhone());
282 $this->
xmlElement(
'Email',null,$this->course_obj->getContactEmail());
283 $this->
xmlElement(
'Consultation',null,$this->course_obj->getContactConsultation());
291 $attr[
'registrationType'] =
'Confirmation';
295 $attr[
'registrationType'] =
'Direct';
299 $attr[
'registrationType'] =
'Password';
302 $attr[
'maxMembers'] = $this->course_obj->isSubscriptionMembershipLimited() ?
303 $this->course_obj->getSubscriptionMaxMembers() : 0;
304 $attr[
'notification'] = $this->course_obj->getSubscriptionNotify() ?
'Yes' :
'No';
305 $attr[
'waitingList'] = $this->course_obj->enabledWaitingList() ?
'Yes' :
'No';
320 $this->
xmlElement(
'Start',null,$this->course_obj->getSubscriptionStart());
321 $this->
xmlElement(
'End',null,$this->course_obj->getSubscriptionEnd());
322 $this->
xmlEndTag(
'TemporarilyAvailable');
324 if(strlen($pwd = $this->course_obj->getSubscriptionPassword()))
334 $attr[
'type'] =
'Manual';
338 $attr[
'type'] =
'Title';
342 $attr[
'type'] =
'Activation';
350 $attr[
'Access'] =
'Disabled';
354 $attr[
'Access'] =
'Read';
358 $attr[
'Access'] =
'Download';
362 $this->
xmlElement(
'Start',null,$this->course_obj->getArchiveStart());
363 $this->
xmlElement(
'End',null,$this->course_obj->getArchiveEnd());
383 $this->attach_users = $value ?
true :
false;