4 include_once
"./Services/Object/classes/class.ilObjectGUI.php";
30 parent::__construct($a_data,$a_id,$a_call_by_reference,
false);
34 $this->lng->loadLanguageModule(
'trac');
41 $next_class = $this->ctrl->getNextClass();
42 $this->ctrl->setReturn($this,
"show");
47 case 'ilpermissiongui':
48 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
50 $ret =& $this->ctrl->forwardCommand($perm_gui);
53 case 'illearningprogressgui':
54 $this->tabs_gui->setTabActive(
'learning_progress');
55 include_once(
"./Services/Tracking/classes/class.ilLearningProgressGUI.php");
57 $ret =& $this->ctrl->forwardCommand($lp_gui);
60 case 'illpobjectstatisticsgui':
61 $this->tabs_gui->setTabActive(
'statistics');
62 include_once(
"./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsGUI.php");
64 $ret =& $this->ctrl->forwardCommand($os_gui);
67 case 'ilsessionstatisticsgui':
68 $this->tabs_gui->setTabActive(
'session_statistics');
69 include_once(
"./Services/Authentication/classes/class.ilSessionStatisticsGUI.php");
71 $ret =& $this->ctrl->forwardCommand($sess_gui);
75 $cmd = $this->ctrl->getCmd();
95 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
97 $this->tabs_gui->addTarget(
"settings",
98 $this->ctrl->getLinkTarget($this,
"settings"),
106 $this->tabs_gui->addTarget(
"statistics",
107 $this->ctrl->getLinkTargetByClass(
"illpobjectstatisticsgui",
110 "illpobjectstatisticsgui");
115 $this->tabs_gui->addTarget(
"learning_progress",
116 $this->ctrl->getLinkTargetByClass(
"illearningprogressgui",
119 "illearningprogressgui");
125 $this->tabs_gui->addTarget(
"session_statistics",
126 $this->ctrl->getLinkTargetByClass(
"ilsessionstatisticsgui",
129 "ilsessionstatisticsgui");
135 $this->tabs_gui->addTarget(
"perm_settings",
136 $this->ctrl->getLinkTargetByClass(
array(get_class($this),
'ilpermissiongui'),
"perm"),
137 array(
"perm",
"info",
"owner"),
150 $this->tabs_gui->addSubTab(
'lp_settings',
151 $this->lng->txt(
'settings'),
152 $this->ctrl->getLinkTarget($this,
'settings'));
156 $this->tabs_gui->addSubTab(
'lpdef',
157 $this->lng->txt(
'trac_defaults'),
158 $this->ctrl->getLinkTarget($this,
'editLPDefaults'));
161 $this->tabs_gui->setTabActive(
'settings');
162 $this->tabs_gui->setSubTabActive(
'lp_settings');
169 $this->tpl->setContent($a_form->getHTML());
174 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
176 $form->setFormAction($this->ctrl->getFormAction($this));
177 $form->setTitle($this->lng->txt(
'tracking_settings'));
180 $form->addItem($activate);
183 $lp =
new ilCheckboxInputGUI($this->lng->txt(
'trac_learning_progress'),
'learning_progress_tracking');
184 if($this->
object->enabledLearningProgress())
188 $activate->addSubItem($lp);
200 $learner =
new ilCheckboxInputGUI($this->lng->txt(
'trac_lp_learner_access'),
'lp_learner');
201 $learner->
setInfo($this->lng->txt(
'trac_lp_learner_access_info'));
202 $learner->setChecked($this->
object->hasLearningProgressLearner());
203 $lp->addSubItem($learner);
210 $extdata->addOption(
new ilCheckboxOption($this->lng->txt(
'trac_read_count'),
'lp_count'));
211 $extdata->addOption(
new ilCheckboxOption($this->lng->txt(
'trac_spent_seconds'),
'lp_spent'));
212 $lp->addSubItem($extdata);
214 $ext_value =
array();
217 $ext_value[] =
'lp_access';
221 $ext_value[] =
'lp_count';
225 $ext_value[] =
'lp_spent';
227 $extdata->setValue($ext_value);
230 $listgui->
setInfo($this->lng->txt(
'trac_lp_list_gui_info'));
231 $listgui->setChecked($this->
object->hasLearningProgressListGUI());
232 $lp->addSubItem($listgui);
245 $objstat =
new ilCheckboxInputGUI($this->lng->txt(
'trac_object_statistics'),
'object_statistics');
246 if($this->
object->enabledObjectStatistics())
250 $activate->addSubItem($objstat);
253 $sessstat =
new ilCheckboxInputGUI($this->lng->txt(
'session_statistics'),
'session_statistics');
254 if($this->
object->enabledSessionStatistics())
258 $activate->addSubItem($sessstat);
262 $user->
setInfo($this->lng->txt(
'trac_anonymized_info'));
263 $user->setChecked(!$this->
object->enabledUserRelatedData());
264 $form->addItem($user);
270 $valid->setSuffix($this->lng->txt(
'seconds'));
271 $valid->setInfo($this->lng->txt(
'info_valid_request'));
274 $valid->setMaxValue(9999);
275 $valid->setRequired(
true);
278 include_once
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
288 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
292 $lp->setDisabled(
true);
293 $learner->setDisabled(
true);
294 $extdata->setDisabled(
true);
295 $listgui->setDisabled(
true);
296 $objstat->setDisabled(
true);
297 $user->setDisabled(
true);
298 $valid->setDisabled(
true);
312 if($form->checkInput())
314 $lp_active = $form->getInput(
'learning_progress_tracking');
316 $this->
object->enableLearningProgress($lp_active);
320 $ext_data = (
array)$form->getInput(
"lp_extdata");
322 if(in_array(
'lp_access', $ext_data))
326 if(in_array(
'lp_count', $ext_data))
330 if(in_array(
'lp_spent', $ext_data))
334 $this->
object->setExtendedData(
$code);
337 $this->
object->enableChangeEventTracking($form->getInput(
'change_event_tracking'));
338 $this->
object->enableObjectStatistics($form->getInput(
'object_statistics'));
339 $this->
object->enableUserRelatedData(!$form->getInput(
'user_related'));
340 $this->
object->setValidTimeSpan($form->getInput(
'valid_request'));
342 $this->
object->setLearningProgressLearner($form->getInput(
'lp_learner'));
343 $this->
object->enableSessionStatistics($form->getInput(
'session_statistics'));
344 $this->
object->setLearningProgressListGUI($form->getInput(
'lp_list'));
345 $this->
object->updateSettings();
348 $this->ctrl->redirect($this,
"settings");
351 $form->setValuesByPost();
365 $this->tabs_gui->addSubTab(
'lp_settings',
366 $this->lng->txt(
'settings'),
367 $this->ctrl->getLinkTarget($this,
'settings'));
369 $this->tabs_gui->addSubTab(
'lpdef',
370 $this->lng->txt(
'trac_defaults'),
371 $this->ctrl->getLinkTarget($this,
'editLPDefaults'));
373 $this->tabs_gui->setTabActive(
'settings');
374 $this->tabs_gui->setSubTabActive(
'lpdef');
381 $this->tpl->setContent($a_form->getHTML());
388 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
390 $form->setFormAction($this->ctrl->getFormAction($this));
391 $form->setTitle($this->lng->txt(
'trac_defaults'));
392 $form->setDescription($this->lng->txt(
'trac_defaults_info'));
394 include_once
"Services/Object/classes/class.ilObjectLP.php";
395 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
398 foreach($objDefinition->getAllRepositoryTypes() as $type)
402 $types[$type] =
array(
404 "caption" => $this->lng->txt(
"obj_".$type)
409 foreach($types as $item)
413 if(
sizeof($modes) > 1)
416 $form->addItem($def_type);
418 $def_type->setRequired(
true);
422 foreach($modes as $mode)
425 ? $this->lng->txt(
"trac_defaults_inactive")
435 $form->addCommandButton(
'saveLPDefaults', $this->lng->txt(
'save'));
439 foreach($types as $item)
441 $form->getItemByPostVar(
"def_".$item[
"type"])->setDisabled(
true);
455 if($form->checkInput())
457 include_once
"Services/Object/classes/class.ilObjectLP.php";
458 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
461 foreach($objDefinition->getAllRepositoryTypes() as $type)
465 $mode = $form->getInput(
"def_".$type);
475 $this->ctrl->redirect($this,
"editLPDefaults");
478 $form->setValuesByPost();
Class ilSessionStatisticsGUI.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
const EXTENDED_DATA_LAST_ACCESS
editLPDefaultsObject($a_form=null)
This class represents an option in a checkbox group.
static getTypeClass($a_type)
static _enabledObjectStatistics()
check wether object statistics is enabled or not
settingsObject($a_form=null)
display tracking settings form
static isSupportedObjectType($a_type)
const EXTENDED_DATA_READ_COUNT
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
const LP_CONTEXT_ADMINISTRATION
__construct($a_data, $a_id, $a_call_by_reference)
static getTypeDefault($a_type)
Get current type default.
prepareOutput($a_show_subobjects=true)
prepare output
static _enabledLearningProgress()
check wether learing progress is enabled or not
if(!is_array($argv)) $options
Class ilObjectGUI Basic methods of all Output classes.
static saveTypeDefaults(array $a_data)
Create styles array
The data for the language used.
const EXTENDED_DATA_SPENT_SECONDS
const LP_MODE_DEACTIVATED
Create new PHPExcel object
obj_idprivate
static _enabledSessionStatistics()
check wether session statistics is enabled or not
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
Class ilObjUserTrackingGUI.
saveSettingsObject()
save user tracking settings
static _mode2Text($a_mode)