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::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
28 $this->lng->loadLanguageModule(
"awrn");
29 $this->lng->loadLanguageModule(
"pd");
40 $next_class = $this->ctrl->getNextClass($this);
41 $cmd = $this->ctrl->getCmd();
47 case 'ilpermissiongui':
48 $this->tabs_gui->setTabActive(
'perm_settings');
49 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
51 $this->ctrl->forwardCommand($perm_gui);
57 $cmd =
"editSettings";
73 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
75 $this->tabs_gui->addTab(
"settings",
76 $this->lng->txt(
"settings"),
77 $this->ctrl->getLinkTarget($this,
"editSettings"));
80 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
82 $this->tabs_gui->addTab(
"perm_settings",
83 $this->lng->txt(
"perm_settings"),
84 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"));
94 $this->tabs_gui->setTabActive(
'settings');
100 $this->tpl->setContent($a_form->getHTML());
114 if($form->checkInput())
117 $awrn_set->set(
"awrn_enabled", (
bool) $form->getInput(
"enable_awareness"));
119 $p = (int) $form->getInput(
"caching_period");
124 $awrn_set->set(
"caching_period", $p);
126 $awrn_set->set(
"max_nr_entries", (
int) $form->getInput(
"max_nr_entries"));
129 $pd_set->set(
"user_activity_time", (
int)
$_POST[
"time_removal"]);
131 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserProviderFactory.php");
133 foreach ($prov as $p)
135 $p->setActivationMode($form->getInput(
"up_act_mode_".$p->getProviderId()));
139 $ilCtrl->redirect($this,
"editSettings");
142 $form->setValuesByPost();
153 $ilCtrl->redirect($this,
"view");
165 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
167 $form->setFormAction($this->ctrl->getFormAction($this));
168 $form->setTitle($this->lng->txt(
'awareness_settings'));
169 $form->addCommandButton(
'saveSettings',$this->lng->txt(
'save'));
170 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
176 $en->setChecked($awrn_set->get(
"awrn_enabled",
false));
179 $ti =
new ilNumberInputGUI($this->lng->txt(
"awrn_caching_period"),
"caching_period");
180 $ti->
setInfo($this->lng->txt(
"awrn_caching_period_info"));
181 $ti->setSuffix($this->lng->txt(
"awrn_seconds"));
183 $ti->setMaxLength(6);
184 $ti->setValue($awrn_set->get(
"caching_period"));
185 $en->addSubItem($ti);
188 $ti =
new ilNumberInputGUI($this->lng->txt(
"awrn_max_nr_entries"),
"max_nr_entries");
189 $ti->
setInfo($this->lng->txt(
"awrn_max_nr_entries_info"));
191 $ti->setMaxLength(3);
193 $ti->setMaxValue(200);
194 $ti->setValue($awrn_set->get(
"max_nr_entries"));
195 $en->addSubItem($ti);
201 $ti_prop->
setSuffix($this->lng->txt(
"awrn_minutes"));
202 if ($pd_set->get(
"user_activity_time") > 0)
204 $ti_prop->setValue($pd_set->get(
"user_activity_time"));
206 $ti_prop->setInfo($lng->txt(
"awrn_max_inactivity_info"));
207 $ti_prop->setMaxLength(3);
208 $ti_prop->setSize(3);
209 $en->addSubItem($ti_prop);
212 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserProviderFactory.php");
214 foreach ($prov as $p)
224 $si->setInfo($p->getInfo());
225 $si->setValue($p->getActivationMode());
226 $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.
editSettings($a_form=null)
Edit settings.
initFormSettings()
Init settings property form.
if(!is_array($argv)) $options
Class ilObjectGUI Basic methods of all Output classes.
static getAllProviders()
Get all awareness providers.
prepareOutput()
prepare output
executeCommand()
Execute command.
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.