3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
28 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
32 $this->rbacsystem = $DIC->rbac()->system();
33 $this->ctrl = $DIC->ctrl();
34 $this->lng = $DIC->language();
36 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
38 $this->lng->loadLanguageModule(
"awrn");
39 $this->lng->loadLanguageModule(
"pd");
40 $this->lng->loadLanguageModule(
"usr");
51 $next_class = $this->ctrl->getNextClass($this);
52 $cmd = $this->ctrl->getCmd();
56 switch ($next_class) {
57 case 'iluseractionadmingui':
58 include_once(
"./Services/User/Actions/classes/class.ilUserActionAdminGUI.php");
59 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserActionContext.php");
62 $this->tabs_gui->setTabActive(
'settings');
64 $this->ctrl->forwardCommand($gui);
67 case 'ilpermissiongui':
68 $this->tabs_gui->setTabActive(
'perm_settings');
69 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
71 $this->ctrl->forwardCommand($perm_gui);
75 if (!$cmd || $cmd ==
'view') {
76 $cmd =
"editSettings";
92 if (
$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
93 $this->tabs_gui->addTab(
95 $this->lng->txt(
"settings"),
96 $this->ctrl->getLinkTarget($this,
"editSettings")
100 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
101 $this->tabs_gui->addTab(
103 $this->lng->txt(
"perm_settings"),
104 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm")
117 $this->tabs_gui->addSubTab(
119 $this->lng->txt(
"settings"),
120 $this->ctrl->getLinkTarget($this,
"editSettings")
123 $this->tabs_gui->addSubTab(
125 $this->lng->txt(
"user_actions"),
126 $this->ctrl->getLinkTargetByClass(
"iluseractionadmingui")
129 $this->tabs_gui->activateSubTab($a_id);
138 $this->tabs_gui->setTabActive(
'settings');
144 $this->tpl->setContent($a_form->getHTML());
158 if (
$form->checkInput()) {
160 $awrn_set->set(
"awrn_enabled", (
bool)
$form->getInput(
"enable_awareness"));
162 $p = (int)
$form->getInput(
"caching_period");
166 $awrn_set->set(
"caching_period", $p);
168 $awrn_set->set(
"max_nr_entries", (
int)
$form->getInput(
"max_nr_entries"));
169 $awrn_set->set(
"use_osd", (
int)
$form->getInput(
"use_osd"));
172 $pd_set->set(
"user_activity_time", (
int)
$_POST[
"time_removal"]);
174 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserProviderFactory.php");
176 foreach ($prov as $p) {
177 $p->setActivationMode(
$form->getInput(
"up_act_mode_" . $p->getProviderId()));
181 $ilCtrl->redirect($this,
"editSettings");
184 $form->setValuesByPost();
195 $ilCtrl->redirect($this,
"view");
207 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
209 $form->setFormAction($this->ctrl->getFormAction($this));
210 $form->setTitle($this->lng->txt(
'awareness_settings'));
213 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
214 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
221 $en->setChecked($awrn_set->get(
"awrn_enabled",
false));
224 $ti =
new ilNumberInputGUI($this->lng->txt(
"awrn_caching_period"),
"caching_period");
225 $ti->
setInfo($this->lng->txt(
"awrn_caching_period_info"));
226 $ti->setSuffix($this->lng->txt(
"awrn_seconds"));
228 $ti->setMaxLength(6);
229 $ti->setValue($awrn_set->get(
"caching_period"));
230 $en->addSubItem($ti);
233 $ti =
new ilNumberInputGUI($this->lng->txt(
"awrn_max_nr_entries"),
"max_nr_entries");
234 $ti->
setInfo($this->lng->txt(
"awrn_max_nr_entries_info"));
236 $ti->setMaxLength(3);
238 $ti->setMaxValue(200);
239 $ti->setValue($awrn_set->get(
"max_nr_entries"));
240 $en->addSubItem($ti);
245 $lng->txt(
"awrn_max_inactivity"),
248 $ti_prop->
setSuffix($this->lng->txt(
"awrn_minutes"));
249 if ($pd_set->get(
"user_activity_time") > 0) {
250 $ti_prop->setValue($pd_set->get(
"user_activity_time"));
252 $ti_prop->setInfo(
$lng->txt(
"awrn_max_inactivity_info"));
253 $ti_prop->setMaxLength(3);
254 $ti_prop->setSize(3);
255 $en->addSubItem($ti_prop);
259 $osd->
setInfo($this->lng->txt(
"awrn_use_osd_info"));
260 $osd->setChecked($awrn_set->get(
"use_osd",
true));
261 $en->addSubItem($osd);
264 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserProviderFactory.php");
266 foreach ($prov as $p) {
275 $si->setInfo($p->getInfo());
276 $si->setValue($p->getActivationMode());
277 $en->addSubItem($si);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
User action administration GUI class.
editSettings($a_form=null)
Edit settings.
initFormSettings()
Init settings property form.
prepareOutput($a_show_subobjects=true)
prepare output
if(isset($_POST['submit'])) $form
Class ilObjectGUI Basic methods of all Output classes.
static getAllProviders()
Get all awareness providers.
Awareness context for user actions.
Create styles array
The data for the language used.
executeCommand()
Execute command.
setSubTabs($a_id)
Set sub tabs.
Awareness tool administration.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
saveSettings()
Save settings.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options