ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilCourseReferenceXmlWriter.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once './Services/ContainerReference/classes/class.ilContainerReferenceXmlWriter.php';
6 
14 {
22  public function __construct(ilObjCourseReference $ref = null)
23  {
25  }
26 
27 
31  public function export(bool $a_with_header = true): void
32  {
33  if ($this->getMode() == self::MODE_EXPORT) {
34  if ($a_with_header) {
35  $this->buildHeader();
36  }
37  $this->buildReference();
38  $this->buildTarget();
39  $this->buildTitle();
40  $this->buildCourseSettings();
41  $this->buildFooter();
42  }
43  }
44 
48  protected function buildCourseSettings()
49  {
50  $this->xmlElement('MemberUpdate', [], $this->getReference()->isMemberUpdateEnabled() ? 1 : 0);
51  }
52 
53 
59  protected function buildHeader(): void
60  {
61  global $ilSetting;
62 
63  $this->xmlSetGenCmt("Export of ILIAS course reference " . $this->getReference()->getId() . " of installation " . $ilSetting->get('inst_id') . ".");
64  $this->xmlHeader();
65  }
66 }
__construct(ilObjCourseReference $ref=null)
constructor
xmlSetGenCmt(string $genCmt)
Sets generated comment.
buildCourseSettings()
Add member update setting.
export(bool $a_with_header=true)
Start writing xml.
__construct(VocabulariesInterface $vocabularies)
xmlHeader()
Writes xml header.
global $ilSetting
Definition: privfeed.php:18
Class for container reference export.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...