3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
23 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
26 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
28 $this->lng->loadLanguageModule(
"awrn");
29 $this->lng->loadLanguageModule(
"pd");
30 $this->lng->loadLanguageModule(
"usr");
41 $next_class = $this->ctrl->getNextClass($this);
42 $cmd = $this->ctrl->getCmd();
48 case 'iluseractionadmingui':
49 include_once(
"./Services/User/Actions/classes/class.ilUserActionAdminGUI.php");
51 $this->tabs_gui->setTabActive(
'settings');
53 $this->ctrl->forwardCommand($gui);
56 case 'ilpermissiongui':
57 $this->tabs_gui->setTabActive(
'perm_settings');
58 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
60 $this->ctrl->forwardCommand($perm_gui);
66 $cmd =
"editSettings";
82 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
84 $this->tabs_gui->addTab(
"settings",
85 $this->lng->txt(
"settings"),
86 $this->ctrl->getLinkTarget($this,
"editSettings"));
89 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
91 $this->tabs_gui->addTab(
"perm_settings",
92 $this->lng->txt(
"perm_settings"),
93 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"));
105 $this->tabs_gui->addSubTab(
"settings",
106 $this->lng->txt(
"settings"),
107 $this->ctrl->getLinkTarget($this,
"editSettings"));
109 $this->tabs_gui->addSubTab(
"actions",
110 $this->lng->txt(
"user_actions"),
111 $this->ctrl->getLinkTargetByClass(
"iluseractionadmingui"));
113 $this->tabs_gui->activateSubTab($a_id);
122 $this->tabs_gui->setTabActive(
'settings');
129 $this->tpl->setContent($a_form->getHTML());
143 if($form->checkInput())
146 $awrn_set->set(
"awrn_enabled", (
bool) $form->getInput(
"enable_awareness"));
148 $p = (int) $form->getInput(
"caching_period");
153 $awrn_set->set(
"caching_period", $p);
155 $awrn_set->set(
"max_nr_entries", (
int) $form->getInput(
"max_nr_entries"));
156 $awrn_set->set(
"use_osd", (
int) $form->getInput(
"use_osd"));
159 $pd_set->set(
"user_activity_time", (
int)
$_POST[
"time_removal"]);
161 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserProviderFactory.php");
163 foreach ($prov as $p)
165 $p->setActivationMode($form->getInput(
"up_act_mode_".$p->getProviderId()));
169 $ilCtrl->redirect($this,
"editSettings");
172 $form->setValuesByPost();
183 $ilCtrl->redirect($this,
"view");
195 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
197 $form->setFormAction($this->ctrl->getFormAction($this));
198 $form->setTitle($this->lng->txt(
'awareness_settings'));
199 $form->addCommandButton(
'saveSettings',$this->lng->txt(
'save'));
200 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
206 $en->setChecked($awrn_set->get(
"awrn_enabled",
false));
209 $ti =
new ilNumberInputGUI($this->lng->txt(
"awrn_caching_period"),
"caching_period");
210 $ti->
setInfo($this->lng->txt(
"awrn_caching_period_info"));
211 $ti->setSuffix($this->lng->txt(
"awrn_seconds"));
213 $ti->setMaxLength(6);
214 $ti->setValue($awrn_set->get(
"caching_period"));
215 $en->addSubItem($ti);
218 $ti =
new ilNumberInputGUI($this->lng->txt(
"awrn_max_nr_entries"),
"max_nr_entries");
219 $ti->
setInfo($this->lng->txt(
"awrn_max_nr_entries_info"));
221 $ti->setMaxLength(3);
223 $ti->setMaxValue(200);
224 $ti->setValue($awrn_set->get(
"max_nr_entries"));
225 $en->addSubItem($ti);
231 $ti_prop->
setSuffix($this->lng->txt(
"awrn_minutes"));
232 if ($pd_set->get(
"user_activity_time") > 0)
234 $ti_prop->setValue($pd_set->get(
"user_activity_time"));
236 $ti_prop->setInfo($lng->txt(
"awrn_max_inactivity_info"));
237 $ti_prop->setMaxLength(3);
238 $ti_prop->setSize(3);
239 $en->addSubItem($ti_prop);
243 $osd->
setInfo($this->lng->txt(
"awrn_use_osd_info"));
244 $osd->setChecked($awrn_set->get(
"use_osd",
true));
245 $en->addSubItem($osd);
248 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserProviderFactory.php");
250 foreach ($prov as $p)
260 $si->setInfo($p->getInfo());
261 $si->setValue($p->getActivationMode());
262 $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(!is_array($argv)) $options
Class ilObjectGUI Basic methods of all Output classes.
static getAllProviders()
Get all awareness providers.
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.