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)
103 #$this->__buildObject($this->course_obj->getRefId());
107 elseif($this->
getMode() == self::MODE_EXPORT)
119 #var_dump("<pre>", htmlentities($this->xmlDumpMem()),"<pre>");
126 if ($a_tag ==
"Identifier" && $a_param ==
"Entry")
128 $a_value =
"il_".$this->ilias->getSetting(
'inst_id').
"_crs_".$this->course_obj->getId();
137 $this->
xmlSetDtdDef(
"<!DOCTYPE Course PUBLIC \"-//ILIAS//DTD Course//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_course_3_10.dtd\">");
138 $this->
xmlSetGenCmt(
"Export of ILIAS course ". $this->course_obj->getId().
" of installation ".$this->ilias->getSetting(
'inst_id').
".");
147 $attrs[
"exportVersion"] = $this->EXPORT_VERSION;
148 $attrs[
"id"] =
"il_".$this->ilias->getSetting(
'inst_id').
'_crs_'.$this->course_obj->getId();
149 $attrs[
'showMembers'] = ($this->course_obj->getShowMembers() ?
'Yes' :
'No');
155 include_once
'Services/MetaData/classes/class.ilMD2XML.php';
157 $md2xml =
new ilMD2XML($this->course_obj->getId(),$this->course_obj->getId(),
'crs');
172 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
178 $this->course_obj->initCourseMemberObject();
180 foreach($this->course_obj->members_obj->getAdmins() as $id)
182 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
183 $attr[
'notification'] = ($this->course_obj->members_obj->isNotificationEnabled($id)) ?
'Yes' :
'No';
184 $attr[
'passed'] = $this->course_obj->members_obj->hasPassed($id) ?
'Yes' :
'No';
194 $this->course_obj->initCourseMemberObject();
196 foreach($this->course_obj->members_obj->getTutors() as $id)
198 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
199 $attr[
'notification'] = ($this->course_obj->members_obj->isNotificationEnabled($id)) ?
'Yes' :
'No';
200 $attr[
'passed'] = $this->course_obj->members_obj->hasPassed($id) ?
'Yes' :
'No';
209 $this->course_obj->initCourseMemberObject();
211 foreach($this->course_obj->members_obj->getMembers() as $id)
213 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
214 $attr[
'blocked'] = ($this->course_obj->members_obj->isBlocked($id)) ?
'Yes' :
'No';
215 $attr[
'passed'] = $this->course_obj->members_obj->hasPassed($id) ?
'Yes' :
'No';
225 $this->course_obj->initCourseMemberObject();
227 foreach($this->course_obj->members_obj->getSubscribers() as $id)
229 $data = $this->course_obj->members_obj->getSubscriberData($id);
231 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
232 $attr[
'subscriptionTime'] =
$data[
'time'];
242 include_once
'Modules/Course/classes/class.ilCourseWaitingList.php';
246 foreach($waiting_list->getAllUsers() as
$data)
248 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.
$data[
'usr_id'];
249 $attr[
'position'] =
$data[
'position'];
250 $attr[
'subscriptionTime'] =
$data[
'time'];
265 if($this->course_obj->getOfflineStatus())
269 elseif($this->course_obj->getActivationUnlimitedStatus())
276 $this->
xmlElement(
'Start',null,$this->course_obj->getActivationStart());
277 $this->
xmlElement(
'End',null,$this->course_obj->getActivationEnd());
278 $this->
xmlEndTag(
'TemporarilyAvailable');
283 $this->
xmlElement(
'Syllabus',null,$this->course_obj->getSyllabus());
284 $this->
xmlElement(
'ImportantInformation',null,$this->course_obj->getImportantInformation());
289 $this->
xmlElement(
'Name',null,$this->course_obj->getContactName());
290 $this->
xmlElement(
'Responsibility',null,$this->course_obj->getContactResponsibility());
291 $this->
xmlElement(
'Phone',null,$this->course_obj->getContactPhone());
292 $this->
xmlElement(
'Email',null,$this->course_obj->getContactEmail());
293 $this->
xmlElement(
'Consultation',null,$this->course_obj->getContactConsultation());
301 $attr[
'registrationType'] =
'Confirmation';
305 $attr[
'registrationType'] =
'Direct';
309 $attr[
'registrationType'] =
'Password';
312 $attr[
'maxMembers'] = $this->course_obj->getSubscriptionMaxMembers();
313 $attr[
'notification'] = $this->course_obj->getSubscriptionNotify() ?
'Yes' :
'No';
314 $attr[
'waitingList'] = $this->course_obj->enabledWaitingList() ?
'Yes' :
'No';
329 $this->
xmlElement(
'Start',null,$this->course_obj->getSubscriptionStart());
330 $this->
xmlElement(
'End',null,$this->course_obj->getSubscriptionEnd());
331 $this->
xmlEndTag(
'TemporarilyAvailable');
333 if(strlen($pwd = $this->course_obj->getSubscriptionPassword()))
343 $attr[
'type'] =
'Manual';
347 $attr[
'type'] =
'Title';
351 $attr[
'type'] =
'Activation';
359 $attr[
'Access'] =
'Disabled';
363 $attr[
'Access'] =
'Read';
367 $attr[
'Access'] =
'Download';
371 $this->
xmlElement(
'Start',null,$this->course_obj->getArchiveStart());
372 $this->
xmlElement(
'End',null,$this->course_obj->getArchiveEnd());
385 $this->course_obj->initCourseItemObject();
386 $this->course_obj->items_obj->setParentId($a_parent_id);
388 foreach($this->course_obj->items_obj->getAllItems() as $item)
397 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_'.$tmp_obj->getType().
'_'.$item[
'child'];
398 $attr[
'type'] = $tmp_obj->getType();
399 $attr[
'Unlimited'] = $item[
'activation_unlimited'] ? 1 : 0;
400 $attr[
'Position'] = $item[
'position'];
403 $this->
xmlElement(
'Title',null,$item[
'title']);
404 $this->
xmlElement(
'Description',null,$item[
'description']);
405 $this->
xmlElement(
'Start',null,$item[
'activation_start']);
406 $this->
xmlElement(
'End',null,$item[
'activation_end']);
408 if($item[
'type'] ==
'file')
410 $this->
xmlElement(
'FileType',null,$tmp_obj->getFileType());
432 $this->attach_users = $value ?
true :
false;