ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjRemoteLearningModuleGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
34{
35 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
36 {
37 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
38
39 $this->lng->loadLanguageModule('rlm');
40 // $this->lng->loadLanguageModule('lres');
41 }
42
43 public function getType(): string
44 {
45 return 'rlm';
46 }
47
48 protected function addCustomInfoFields(ilInfoScreenGUI $a_info): void
49 {
50 $a_info->addProperty($this->lng->txt('ecs_availability'), $this->availabilityToString());
51 }
52
53 protected function availabilityToString()
54 {
55 switch ($this->object->getAvailabilityType()) {
57 return $this->lng->txt('offline');
58
60 return $this->lng->txt('online');
61 }
62 return '';
63 }
64
65 protected function addCustomEditForm(ilPropertyFormGUI $a_form): void
66 {
67 $radio_grp = new ilRadioGroupInputGUI($this->lng->txt('ecs_availability'), 'activation_type');
68 $radio_grp->setValue($this->object->getAvailabilityType());
69 $radio_grp->setDisabled(true);
70
71 $radio_opt = new ilRadioOption($this->lng->txt('offline'), ilObjRemoteLearningModule::ACTIVATION_OFFLINE);
72 $radio_grp->addOption($radio_opt);
73
74 $radio_opt = new ilRadioOption($this->lng->txt('online'), ilObjRemoteLearningModule::ACTIVATION_ONLINE);
75 $radio_grp->addOption($radio_opt);
76
77 $a_form->addItem($radio_grp);
78 }
79}
Class ilInfoScreenGUI.
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
getType()
Functions that must be overwritten.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
addCustomEditForm(ilPropertyFormGUI $a_form)
Add custom fields to edit form.
addCustomInfoFields(ilInfoScreenGUI $a_info)
Add custom fields to info screen.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc