ILIAS  release_8 Revision v8.24
class.ilObjRemoteLearningModuleGUI.php
Go to the documentation of this file.
1<?php
2
18declare(strict_types=1);
19
33{
34 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
35 {
36 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
37
38 $this->lng->loadLanguageModule('rlm');
39 // $this->lng->loadLanguageModule('lres');
40 }
41
42 public function getType(): string
43 {
44 return 'rlm';
45 }
46
47 protected function addCustomInfoFields(ilInfoScreenGUI $a_info): void
48 {
49 $a_info->addProperty($this->lng->txt('ecs_availability'), $this->availabilityToString());
50 }
51
52 protected function availabilityToString()
53 {
54 switch ($this->object->getAvailabilityType()) {
56 return $this->lng->txt('offline');
57
59 return $this->lng->txt('online');
60 }
61 return '';
62 }
63
64 protected function addCustomEditForm(ilPropertyFormGUI $a_form): void
65 {
66 $radio_grp = new ilRadioGroupInputGUI($this->lng->txt('ecs_availability'), 'activation_type');
67 $radio_grp->setValue($this->object->getAvailabilityType());
68 $radio_grp->setDisabled(true);
69
70 $radio_opt = new ilRadioOption($this->lng->txt('offline'), ilObjRemoteLearningModule::ACTIVATION_OFFLINE);
71 $radio_grp->addOption($radio_opt);
72
73 $radio_opt = new ilRadioOption($this->lng->txt('online'), ilObjRemoteLearningModule::ACTIVATION_ONLINE);
74 $radio_grp->addOption($radio_opt);
75
76 $a_form->addItem($radio_grp);
77 }
78}
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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilCtrlBaseClassInterface describes ilCtrl base classes.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc