36 bool $a_call_by_reference =
true,
37 bool $a_prepare_output =
true
41 $this->rbacsystem =
$DIC->rbac()->system();
42 $this->
ctrl = $DIC->ctrl();
43 $this->
lng = $DIC->language();
47 $this->
lng->loadLanguageModule(
"awrn");
48 $this->
lng->loadLanguageModule(
"pd");
49 $this->
lng->loadLanguageModule(
"usr");
50 $this->admin_manager =
$DIC->awareness()
53 ->admin($this->requested_ref_id);
58 $next_class = $this->
ctrl->getNextClass($this);
59 $cmd = $this->
ctrl->getCmd();
63 switch ($next_class) {
64 case 'iluseractionadmingui':
67 $this->tabs_gui->setTabActive(
'settings');
69 $this->
ctrl->forwardCommand($gui);
72 case 'ilpermissiongui':
73 $this->tabs_gui->setTabActive(
'perm_settings');
75 $this->
ctrl->forwardCommand($perm_gui);
79 if (!$cmd || $cmd ==
'view') {
80 $cmd =
"editSettings";
93 $this->tabs_gui->addTab(
95 $this->
lng->txt(
"settings"),
96 $this->ctrl->getLinkTarget($this,
"editSettings")
101 $this->tabs_gui->addTab(
103 $this->
lng->txt(
"perm_settings"),
104 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm")
111 $this->tabs_gui->addSubTab(
113 $this->
lng->txt(
"settings"),
114 $this->ctrl->getLinkTarget($this,
"editSettings")
117 $this->tabs_gui->addSubTab(
119 $this->
lng->txt(
"user_actions"),
120 $this->ctrl->getLinkTargetByClass(
"iluseractionadmingui")
123 $this->tabs_gui->activateSubTab($a_id);
132 $this->tabs_gui->setTabActive(
'settings');
138 $this->tpl->setContent($a_form->getHTML());
152 if ($form->checkInput()) {
154 $awrn_set->set(
"awrn_enabled", (
bool) $form->getInput(
"enable_awareness"));
156 $p = (
int) $form->getInput(
"caching_period");
160 $awrn_set->set(
"caching_period", $p);
162 $awrn_set->set(
"max_nr_entries", (
int) $form->getInput(
"max_nr_entries"));
163 $awrn_set->set(
"use_osd", (
int) $form->getInput(
"use_osd"));
166 $pd_set->set(
"user_activity_time", (
int) $form->getInput(
"time_removal"));
168 $this->
settings->set(
'hide_own_online_status', $form->getInput(
'show_own_online_status'));
170 $prov = $this->admin_manager->getAllUserProviders();
171 foreach ($prov as $p) {
172 $this->admin_manager->setActivationMode(
174 (
int) $form->getInput(
"up_act_mode_" . $p->getProviderId())
178 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
179 $ilCtrl->redirect($this,
"editSettings");
182 $form->setValuesByPost();
201 $form->setFormAction($this->
ctrl->getFormAction($this));
202 $form->setTitle($this->
lng->txt(
'awareness_settings'));
205 $form->addCommandButton(
'saveSettings', $this->
lng->txt(
'save'));
206 $form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
213 $en->setChecked($awrn_set->get(
"awrn_enabled",
false));
217 $ti->setInfo($this->
lng->txt(
"awrn_caching_period_info"));
218 $ti->setSuffix($this->
lng->txt(
"awrn_seconds"));
220 $ti->setMaxLength(6);
221 $ti->setValue($awrn_set->get(
"caching_period"));
222 $en->addSubItem($ti);
226 $ti->setInfo($this->
lng->txt(
"awrn_max_nr_entries_info"));
228 $ti->setMaxLength(3);
230 $ti->setMaxValue(200);
231 $ti->setValue($awrn_set->get(
"max_nr_entries"));
232 $en->addSubItem($ti);
237 $lng->
txt(
"awrn_max_inactivity"),
240 $ti_prop->setSuffix($this->
lng->txt(
"awrn_minutes"));
241 if ($pd_set->get(
"user_activity_time") > 0) {
242 $ti_prop->setValue($pd_set->get(
"user_activity_time"));
244 $ti_prop->setInfo(
$lng->
txt(
"awrn_max_inactivity_info"));
245 $ti_prop->setMaxLength(3);
246 $ti_prop->setSize(3);
247 $en->addSubItem($ti_prop);
251 $osd->setInfo($this->
lng->txt(
"awrn_use_osd_info"));
252 $osd->setChecked($awrn_set->get(
"use_osd",
true));
253 $en->addSubItem($osd);
255 $osd =
new ilSelectInputGUI($this->
lng->txt(
'awrn_user_show_default'),
'show_own_online_status');
256 $osd->setInfo($this->
lng->txt(
'awrn_user_show_default_info'));
258 'n' => $this->
lng->txt(
'user_awrn_show'),
259 'y' => $this->lng->txt(
'user_awrn_hide')
261 $osd->setValue($this->
settings->get(
"hide_own_online_status",
'y'));
262 $en->addSubItem($osd);
264 $prov = $this->admin_manager->getAllUserProviders();
265 foreach ($prov as $p) {
267 $options = $this->admin_manager->getModeOptions();
268 $si =
new ilSelectInputGUI($p->getTitle(),
"up_act_mode_" . $p->getProviderId());
269 $si->setOptions($options);
270 $si->setInfo($p->getInfo());
271 $si->setValue($this->admin_manager->getActivationMode($p->getProviderId()));
272 $en->addSubItem($si);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
getAdminTabs()
administration tabs show only permissions and trash folder
saveSettings()
Save settings.
editSettings(?ilPropertyFormGUI $a_form=null)
Edit settings.
ILIAS Awareness AdminManager $admin_manager
Class ilObjectGUI Basic methods of all Output classes.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
prepareOutput(bool $show_sub_objects=true)
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
User action administration GUI class.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc