ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilCourseReferenceXmlWriter.php
Go to the documentation of this file.
1 <?php
2 
26 {
35  {
37  }
38 
39 
43  public function export(bool $a_with_header = true): void
44  {
45  if ($this->getMode() == self::MODE_EXPORT) {
46  if ($a_with_header) {
47  $this->buildHeader();
48  }
49  $this->buildReference();
50  $this->buildTarget();
51  $this->buildTitle();
52  $this->buildCourseSettings();
53  $this->buildFooter();
54  }
55  }
56 
60  protected function buildCourseSettings()
61  {
62  $this->xmlElement('MemberUpdate', [], $this->getReference()->isMemberUpdateEnabled() ? 1 : 0);
63  }
64 
65 
71  protected function buildHeader(): void
72  {
73  global $ilSetting;
74 
75  $this->xmlSetGenCmt("Export of ILIAS course reference " . $this->getReference()->getId() . " of installation " . $ilSetting->get('inst_id') . ".");
76  $this->xmlHeader();
77  }
78 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlSetGenCmt(string $genCmt)
Sets generated comment.
buildCourseSettings()
Add member update setting.
export(bool $a_with_header=true)
Start writing xml.
__construct(?ilObjCourseReference $ref=null)
constructor
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
xmlHeader()
Writes xml header.
global $ilSetting
Definition: privfeed.php:31
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
Class for container reference export.