ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjUserTrackingGUI Class Reference
+ Inheritance diagram for ilObjUserTrackingGUI:
+ Collaboration diagram for ilObjUserTrackingGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference)
 
 executeCommand ()
 execute command More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getTabs ()
 get tabs abstract method. More...
 
 settingsObject ($a_form=null)
 display tracking settings form More...
 
 saveSettingsObject ()
 save user tracking settings More...
 
 addToExternalSettingsForm ($a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Data Fields

 $tpl = null
 
 $lng = null
 
 $ctrl = null
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initSettingsForm ()
 
 editLPDefaultsObject ($a_form=null)
 
 initLPDefaultsForm ()
 
 saveLPDefaultsObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Detailed Description

Definition at line 19 of file class.ilObjUserTrackingGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjUserTrackingGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference 
)

Definition at line 25 of file class.ilObjUserTrackingGUI.php.

26 {
27 global $DIC;
28
29 $tpl = $DIC['tpl'];
30 $lng = $DIC['lng'];
31 $ilCtrl = $DIC['ilCtrl'];
32
33 $this->type = "trac";
34 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
35
36 $this->tpl = $tpl;
37 $this->lng = $lng;
38 $this->lng->loadLanguageModule('trac');
39
40 $this->ctrl = $ilCtrl;
41 }
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7

References $DIC, $ilCtrl, $lng, and $tpl.

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjUserTrackingGUI::addToExternalSettingsForm (   $a_form_id)
Parameters
string$a_form_id
Returns
array

Definition at line 483 of file class.ilObjUserTrackingGUI.php.

484 {
485 switch ($a_form_id) {
487 $fields = array();
488
489 return array('obj_trac' => array('editLPDefaults', $fields));
490 }
491 }

References ilAdministrationSettingsFormHandler\FORM_CERTIFICATE.

◆ editLPDefaultsObject()

ilObjUserTrackingGUI::editLPDefaultsObject (   $a_form = null)
protected

Definition at line 362 of file class.ilObjUserTrackingGUI.php.

363 {
364 $this->checkPermission('read');
365
366 $this->tabs_gui->addSubTab(
367 'lp_settings',
368 $this->lng->txt('settings'),
369 $this->ctrl->getLinkTarget($this, 'settings')
370 );
371
372 $this->tabs_gui->addSubTab(
373 'lpdef',
374 $this->lng->txt('trac_defaults'),
375 $this->ctrl->getLinkTarget($this, 'editLPDefaults')
376 );
377
378 $this->tabs_gui->setTabActive('settings');
379 $this->tabs_gui->setSubTabActive('lpdef');
380
381 if (!$a_form) {
382 $a_form = $this->initLPDefaultsForm();
383 }
384
385 $this->tpl->setContent($a_form->getHTML());
386 }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References ilObjectGUI\checkPermission(), and initLPDefaultsForm().

Referenced by saveLPDefaultsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjUserTrackingGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 43 of file class.ilObjUserTrackingGUI.php.

44 {
45 $next_class = $this->ctrl->getNextClass();
46 $this->ctrl->setReturn($this, "show");
47 $this->prepareOutput();
48
49 switch ($next_class) {
50 case 'ilpermissiongui':
51 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
52 $perm_gui = new ilPermissionGUI($this);
53 $ret = &$this->ctrl->forwardCommand($perm_gui);
54 break;
55
56 case 'illearningprogressgui':
57 $this->tabs_gui->setTabActive('learning_progress');
58 include_once("./Services/Tracking/classes/class.ilLearningProgressGUI.php");
60 $ret = &$this->ctrl->forwardCommand($lp_gui);
61 break;
62
63 case 'illpobjectstatisticsgui':
64 $this->tabs_gui->setTabActive('statistics');
65 include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsGUI.php");
67 $ret = &$this->ctrl->forwardCommand($os_gui);
68 break;
69
70 case 'ilsessionstatisticsgui':
71 $this->tabs_gui->setTabActive('session_statistics');
72 include_once("./Services/Authentication/classes/class.ilSessionStatisticsGUI.php");
73 $sess_gui = new ilSessionStatisticsGUI();
74 $ret = &$this->ctrl->forwardCommand($sess_gui);
75 break;
76
77 default:
78 $cmd = $this->ctrl->getCmd();
79 if ($cmd == "view" || $cmd == "") {
80 $cmd = "settings";
81 }
82 $cmd .= "Object";
83 $this->$cmd();
84 break;
85 }
86
87 return true;
88 }
Class ilObjUserTrackingGUI.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilSessionStatisticsGUI.
$ret
Definition: parser.php:6

References $ret, ilLearningProgressBaseGUI\LP_CONTEXT_ADMINISTRATION, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjUserTrackingGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 90 of file class.ilObjUserTrackingGUI.php.

91 {
92 $this->getTabs();
93 }
getTabs()
get tabs abstract method.

References getTabs().

+ Here is the call graph for this function:

◆ getTabs()

ilObjUserTrackingGUI::getTabs ( )

get tabs abstract method.

@abstract overwrite in derived GUI class of your object type @access public

Parameters
objectinstance of ilTabsGUI

Reimplemented from ilObjectGUI.

Definition at line 95 of file class.ilObjUserTrackingGUI.php.

96 {
97 $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
98
99 $this->tabs_gui->addTarget(
100 "settings",
101 $this->ctrl->getLinkTarget($this, "settings"),
102 "settings",
103 get_class($this)
104 );
105
106 if ($this->checkPermissionBool("read")) {
108 $this->tabs_gui->addTarget(
109 "statistics",
110 $this->ctrl->getLinkTargetByClass(
111 "illpobjectstatisticsgui",
112 "access"
113 ),
114 "",
115 "illpobjectstatisticsgui"
116 );
117 }
118
120 $this->tabs_gui->addTarget(
121 "learning_progress",
122 $this->ctrl->getLinkTargetByClass(
123 "illearningprogressgui",
124 "show"
125 ),
126 "",
127 "illearningprogressgui"
128 );
129 }
130
131 // session statistics
133 $this->tabs_gui->addTarget(
134 "session_statistics",
135 $this->ctrl->getLinkTargetByClass(
136 "ilsessionstatisticsgui",
137 ""
138 ),
139 "",
140 "ilsessionstatisticsgui"
141 );
142 }
143 }
144
145 if ($this->checkPermissionBool("edit_permission")) {
146 $this->tabs_gui->addTarget(
147 "perm_settings",
148 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
149 array("perm","info","owner"),
150 'ilpermissiongui'
151 );
152 }
153 }
static _enabledObjectStatistics()
check wether object statistics is enabled or not
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _enabledSessionStatistics()
check wether session statistics is enabled or not
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.

References ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledObjectStatistics(), ilObjUserTracking\_enabledSessionStatistics(), and ilObjectGUI\checkPermissionBool().

Referenced by getAdminTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initLPDefaultsForm()

ilObjUserTrackingGUI::initLPDefaultsForm ( )
protected

Definition at line 388 of file class.ilObjUserTrackingGUI.php.

389 {
390 global $DIC;
391
392 $objDefinition = $DIC['objDefinition'];
393
394 include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
395 $form = new ilPropertyFormGUI();
396 $form->setFormAction($this->ctrl->getFormAction($this));
397 $form->setTitle($this->lng->txt('trac_defaults'));
398 $form->setDescription($this->lng->txt('trac_defaults_info'));
399
400 include_once "Services/Object/classes/class.ilObjectLP.php";
401 include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
402
403 $types = array();
404 foreach ($objDefinition->getAllRepositoryTypes() as $type) {
406 $types[$type] = array(
407 "type" => $type,
408 "caption" => $this->lng->txt("obj_" . $type)
409 );
410 }
411 }
412 $types = ilUtil::sortArray($types, "caption", "asc");
413 foreach ($types as $item) {
414 $class = ilObjectLP::getTypeClass($item["type"]);
415 $modes = $class::getDefaultModes(ilObjUserTracking::_enabledLearningProgress());
416 if (sizeof($modes) > 1) {
417 $def_type = new ilSelectInputGUI($item["caption"], "def_" . $item["type"]);
418 $form->addItem($def_type);
419
420 $def_type->setRequired(true);
421 $def_type->setValue(ilObjectLP::getTypeDefault($item["type"]));
422
423 $options = array();
424 foreach ($modes as $mode) {
425 $caption = ($mode == ilLPObjSettings::LP_MODE_DEACTIVATED)
426 ? $this->lng->txt("trac_defaults_inactive")
428 $options[$mode] = $caption;
429 }
430 $def_type->setOptions($options);
431 }
432 }
433
434 if ($this->checkPermissionBool("write")) {
435 $form->addCommandButton('saveLPDefaults', $this->lng->txt('save'));
436 } else {
437 foreach ($types as $item) {
438 $form->getItemByPostVar("def_" . $item["type"])->setDisabled(true);
439 }
440 }
441
442 return $form;
443 }
static _mode2Text($a_mode)
static isSupportedObjectType($a_type)
static getTypeClass($a_type)
static getTypeDefault($a_type)
Get current type default.
This class represents a property form user interface.
This class represents a selection list property in a property form.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
$type
if(isset($_POST['submit'])) $form

References $DIC, $form, ilObjectGUI\$objDefinition, PHPMailer\PHPMailer\$options, $type, ilObjUserTracking\_enabledLearningProgress(), ilLPObjSettings\_mode2Text(), ilObjectGUI\checkPermissionBool(), ilObjectLP\getTypeClass(), ilObjectLP\getTypeDefault(), ilObjectLP\isSupportedObjectType(), ilLPObjSettings\LP_MODE_DEACTIVATED, and ilUtil\sortArray().

Referenced by editLPDefaultsObject(), and saveLPDefaultsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjUserTrackingGUI::initSettingsForm ( )
protected

Definition at line 187 of file class.ilObjUserTrackingGUI.php.

188 {
189 include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
190 $form = new ilPropertyFormGUI();
191 $form->setFormAction($this->ctrl->getFormAction($this));
192 $form->setTitle($this->lng->txt('tracking_settings'));
193
194 $activate = new ilCheckboxGroupInputGUI($this->lng->txt('activate_tracking'));
195 $form->addItem($activate);
196
197 // learning progress
198 $lp = new ilCheckboxInputGUI($this->lng->txt('trac_learning_progress'), 'learning_progress_tracking');
199 if ($this->object->enabledLearningProgress()) {
200 $lp->setChecked(true);
201 }
202 $activate->addSubItem($lp);
203
204
205 // lp settings
206
207 /*
208 $desktop = new ilCheckboxInputGUI($this->lng->txt('trac_lp_on_personal_desktop'), 'lp_desktop');
209 $desktop->setInfo($this->lng->txt('trac_lp_on_personal_desktop_info'));
210 $desktop->setChecked($this->object->hasLearningProgressDesktop());
211 $lp->addSubItem($desktop);
212 */
213
214 $learner = new ilCheckboxInputGUI($this->lng->txt('trac_lp_learner_access'), 'lp_learner');
215 $learner->setInfo($this->lng->txt('trac_lp_learner_access_info'));
216 $learner->setChecked($this->object->hasLearningProgressLearner());
217 $lp->addSubItem($learner);
218
219
220 // extended data
221
222 $extdata = new ilCheckboxGroupInputGUI($this->lng->txt('trac_learning_progress_settings_info'), 'lp_extdata');
223 $extdata->addOption(new ilCheckboxOption($this->lng->txt('trac_first_and_last_access'), 'lp_access'));
224 $extdata->addOption(new ilCheckboxOption($this->lng->txt('trac_read_count'), 'lp_count'));
225 $extdata->addOption(new ilCheckboxOption($this->lng->txt('trac_spent_seconds'), 'lp_spent'));
226 $lp->addSubItem($extdata);
227
228 $ext_value = array();
229 if ($this->object->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_LAST_ACCESS)) {
230 $ext_value[] = 'lp_access';
231 }
232 if ($this->object->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_READ_COUNT)) {
233 $ext_value[] = 'lp_count';
234 }
235 if ($this->object->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_SPENT_SECONDS)) {
236 $ext_value[] = 'lp_spent';
237 }
238 $extdata->setValue($ext_value);
239
240 $listgui = new ilCheckboxInputGUI($this->lng->txt('trac_lp_list_gui'), 'lp_list');
241 $listgui->setInfo($this->lng->txt('trac_lp_list_gui_info'));
242 $listgui->setChecked($this->object->hasLearningProgressListGUI());
243 $lp->addSubItem($listgui);
244
245 /* => REPOSITORY
246 // change event
247 $event = new ilCheckboxInputGUI($this->lng->txt('trac_repository_changes'), 'change_event_tracking');
248 if($this->object->enabledChangeEventTracking())
249 {
250 $event->setChecked(true);
251 }
252 $activate->addSubItem($event);
253 */
254
255 // object statistics
256 $objstat = new ilCheckboxInputGUI($this->lng->txt('trac_object_statistics'), 'object_statistics');
257 if ($this->object->enabledObjectStatistics()) {
258 $objstat->setChecked(true);
259 }
260 $activate->addSubItem($objstat);
261
262 // session statistics
263 $sessstat = new ilCheckboxInputGUI($this->lng->txt('session_statistics'), 'session_statistics');
264 if ($this->object->enabledSessionStatistics()) {
265 $sessstat->setChecked(true);
266 }
267 $activate->addSubItem($sessstat);
268
269 // Anonymized
270 $user = new ilCheckboxInputGUI($this->lng->txt('trac_anonymized'), 'user_related');
271 $user->setInfo($this->lng->txt('trac_anonymized_info'));
272 $user->setChecked(!$this->object->enabledUserRelatedData());
273 $form->addItem($user);
274
275 // Max time gap
276 $valid = new ilNumberInputGUI($this->lng->txt('trac_valid_request'), 'valid_request');
277 $valid->setMaxLength(4);
278 $valid->setSize(4);
279 $valid->setSuffix($this->lng->txt('seconds'));
280 $valid->setInfo($this->lng->txt('info_valid_request'));
281 $valid->setValue($this->object->getValidTimeSpan());
282 $valid->setMinValue(1);
283 $valid->setMaxValue(9999);
284 $valid->setRequired(true);
285 $form->addItem($valid);
286
287 include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
290 $form,
291 $this
292 );
293
294 // #12259
295 if ($this->checkPermissionBool("write")) {
296 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
297 } else {
298 $lp->setDisabled(true);
299 $learner->setDisabled(true);
300 $extdata->setDisabled(true);
301 $listgui->setDisabled(true);
302 $objstat->setDisabled(true);
303 $user->setDisabled(true);
304 $valid->setDisabled(true);
305 }
306
307 return $form;
308 }
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
This class represents a property in a property form.
This class represents a checkbox property in a property form.
This class represents an option in a checkbox group.
This class represents a number property in a property form.
$valid

References $form, ilObjectGUI\$user, $valid, ilAdministrationSettingsFormHandler\addFieldsToForm(), ilObjectGUI\checkPermissionBool(), ilObjUserTracking\EXTENDED_DATA_LAST_ACCESS, ilObjUserTracking\EXTENDED_DATA_READ_COUNT, ilObjUserTracking\EXTENDED_DATA_SPENT_SECONDS, and ilAdministrationSettingsFormHandler\FORM_LP.

Referenced by saveSettingsObject(), and settingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveLPDefaultsObject()

ilObjUserTrackingGUI::saveLPDefaultsObject ( )
protected

Definition at line 445 of file class.ilObjUserTrackingGUI.php.

446 {
447 global $DIC;
448
449 $objDefinition = $DIC['objDefinition'];
450
451 $this->checkPermission('write');
452
453 $form = $this->initLPDefaultsForm();
454 if ($form->checkInput()) {
455 include_once "Services/Object/classes/class.ilObjectLP.php";
456 include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
457
458 $res = array();
459 foreach ($objDefinition->getAllRepositoryTypes() as $type) {
461 $mode = $form->getInput("def_" . $type);
462 $res[$type] = $mode
463 ? $mode
465 }
466 }
467
469
470 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
471 $this->ctrl->redirect($this, "editLPDefaults");
472 }
473
474 $form->setValuesByPost();
476 return false;
477 }
static saveTypeDefaults(array $a_data)
foreach($_POST as $key=> $value) $res

References $DIC, $form, ilObjectGUI\$objDefinition, $res, $type, ilObjectGUI\checkPermission(), editLPDefaultsObject(), initLPDefaultsForm(), ilObjectLP\isSupportedObjectType(), ilLPObjSettings\LP_MODE_DEACTIVATED, and ilObjectLP\saveTypeDefaults().

+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjUserTrackingGUI::saveSettingsObject ( )

save user tracking settings

Definition at line 313 of file class.ilObjUserTrackingGUI.php.

314 {
315 $this->checkPermission('write');
316
317 $form = $this->initSettingsForm();
318 if ($form->checkInput()) {
319 $lp_active = $form->getInput('learning_progress_tracking');
320
321 $this->object->enableLearningProgress($lp_active);
322
323 if ($lp_active) {
324 $ext_data = (array) $form->getInput("lp_extdata");
325 $code = 0;
326 if (in_array('lp_access', $ext_data)) {
328 }
329 if (in_array('lp_count', $ext_data)) {
331 }
332 if (in_array('lp_spent', $ext_data)) {
334 }
335 $this->object->setExtendedData($code);
336 }
337
338 $this->object->enableChangeEventTracking($form->getInput('change_event_tracking'));
339 $this->object->enableObjectStatistics($form->getInput('object_statistics'));
340 $this->object->enableUserRelatedData(!$form->getInput('user_related'));
341 $this->object->setValidTimeSpan($form->getInput('valid_request'));
342 // $this->object->setLearningProgressDesktop($form->getInput('lp_desktop'));
343 $this->object->setLearningProgressLearner($form->getInput('lp_learner'));
344 $this->object->enableSessionStatistics($form->getInput('session_statistics'));
345 $this->object->setLearningProgressListGUI($form->getInput('lp_list'));
346 $this->object->updateSettings();
347
348 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
349 $this->ctrl->redirect($this, "settings");
350 }
351
352 $form->setValuesByPost();
353 $this->settingsObject($form);
354 return false;
355 }
settingsObject($a_form=null)
display tracking settings form
$code
Definition: example_050.php:99

References $code, $form, ilObjectGUI\checkPermission(), ilObjUserTracking\EXTENDED_DATA_LAST_ACCESS, ilObjUserTracking\EXTENDED_DATA_READ_COUNT, ilObjUserTracking\EXTENDED_DATA_SPENT_SECONDS, initSettingsForm(), and settingsObject().

+ Here is the call graph for this function:

◆ settingsObject()

ilObjUserTrackingGUI::settingsObject (   $a_form = null)

display tracking settings form

Definition at line 159 of file class.ilObjUserTrackingGUI.php.

160 {
161 $this->checkPermission('read');
162
163 $this->tabs_gui->addSubTab(
164 'lp_settings',
165 $this->lng->txt('settings'),
166 $this->ctrl->getLinkTarget($this, 'settings')
167 );
168
170 $this->tabs_gui->addSubTab(
171 'lpdef',
172 $this->lng->txt('trac_defaults'),
173 $this->ctrl->getLinkTarget($this, 'editLPDefaults')
174 );
175 }
176
177 $this->tabs_gui->setTabActive('settings');
178 $this->tabs_gui->setSubTabActive('lp_settings');
179
180 if (!$a_form) {
181 $a_form = $this->initSettingsForm();
182 }
183
184 $this->tpl->setContent($a_form->getHTML());
185 }

References ilObjUserTracking\_enabledLearningProgress(), ilObjectGUI\checkPermission(), and initSettingsForm().

Referenced by saveSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilObjUserTrackingGUI::$ctrl = null

Definition at line 23 of file class.ilObjUserTrackingGUI.php.

◆ $lng

ilObjUserTrackingGUI::$lng = null

Definition at line 22 of file class.ilObjUserTrackingGUI.php.

Referenced by __construct().

◆ $tpl

ilObjUserTrackingGUI::$tpl = null

Definition at line 21 of file class.ilObjUserTrackingGUI.php.

Referenced by __construct().


The documentation for this class was generated from the following file: