ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCourseXMLWriter Class Reference

XML writer class. More...

+ Inheritance diagram for ilCourseXMLWriter:
+ Collaboration diagram for ilCourseXMLWriter:

Public Member Functions

 __construct ($course_obj)
 constructor More...
 
 setMode ($a_mode)
 
 getMode ()
 
 start ()
 
 getXML ()
 
 modifyExportIdentifier ($a_tag, $a_param, $a_value)
 
 __buildHeader ()
 
 __buildCourseStart ()
 
 __buildMetaData ()
 
 __buildAdmin ()
 
 __buildTutor ()
 
 __buildMember ()
 
 __buildSubscriber ()
 
 __buildWaitingList ()
 
 __buildSetting ()
 
 __buildFooter ()
 
 setAttachUsers ($value)
 write access to attach user property, if set to false no users will be attached. More...
 
- Public Member Functions inherited from ilXmlWriter
 __construct ($version="1.0", $outEnc="utf-8", $inEnc="utf-8")
 constructor More...
 
 _ilXmlWriter ()
 destructor public More...
 
 xmlSetDtdDef ($dtdDef)
 Sets dtd definition. More...
 
 xmlSetStSheet ($stSheet)
 Sets stylesheet. More...
 
 xmlSetGenCmt ($genCmt)
 Sets generated comment. More...
 
 xmlEncodeData ($data)
 Encodes text from input encoding into output encoding. More...
 
 xmlFormatData ($data)
 Indents text for better reading. More...
 
 xmlFormatElement ($array)
 Callback function for xmlFormatData; do not invoke directly. More...
 
 xmlHeader ()
 Writes xml header public. More...
 
 xmlStartTag ($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
 Writes a starttag. More...
 
 xmlEndTag ($tag)
 Writes an endtag. More...
 
 xmlComment ($comment)
 Writes a comment. More...
 
 xmlData ($data, $encode=true, $escape=true)
 Writes data. More...
 
 xmlElement ($tag, $attrs=null, $data=null, $encode=true, $escape=true)
 Writes a basic element (no children, just textual content) More...
 
 xmlDumpFile ($file, $format=true)
 Dumps xml document from memory into a file. More...
 
 xmlDumpMem ($format=true)
 Returns xml document from memory. More...
 
 appendXML ($a_str)
 append xml string to document More...
 
 xmlClear ()
 clears xmlStr public More...
 

Data Fields

const MODE_SOAP = 1
 
const MODE_EXPORT = 2
 
- Data Fields inherited from ilXmlWriter
 $xmlStr
 
 $version
 
 $outEnc
 
 $inEnc
 
 $dtdDef = ""
 
 $stSheet = ""
 
 $genCmt = "Generated by ILIAS XmlWriter"
 

Private Member Functions

 __buildAdvancedMetaData ()
 Build advanced meta data. More...
 

Private Attributes

 $mode = self::MODE_SOAP
 
 $ilias
 
 $xml
 
 $course_obj
 
 $attach_users = true
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlWriter
static _xmlEscapeData ($data)
 Escapes reserved characters. More...
 

Detailed Description

XML writer class.

Class to simplify manual writing of xml documents. It only supports writing xml sequentially, because the xml document is saved in a string with no additional structure information. The author is responsible for well-formedness and validity of the xml document.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 39 of file class.ilCourseXMLWriter.php.

Constructor & Destructor Documentation

◆ __construct()

ilCourseXMLWriter::__construct (   $course_obj)

constructor

Parameters
ilObject$course_objpublic

Definition at line 69 of file class.ilCourseXMLWriter.php.

References $course_obj, $DIC, $ilias, and ILIAS\GlobalScreen\Provider\__construct().

70  {
71  global $DIC;
72 
73  $ilias = $DIC['ilias'];
74 
76 
77  $this->EXPORT_VERSION = "2";
78 
79  $this->ilias = $ilias;
80  $this->course_obj = $course_obj;
81  }
redirection script todo: (a better solution should control the processing via a xml file) ...
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ __buildAdmin()

ilCourseXMLWriter::__buildAdmin ( )

Definition at line 183 of file class.ilCourseXMLWriter.php.

References $GLOBALS, ilOrgUnitOperation\OP_MANAGE_MEMBERS, ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by start().

184  {
185  $admins = $this->course_obj->getMembersObject()->getAdmins();
186  $admins = $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
187  'manage_members',
189  $this->course_obj->getRefId(),
190  $admins
191  );
192 
193  foreach ($admins as $id) {
194  $attr['id'] = 'il_' . $this->ilias->getSetting('inst_id') . '_usr_' . $id;
195  $attr['notification'] = ($this->course_obj->getMembersObject()->isNotificationEnabled($id)) ? 'Yes' : 'No';
196  $attr['passed'] = $this->course_obj->getMembersObject()->hasPassed($id) ? 'Yes' : 'No';
197  $attr['contact'] = $this->course_obj->getMembersObject()->isContact($id) ? 'Yes' : 'No';
198 
199  $this->xmlStartTag('Admin', $attr);
200  $this->xmlEndTag('Admin');
201  }
202  return true;
203  }
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlEndTag($tag)
Writes an endtag.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildAdvancedMetaData()

ilCourseXMLWriter::__buildAdvancedMetaData ( )
private

Build advanced meta data.

private

Definition at line 177 of file class.ilCourseXMLWriter.php.

References ilAdvancedMDValues\_appendXMLByObjId().

Referenced by start().

178  {
179  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
180  ilAdvancedMDValues::_appendXMLByObjId($this, $this->course_obj->getId());
181  }
static _appendXMLByObjId(ilXmlWriter $a_xml_writer, $a_obj_id)
Get xml of object values.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildCourseStart()

ilCourseXMLWriter::__buildCourseStart ( )

Definition at line 152 of file class.ilCourseXMLWriter.php.

References ilXmlWriter\xmlStartTag().

Referenced by start().

153  {
154  $attrs["exportVersion"] = $this->EXPORT_VERSION;
155  $attrs["id"] = "il_" . $this->ilias->getSetting('inst_id') . '_crs_' . $this->course_obj->getId();
156  $attrs['showMembers'] = ($this->course_obj->getShowMembers() ? 'Yes' : 'No');
157  $this->xmlStartTag("Course", $attrs);
158  }
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildFooter()

ilCourseXMLWriter::__buildFooter ( )

Definition at line 409 of file class.ilCourseXMLWriter.php.

References ilXmlWriter\xmlEndTag().

Referenced by start().

410  {
411  $this->xmlEndTag('Course');
412  }
xmlEndTag($tag)
Writes an endtag.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildHeader()

ilCourseXMLWriter::__buildHeader ( )

Definition at line 142 of file class.ilCourseXMLWriter.php.

References ILIAS_HTTP_PATH, ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), and ilXmlWriter\xmlSetGenCmt().

Referenced by start().

143  {
144  $this->xmlSetDtdDef("<!DOCTYPE Course PUBLIC \"-//ILIAS//DTD Course//EN\" \"" . ILIAS_HTTP_PATH . "/xml/ilias_crs_5_0.dtd\">");
145  $this->xmlSetGenCmt("Export of ILIAS course " . $this->course_obj->getId() . " of installation " . $this->ilias->getSetting('inst_id') . ".");
146  $this->xmlHeader();
147 
148 
149  return true;
150  }
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
redirection script todo: (a better solution should control the processing via a xml file) ...
xmlHeader()
Writes xml header public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildMember()

ilCourseXMLWriter::__buildMember ( )

Definition at line 225 of file class.ilCourseXMLWriter.php.

References $GLOBALS, ilOrgUnitOperation\OP_MANAGE_MEMBERS, ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by start().

226  {
227  $members = $this->course_obj->getMembersObject()->getMembers();
228  $members = $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
229  'manage_members',
231  $this->course_obj->getRefId(),
232  $members
233  );
234  foreach ($members as $id) {
235  $attr['id'] = 'il_' . $this->ilias->getSetting('inst_id') . '_usr_' . $id;
236  $attr['blocked'] = ($this->course_obj->getMembersObject()->isBlocked($id)) ? 'Yes' : 'No';
237  $attr['passed'] = $this->course_obj->getMembersObject()->hasPassed($id) ? 'Yes' : 'No';
238 
239  $this->xmlStartTag('Member', $attr);
240  $this->xmlEndTag('Member');
241  }
242  return true;
243  }
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlEndTag($tag)
Writes an endtag.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildMetaData()

ilCourseXMLWriter::__buildMetaData ( )

Definition at line 160 of file class.ilCourseXMLWriter.php.

References ilXmlWriter\appendXML(), and ilMD2XML\startExport().

Referenced by start().

161  {
162  include_once 'Services/MetaData/classes/class.ilMD2XML.php';
163 
164  $md2xml = new ilMD2XML($this->course_obj->getId(), $this->course_obj->getId(), 'crs');
165  $md2xml->startExport();
166  $this->appendXML($md2xml->getXML());
167 
168  return true;
169  }
appendXML($a_str)
append xml string to document
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildSetting()

ilCourseXMLWriter::__buildSetting ( )
Returns
bool

Definition at line 299 of file class.ilCourseXMLWriter.php.

References IL_CAL_UNIX, IL_CRS_SUBSCRIPTION_CONFIRMATION, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, IL_CRS_SUBSCRIPTION_UNLIMITED, IL_CRS_VIEW_TIMING, ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by start().

300  {
301  $this->xmlStartTag('Settings');
302 
303  // Availability
304  $this->xmlStartTag('Availability');
305  if ($this->course_obj->getOfflineStatus()) {
306  $this->xmlElement('NotAvailable');
307  } elseif ($this->course_obj->getActivationUnlimitedStatus()) {
308  $this->xmlElement('Unlimited');
309  } else {
310  $this->xmlStartTag('TemporarilyAvailable');
311  $this->xmlElement('Start', null, $this->course_obj->getActivationStart());
312  $this->xmlElement('End', null, $this->course_obj->getActivationEnd());
313  $this->xmlEndTag('TemporarilyAvailable');
314  }
315  $this->xmlEndTag('Availability');
316 
317  // Syllabus
318  $this->xmlElement('Syllabus', null, $this->course_obj->getSyllabus());
319  $this->xmlElement('ImportantInformation', null, $this->course_obj->getImportantInformation());
320  $this->xmlElement('TargetGroup', null, $this->course_obj->getTargetGroup());
321 
322 
323  // Contact
324  $this->xmlStartTag('Contact');
325  $this->xmlElement('Name', null, $this->course_obj->getContactName());
326  $this->xmlElement('Responsibility', null, $this->course_obj->getContactResponsibility());
327  $this->xmlElement('Phone', null, $this->course_obj->getContactPhone());
328  $this->xmlElement('Email', null, $this->course_obj->getContactEmail());
329  $this->xmlElement('Consultation', null, $this->course_obj->getContactConsultation());
330  $this->xmlEndTag('Contact');
331 
332  // Registration
333  $attr = array();
334 
335  if ($this->course_obj->getSubscriptionType() == IL_CRS_SUBSCRIPTION_CONFIRMATION) {
336  $attr['registrationType'] = 'Confirmation';
337  } elseif ($this->course_obj->getSubscriptionType() == IL_CRS_SUBSCRIPTION_DIRECT) {
338  $attr['registrationType'] = 'Direct';
339  } else {
340  $attr['registrationType'] = 'Password';
341  }
342 
343  $attr['maxMembers'] = $this->course_obj->isSubscriptionMembershipLimited() ?
344  $this->course_obj->getSubscriptionMaxMembers() : 0;
345  $attr['notification'] = $this->course_obj->getSubscriptionNotify() ? 'Yes' : 'No';
346  $attr['waitingList'] = $this->course_obj->enabledWaitingList() ? 'Yes' : 'No';
347 
348  $this->xmlStartTag('Registration', $attr);
349 
350  if ($this->course_obj->getSubscriptionLimitationType() == IL_CRS_SUBSCRIPTION_DEACTIVATED) {
351  $this->xmlElement('Disabled');
352  } elseif ($this->course_obj->getSubscriptionLimitationType() == IL_CRS_SUBSCRIPTION_UNLIMITED) {
353  $this->xmlElement('Unlimited');
354  } else {
355  $this->xmlStartTag('TemporarilyAvailable');
356  $this->xmlElement('Start', null, $this->course_obj->getSubscriptionStart());
357  $this->xmlElement('End', null, $this->course_obj->getSubscriptionEnd());
358  $this->xmlEndTag('TemporarilyAvailable');
359  }
360  if (strlen($pwd = $this->course_obj->getSubscriptionPassword())) {
361  $this->xmlElement('Password', null, $pwd);
362  }
363  $this->xmlEndTag('Registration');
364 
365 
366  $this->xmlStartTag('Period', ['withTime' => $this->course_obj->getCourseStartTimeIndication() ? 1 : 0]);
367  $this->xmlElement(
368  'Start',
369  null,
370  $this->course_obj->getCourseStart()
371  ? $this->course_obj->getCourseStart()->get(IL_CAL_UNIX)
372  : null
373  );
374  $this->xmlElement(
375  'End',
376  null,
377  $this->course_obj->getCourseEnd()
378  ? $this->course_obj->getCourseEnd()->get(IL_CAL_UNIX)
379  : null
380  );
381  $this->xmlEndTag('Period');
382  $this->xmlElement('WaitingListAutoFill', null, (int) $this->course_obj->hasWaitingListAutoFill());
383  $this->xmlElement('CancellationEnd', null, ($this->course_obj->getCancellationEnd() && !$this->course_obj->getCancellationEnd()->isNull()) ? $this->course_obj->getCancellationEnd()->get(IL_CAL_UNIX) : null);
384  $this->xmlElement('MinMembers', null, (int) $this->course_obj->getSubscriptionMinMembers());
385 
386  $this->xmlElement('ViewMode', null, $this->course_obj->getViewMode());
387 
388  // cognos-blu-patch: begin
389  $this->xmlElement('ViewMode', null, $this->course_obj->getViewMode());
390 
391  if ($this->course_obj->getViewMode() == IL_CRS_VIEW_TIMING) {
392  $this->xmlElement('TimingMode', null, $this->course_obj->getTimingMode());
393  }
394  // cognos-blu-patch: end
395 
396  $this->xmlElement(
397  'WelcomeMail',
398  [
399  'status' => $this->course_obj->getAutoNotification() ? 1 : 0
400  ]
401  );
402 
403 
404  $this->xmlEndTag('Settings');
405 
406  return true;
407  }
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
const IL_CRS_SUBSCRIPTION_CONFIRMATION
const IL_CAL_UNIX
const IL_CRS_VIEW_TIMING
xmlEndTag($tag)
Writes an endtag.
const IL_CRS_SUBSCRIPTION_UNLIMITED
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
const IL_CRS_SUBSCRIPTION_DIRECT
const IL_CRS_SUBSCRIPTION_DEACTIVATED
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildSubscriber()

ilCourseXMLWriter::__buildSubscriber ( )

Definition at line 245 of file class.ilCourseXMLWriter.php.

References $data, $GLOBALS, ilOrgUnitOperation\OP_MANAGE_MEMBERS, ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by start().

246  {
247  $subs = $this->course_obj->getMembersObject()->getSubscribers();
248  $subs = $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
249  'manage_members',
251  $this->course_obj->getRefId(),
252  $subs
253  );
254 
255  foreach ($subs as $id) {
256  $data = $this->course_obj->getMembersObject()->getSubscriberData($id);
257 
258  $attr['id'] = 'il_' . $this->ilias->getSetting('inst_id') . '_usr_' . $id;
259  $attr['subscriptionTime'] = $data['time'];
260 
261  $this->xmlStartTag('Subscriber', $attr);
262  $this->xmlEndTag('Subscriber');
263  }
264  return true;
265  }
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
$data
Definition: storeScorm.php:23
xmlEndTag($tag)
Writes an endtag.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildTutor()

ilCourseXMLWriter::__buildTutor ( )

Definition at line 205 of file class.ilCourseXMLWriter.php.

References $GLOBALS, ilOrgUnitOperation\OP_MANAGE_MEMBERS, ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by start().

206  {
207  $tutors = $this->course_obj->getMembersObject()->getTutors();
208  $tutors = $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
209  'manage_members',
211  $this->course_obj->getRefId(),
212  $tutors
213  );
214  foreach ($tutors as $id) {
215  $attr['id'] = 'il_' . $this->ilias->getSetting('inst_id') . '_usr_' . $id;
216  $attr['notification'] = ($this->course_obj->getMembersObject()->isNotificationEnabled($id)) ? 'Yes' : 'No';
217  $attr['passed'] = $this->course_obj->getMembersObject()->hasPassed($id) ? 'Yes' : 'No';
218  $attr['contact'] = $this->course_obj->getMembersObject()->isContact($id) ? 'Yes' : 'No';
219 
220  $this->xmlStartTag('Tutor', $attr);
221  $this->xmlEndTag('Tutor');
222  }
223  return true;
224  }
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlEndTag($tag)
Writes an endtag.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildWaitingList()

ilCourseXMLWriter::__buildWaitingList ( )

Definition at line 267 of file class.ilCourseXMLWriter.php.

References $data, $GLOBALS, ilWaitingList\getAllUsers(), ilOrgUnitOperation\OP_MANAGE_MEMBERS, ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by start().

268  {
269  include_once 'Modules/Course/classes/class.ilCourseWaitingList.php';
270  $waiting_list = new ilCourseWaitingList($this->course_obj->getId());
271 
272  $wait = $waiting_list->getAllUsers();
273 
274  foreach ($wait as $data) {
275  $is_accessible = $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
276  'manage_members',
278  $this->course_obj->getRefId(),
279  [$data['usr_id']]
280  );
281  if (!count($is_accessible)) {
282  continue;
283  }
284 
285  $attr['id'] = 'il_' . $this->ilias->getSetting('inst_id') . '_usr_' . $data['usr_id'];
286  $attr['position'] = $data['position'];
287  $attr['subscriptionTime'] = $data['time'];
288 
289  $this->xmlStartTag('WaitingList', $attr);
290  $this->xmlEndTag('WaitingList');
291  }
292  return true;
293  }
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
$data
Definition: storeScorm.php:23
xmlEndTag($tag)
Writes an endtag.
getAllUsers()
get all users on waiting list
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMode()

ilCourseXMLWriter::getMode ( )

Definition at line 88 of file class.ilCourseXMLWriter.php.

References $mode.

Referenced by start().

89  {
90  return $this->mode;
91  }
+ Here is the caller graph for this function:

◆ getXML()

ilCourseXMLWriter::getXML ( )

Definition at line 125 of file class.ilCourseXMLWriter.php.

References ilXmlWriter\xmlDumpMem().

126  {
127  #var_dump("<pre>", htmlentities($this->xmlDumpMem()),"<pre>");
128  return $this->xmlDumpMem(true);
129  }
xmlDumpMem($format=true)
Returns xml document from memory.
+ Here is the call graph for this function:

◆ modifyExportIdentifier()

ilCourseXMLWriter::modifyExportIdentifier (   $a_tag,
  $a_param,
  $a_value 
)

Definition at line 132 of file class.ilCourseXMLWriter.php.

133  {
134  if ($a_tag == "Identifier" && $a_param == "Entry") {
135  $a_value = "il_" . $this->ilias->getSetting('inst_id') . "_crs_" . $this->course_obj->getId();
136  }
137 
138  return $a_value;
139  }
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ setAttachUsers()

ilCourseXMLWriter::setAttachUsers (   $value)

write access to attach user property, if set to false no users will be attached.

Parameters
unknown_type$value

Definition at line 419 of file class.ilCourseXMLWriter.php.

420  {
421  $this->attach_users = $value ? true : false;
422  }

◆ setMode()

ilCourseXMLWriter::setMode (   $a_mode)

Definition at line 83 of file class.ilCourseXMLWriter.php.

84  {
85  $this->mode = $a_mode;
86  }

◆ start()

ilCourseXMLWriter::start ( )

Definition at line 93 of file class.ilCourseXMLWriter.php.

References __buildAdmin(), __buildAdvancedMetaData(), __buildCourseStart(), __buildFooter(), __buildHeader(), __buildMember(), __buildMetaData(), __buildSetting(), __buildSubscriber(), __buildTutor(), __buildWaitingList(), ilContainer\_exportContainerSettings(), ilContainerSortingSettings\_exportContainerSortingSettings(), and getMode().

94  {
95  if ($this->getMode() == self::MODE_SOAP) {
96  $this->__buildHeader();
97  $this->__buildCourseStart();
98  $this->__buildMetaData();
99  $this->__buildAdvancedMetaData();
100  if ($this->attach_users) {
101  $this->__buildAdmin();
102  $this->__buildTutor();
103  $this->__buildMember();
104  }
105  $this->__buildSubscriber();
106  $this->__buildWaitingList();
107 
108  $this->__buildSetting();
109  include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
110  ilContainerSortingSettings::_exportContainerSortingSettings($this, $this->course_obj->getId());
111  ilContainer::_exportContainerSettings($this, $this->course_obj->getId());
112  $this->__buildFooter();
113  } elseif ($this->getMode() == self::MODE_EXPORT) {
114  $this->__buildCourseStart();
115  $this->__buildMetaData();
116  $this->__buildAdvancedMetaData();
117  $this->__buildSetting();
118  include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
119  ilContainerSortingSettings::_exportContainerSortingSettings($this, $this->course_obj->getId());
120  ilContainer::_exportContainerSettings($this, $this->course_obj->getId());
121  $this->__buildFooter();
122  }
123  }
static _exportContainerSettings(ilXmlWriter $a_xml, $a_obj_id)
static _exportContainerSortingSettings(ilXmlWriter $xml, $obj_id)
sorting XML-export for all container objects
__buildAdvancedMetaData()
Build advanced meta data.
+ Here is the call graph for this function:

Field Documentation

◆ $attach_users

ilCourseXMLWriter::$attach_users = true
private

Definition at line 59 of file class.ilCourseXMLWriter.php.

◆ $course_obj

ilCourseXMLWriter::$course_obj
private

Definition at line 57 of file class.ilCourseXMLWriter.php.

Referenced by __construct().

◆ $ilias

ilCourseXMLWriter::$ilias
private

Definition at line 47 of file class.ilCourseXMLWriter.php.

Referenced by __construct().

◆ $mode

ilCourseXMLWriter::$mode = self::MODE_SOAP
private

Definition at line 44 of file class.ilCourseXMLWriter.php.

Referenced by getMode().

◆ $xml

ilCourseXMLWriter::$xml
private

Definition at line 52 of file class.ilCourseXMLWriter.php.

◆ MODE_EXPORT

const ilCourseXMLWriter::MODE_EXPORT = 2

Definition at line 42 of file class.ilCourseXMLWriter.php.

Referenced by ilCourseExporter\getXmlRepresentation().

◆ MODE_SOAP

const ilCourseXMLWriter::MODE_SOAP = 1

Definition at line 41 of file class.ilCourseXMLWriter.php.


The documentation for this class was generated from the following file: