25 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
44 private $mode = self::MODE_SOAP;
65 parent::__construct();
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()))
337 $this->
xmlElement(
'Start',null,($this->course_obj->getCourseStart() && !$this->course_obj->getCourseStart()->isNull()) ? $this->course_obj->getCourseStart()->get(
IL_CAL_UNIX) : null);
338 $this->
xmlElement(
'End',null,($this->course_obj->getCourseEnd() && !$this->course_obj->getCourseEnd()->isNull()) ? $this->course_obj->getCourseEnd()->get(
IL_CAL_UNIX) : null);
340 $this->
xmlElement(
'WaitingListAutoFill',null,(
int)$this->course_obj->hasWaitingListAutoFill());
341 $this->
xmlElement(
'CancellationEnd',null,($this->course_obj->getCancellationEnd() && !$this->course_obj->getCancellationEnd()->isNull()) ? $this->course_obj->getCancellationEnd()->get(
IL_CAL_UNIX) : null);
342 $this->
xmlElement(
'MinMembers',null,(
int)$this->course_obj->getSubscriptionMinMembers());
344 $this->
xmlElement(
'ViewMode', null, $this->course_obj->getViewMode());
362 $this->attach_users = $value ? true :
false;
static _exportContainerSettings(ilXmlWriter $a_xml, $a_obj_id)
setAttachUsers($value)
write access to attach user property, if set to false no users will be attached.
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
xmlStartTag($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
Writes a starttag.
xmlElement($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE)
Writes a basic element (no children, just textual content)
static _appendXMLByObjId(ilXmlWriter $a_xml_writer, $a_obj_id)
Get xml of object values.
const IL_CRS_SUBSCRIPTION_CONFIRMATION
xmlEndTag($tag)
Writes an endtag.
__construct($course_obj)
constructor
const IL_CRS_SUBSCRIPTION_UNLIMITED
redirection script todo: (a better solution should control the processing via a xml file) ...
xmlHeader()
Writes xml header public.
Create styles array
The data for the language used.
modifyExportIdentifier($a_tag, $a_param, $a_value)
static _exportContainerSortingSettings(ilXmlWriter $xml, $obj_id)
sorting XML-export for all container objects
appendXML($a_str)
append xml string to document
const IL_CRS_SUBSCRIPTION_DIRECT
xmlDumpMem($format=TRUE)
Returns xml document from memory.
const IL_CRS_SUBSCRIPTION_DEACTIVATED
__buildAdvancedMetaData()
Build advanced meta data.