ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 
13 {
21  public function __construct(ilObjCourseReference $ref = null)
22  {
24  }
25 
26 
30  public function export(bool $a_with_header = true): void
31  {
32  if ($this->getMode() == self::MODE_EXPORT) {
33  if ($a_with_header) {
34  $this->buildHeader();
35  }
36  $this->buildReference();
37  $this->buildTarget();
38  $this->buildTitle();
39  $this->buildCourseSettings();
40  $this->buildFooter();
41  }
42  }
43 
47  protected function buildCourseSettings()
48  {
49  $this->xmlElement('MemberUpdate', [], $this->getReference()->isMemberUpdateEnabled() ? 1 : 0);
50  }
51 
52 
58  protected function buildHeader(): void
59  {
60  global $ilSetting;
61 
62  $this->xmlSetGenCmt("Export of ILIAS course reference " . $this->getReference()->getId() . " of installation " . $ilSetting->get('inst_id') . ".");
63  $this->xmlHeader();
64  }
65 }
__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.
xmlHeader()
Writes xml header.
global $ilSetting
Definition: privfeed.php:32
__construct(Container $dic, ilPlugin $plugin)
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...