ILIAS  release_8 Revision v8.24
ilObjUserTrackingGUI Class Reference
+ Inheritance diagram for ilObjUserTrackingGUI:
+ Collaboration diagram for ilObjUserTrackingGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference, bool $prepare_output)
 
 executeCommand ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 settingsObject (?ilPropertyFormGUI $a_form=null)
 
 saveSettingsObject ()
 
 addToExternalSettingsForm (int $a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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 More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 initSettingsForm ()
 
 editLPDefaultsObject (?ilPropertyFormGUI $a_form=null)
 
 initLPDefaultsForm ()
 
 saveLPDefaultsObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilErrorHandling $error
 
ilObjectDefinition $objectDefinition
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilObjUserTrackingGUI::__construct (   $data,
int  $id,
bool  $call_by_reference,
bool  $prepare_output 
)
Parameters
mixed$data
int$id
bool$call_by_reference
bool$prepare_output
Exceptions
ilCtrlException

Reimplemented from ilObjectGUI.

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

24 {
25 global $DIC;
26
27 $this->error = $DIC['ilErr'];
28 $this->objectDefinition = $DIC['objDefinition'];
29
30 $this->type = "trac";
31 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
32 $this->lng->loadLanguageModule('trac');
33 }
error(string $a_errmsg)
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), error(), ILIAS\Repository\lng(), and ILIAS\Repository\objectDefinition().

+ Here is the call graph for this function:

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjUserTrackingGUI::addToExternalSettingsForm ( int  $a_form_id)

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

502 : array
503 {
504 switch ($a_form_id) {
506 $fields = array();
507 return array('obj_trac' => array('editLPDefaults', $fields));
508 }
509 return [];
510 }

References ilAdministrationSettingsFormHandler\FORM_CERTIFICATE.

◆ editLPDefaultsObject()

ilObjUserTrackingGUI::editLPDefaultsObject ( ?ilPropertyFormGUI  $a_form = null)
protected

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

392 : void {
393 $this->checkPermission('read');
394
395 $this->tabs_gui->addSubTab(
396 'lp_settings',
397 $this->lng->txt('settings'),
398 $this->ctrl->getLinkTarget($this, 'settings')
399 );
400
401 $this->tabs_gui->addSubTab(
402 'lpdef',
403 $this->lng->txt('trac_defaults'),
404 $this->ctrl->getLinkTarget($this, 'editLPDefaults')
405 );
406
407 $this->tabs_gui->setTabActive('settings');
408 $this->tabs_gui->setSubTabActive('lpdef');
409
410 if (!$a_form) {
411 $a_form = $this->initLPDefaultsForm();
412 }
413
414 $this->tpl->setContent($a_form->getHTML());
415 }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References initLPDefaultsForm().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjUserTrackingGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

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

35 : void
36 {
37 $next_class = $this->ctrl->getNextClass();
38 $this->ctrl->setReturn($this, "show");
39 $this->prepareOutput();
40
41 switch ($next_class) {
42 case 'ilpermissiongui':
43 $perm_gui = new ilPermissionGUI($this);
44 $this->ctrl->forwardCommand($perm_gui);
45 break;
46
47 case 'illearningprogressgui':
48 $this->tabs_gui->setTabActive('learning_progress');
49 $lp_gui = new ilLearningProgressGUI(
51 );
52 $this->ctrl->forwardCommand($lp_gui);
53 break;
54
55 case 'illpobjectstatisticsgui':
56 $this->tabs_gui->activateTab('statistics');
57 $os_gui = new ilLPObjectStatisticsGUI(
59 );
60 $this->ctrl->forwardCommand($os_gui);
61 break;
62
63 case 'ilsessionstatisticsgui':
64 $this->tabs_gui->setTabActive('session_statistics');
65 $sess_gui = new ilSessionStatisticsGUI();
66 $this->ctrl->forwardCommand($sess_gui);
67 break;
68
69 default:
70 $cmd = $this->ctrl->getCmd();
71 if ($cmd == "view" || $cmd == "") {
72 $cmd = "settings";
73 }
74 $cmd .= "Object";
75 $this->$cmd();
76 break;
77 }
78 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareOutput(bool $show_sub_objects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.

References ILIAS\Repository\ctrl(), 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 80 of file class.ilObjUserTrackingGUI.php.

80 : void
81 {
82 $this->getTabs();
83 }
getTabs()
@abstract overwrite in derived GUI class of your object type

References getTabs().

+ Here is the call graph for this function:

◆ getTabs()

ilObjUserTrackingGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

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

85 : void
86 {
87 $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
88
89 $this->tabs_gui->addTarget(
90 "settings",
91 $this->ctrl->getLinkTarget($this, "settings"),
92 "settings",
93 get_class($this)
94 );
95
96 if ($this->rbac_system->checkAccess("visible,read", $this->ref_id)) {
98 $this->tabs_gui->addTarget(
99 "statistics",
100 $this->ctrl->getLinkTargetByClass(
101 "illpobjectstatisticsgui",
102 "access"
103 ),
104 "",
105 "illpobjectstatisticsgui"
106 );
107 }
108
110 $this->tabs_gui->addTarget(
111 "learning_progress",
112 $this->ctrl->getLinkTargetByClass(
113 "illearningprogressgui",
114 "show"
115 ),
116 "",
117 "illearningprogressgui"
118 );
119 }
120
121 // session statistics
123 $this->tabs_gui->addTarget(
124 "session_statistics",
125 $this->ctrl->getLinkTargetByClass(
126 "ilsessionstatisticsgui",
127 ""
128 ),
129 "",
130 "ilsessionstatisticsgui"
131 );
132 }
133 }
134
135 if ($this->checkPermissionBool("edit_permission")) {
136 $this->tabs_gui->addTarget(
137 "perm_settings",
138 $this->ctrl->getLinkTargetByClass(
139 array(get_class($this), 'ilpermissiongui'),
140 "perm"
141 ),
142 array("perm", "info", "owner"),
143 'ilpermissiongui'
144 );
145 }
146 }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

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

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 417 of file class.ilObjUserTrackingGUI.php.

418 {
419 $form = new ilPropertyFormGUI();
420 $form->setFormAction($this->ctrl->getFormAction($this));
421 $form->setTitle($this->lng->txt('trac_defaults'));
422 $form->setDescription($this->lng->txt('trac_defaults_info'));
423
424 $types = array();
425 foreach ($this->objectDefinition->getAllRepositoryTypes() as $type) {
427 $types[$type] = array(
428 "type" => $type,
429 "caption" => $this->lng->txt("obj_" . $type)
430 );
431 }
432 }
433 $types = ilArrayUtil::sortArray($types, "caption", "asc");
434 foreach ($types as $item) {
435 $class = ilObjectLP::getTypeClass($item["type"]);
436 $modes = $class::getDefaultModes(
438 );
439 if (sizeof($modes) > 1) {
440 $def_type = new ilSelectInputGUI(
441 $item["caption"],
442 "def_" . $item["type"]
443 );
444 $form->addItem($def_type);
445
446 $def_type->setRequired(true);
447 $def_type->setValue(ilObjectLP::getTypeDefault($item["type"]));
448
449 $options = array();
450 foreach ($modes as $mode) {
451 $caption = ($mode == ilLPObjSettings::LP_MODE_DEACTIVATED)
452 ? $this->lng->txt("trac_defaults_inactive")
454 $options[$mode] = $caption;
455 }
456 $def_type->setOptions($options);
457 }
458 }
459
460 if ($this->checkPermissionBool("write")) {
461 $form->addCommandButton('saveLPDefaults', $this->lng->txt('save'));
462 } else {
463 foreach ($types as $item) {
464 $form->getItemByPostVar("def_" . $item["type"])->setDisabled(
465 true
466 );
467 }
468 }
469 return $form;
470 }
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
static _mode2Text(int $a_mode)
static getTypeDefault(string $type)
static isSupportedObjectType(string $type)
static getTypeClass(string $type)
This class represents a property form user interface.
This class represents a selection list property in a property form.

References $type, ilObjUserTracking\_enabledLearningProgress(), ilLPObjSettings\_mode2Text(), ILIAS\Repository\ctrl(), ilObjectLP\getTypeClass(), ilObjectLP\getTypeDefault(), ilObjectLP\isSupportedObjectType(), ILIAS\Repository\lng(), ilLPObjSettings\LP_MODE_DEACTIVATED, ILIAS\Repository\objectDefinition(), and ilArrayUtil\sortArray().

Referenced by editLPDefaultsObject().

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

◆ initSettingsForm()

ilObjUserTrackingGUI::initSettingsForm ( )
protected

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

185 {
186 $form = new ilPropertyFormGUI();
187 $form->setFormAction($this->ctrl->getFormAction($this));
188 $form->setTitle($this->lng->txt('tracking_settings'));
189
190 $activate = new ilCheckboxGroupInputGUI(
191 $this->lng->txt('activate_tracking')
192 );
193 $form->addItem($activate);
194
195 // learning progress
196 $lp = new ilCheckboxInputGUI(
197 $this->lng->txt('trac_learning_progress'),
198 'learning_progress_tracking'
199 );
200 if ($this->object->enabledLearningProgress()) {
201 $lp->setChecked(true);
202 }
203 $activate->addSubItem($lp);
204
205 // lp settings
206
207 $learner = new ilCheckboxInputGUI(
208 $this->lng->txt('trac_lp_learner_access'),
209 'lp_learner'
210 );
211 $learner->setInfo($this->lng->txt('trac_lp_learner_access_info'));
212 $learner->setChecked($this->object->hasLearningProgressLearner());
213 $lp->addSubItem($learner);
214
215 // extended data
216
217 $extdata = new ilCheckboxGroupInputGUI(
218 $this->lng->txt('trac_learning_progress_settings_info'),
219 'lp_extdata'
220 );
221 $extdata->addOption(
223 $this->lng->txt('trac_first_and_last_access'),
224 'lp_access'
225 )
226 );
227 $extdata->addOption(
228 new ilCheckboxOption($this->lng->txt('trac_read_count'), 'lp_count')
229 );
230 $extdata->addOption(
232 $this->lng->txt('trac_spent_seconds'),
233 'lp_spent'
234 )
235 );
236 $lp->addSubItem($extdata);
237
238 $ext_value = array();
239 if ($this->object->hasExtendedData(
241 )) {
242 $ext_value[] = 'lp_access';
243 }
244 if ($this->object->hasExtendedData(
246 )) {
247 $ext_value[] = 'lp_count';
248 }
249 if ($this->object->hasExtendedData(
251 )) {
252 $ext_value[] = 'lp_spent';
253 }
254 $extdata->setValue($ext_value);
255
256 $listgui = new ilCheckboxInputGUI(
257 $this->lng->txt('trac_lp_list_gui'),
258 'lp_list'
259 );
260 $listgui->setInfo($this->lng->txt('trac_lp_list_gui_info'));
261 $listgui->setChecked($this->object->hasLearningProgressListGUI());
262 $lp->addSubItem($listgui);
263
264 // object statistics
265 $objstat = new ilCheckboxInputGUI(
266 $this->lng->txt('trac_object_statistics'),
267 'object_statistics'
268 );
269 if ($this->object->enabledObjectStatistics()) {
270 $objstat->setChecked(true);
271 }
272 $activate->addSubItem($objstat);
273
274 // session statistics
275 $sessstat = new ilCheckboxInputGUI(
276 $this->lng->txt('session_statistics'),
277 'session_statistics'
278 );
279 if ($this->object->enabledSessionStatistics()) {
280 $sessstat->setChecked(true);
281 }
282 $activate->addSubItem($sessstat);
283
284 // Anonymized
286 $this->lng->txt('trac_anonymized'),
287 'user_related'
288 );
289 $user->setInfo($this->lng->txt('trac_anonymized_info'));
290 $user->setChecked(!$this->object->enabledUserRelatedData());
291 $form->addItem($user);
292
293 // Max time gap
295 $this->lng->txt('trac_valid_request'),
296 'valid_request'
297 );
298 $valid->setMaxLength(4);
299 $valid->setSize(4);
300 $valid->setSuffix($this->lng->txt('seconds'));
301 $valid->setInfo($this->lng->txt('info_valid_request'));
302 $valid->setValue((string) $this->object->getValidTimeSpan());
303 $valid->setMinValue(1);
304 $valid->setMaxValue(9999);
305 $valid->setRequired(true);
306 $form->addItem($valid);
307
310 $form,
311 $this
312 );
313
314 // #12259
315 if ($this->checkPermissionBool("write")) {
316 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
317 } else {
318 $lp->setDisabled(true);
319 $learner->setDisabled(true);
320 $extdata->setDisabled(true);
321 $listgui->setDisabled(true);
322 $objstat->setDisabled(true);
323 $user->setDisabled(true);
324 $valid->setDisabled(true);
325 }
326
327 return $form;
328 }
static addFieldsToForm(int $a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a checkbox property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a number property in a property form.
$valid

References ilObjectGUI\$user, $valid, ilAdministrationSettingsFormHandler\addFieldsToForm(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObjUserTracking\EXTENDED_DATA_LAST_ACCESS, ilObjUserTracking\EXTENDED_DATA_READ_COUNT, ilObjUserTracking\EXTENDED_DATA_SPENT_SECONDS, ilAdministrationSettingsFormHandler\FORM_LP, ILIAS\Repository\lng(), and ILIAS\Repository\object().

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 472 of file class.ilObjUserTrackingGUI.php.

472 : void
473 {
474 $this->checkPermission('write');
475
476 $form = $this->initLPDefaultsForm();
477 if ($form->checkInput()) {
478 $res = array();
479 foreach ($this->objectDefinition->getAllRepositoryTypes(
480 ) as $type) {
482 $mode = $form->getInput("def_" . $type);
483 $res[$type] = $mode
485 }
486 }
487
489
490 $this->tpl->setOnScreenMessage(
491 'success',
492 $this->lng->txt("msg_obj_modified"),
493 true
494 );
495 $this->ctrl->redirect($this, "editLPDefaults");
496 }
497
498 $form->setValuesByPost();
499 $this->editLPDefaultsObject($form);
500 }
editLPDefaultsObject(?ilPropertyFormGUI $a_form=null)
static saveTypeDefaults(array $data)
$res
Definition: ltiservices.php:69

References $res, $type, ILIAS\Repository\ctrl(), ilObjectLP\isSupportedObjectType(), ILIAS\Repository\lng(), ilLPObjSettings\LP_MODE_DEACTIVATED, ILIAS\Repository\objectDefinition(), and ilObjectLP\saveTypeDefaults().

+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjUserTrackingGUI::saveSettingsObject ( )

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

330 : void
331 {
332 $this->checkPermission('write');
333
334 $form = $this->initSettingsForm();
335 if ($form->checkInput()) {
336 $lp_active = $form->getInput('learning_progress_tracking');
337
338 $this->object->enableLearningProgress((bool) $lp_active);
339
340 if ($lp_active) {
341 $ext_data = (array) $form->getInput("lp_extdata");
342 $code = 0;
343 if (in_array('lp_access', $ext_data)) {
345 }
346 if (in_array('lp_count', $ext_data)) {
348 }
349 if (in_array('lp_spent', $ext_data)) {
351 }
352 $this->object->setExtendedData($code);
353 }
354
355 $this->object->enableChangeEventTracking(
356 (bool) $form->getInput('change_event_tracking')
357 );
358 $this->object->enableObjectStatistics(
359 (bool) $form->getInput('object_statistics')
360 );
361 $this->object->enableUserRelatedData(
362 !$form->getInput('user_related')
363 );
364 $this->object->setValidTimeSpan(
365 (int) $form->getInput('valid_request')
366 );
367 // $this->object->setLearningProgressDesktop($form->getInput('lp_desktop'));
368 $this->object->setLearningProgressLearner(
369 (bool) $form->getInput('lp_learner')
370 );
371 $this->object->enableSessionStatistics(
372 (bool) $form->getInput('session_statistics')
373 );
374 $this->object->setLearningProgressListGUI(
375 (bool) $form->getInput('lp_list')
376 );
377 $this->object->updateSettings();
378
379 $this->tpl->setOnScreenMessage(
380 'success',
381 $this->lng->txt("msg_obj_modified"),
382 true
383 );
384 $this->ctrl->redirect($this, "settings");
385 }
386 $form->setValuesByPost();
387 $this->settingsObject($form);
388 }
return true
settingsObject(?ilPropertyFormGUI $a_form=null)

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjUserTracking\EXTENDED_DATA_LAST_ACCESS, ilObjUserTracking\EXTENDED_DATA_READ_COUNT, ilObjUserTracking\EXTENDED_DATA_SPENT_SECONDS, initSettingsForm(), ILIAS\Repository\lng(), settingsObject(), and true.

+ Here is the call graph for this function:

◆ settingsObject()

ilObjUserTrackingGUI::settingsObject ( ?ilPropertyFormGUI  $a_form = null)

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

148 : void
149 {
150 if (!$this->rbac_system->checkAccess(
151 "visible,read",
152 $this->object->getRefId()
153 )) {
154 $this->error->raiseError(
155 $this->lng->txt("no_permission"),
156 $this->error->WARNING
157 );
158 }
159
160 $this->tabs_gui->addSubTab(
161 'lp_settings',
162 $this->lng->txt('settings'),
163 $this->ctrl->getLinkTarget($this, 'settings')
164 );
165
167 $this->tabs_gui->addSubTab(
168 'lpdef',
169 $this->lng->txt('trac_defaults'),
170 $this->ctrl->getLinkTarget($this, 'editLPDefaults')
171 );
172 }
173
174 $this->tabs_gui->setTabActive('settings');
175 $this->tabs_gui->setSubTabActive('lp_settings');
176
177 if (!$a_form) {
178 $a_form = $this->initSettingsForm();
179 }
180
181 $this->tpl->setContent($a_form->getHTML());
182 }

References ilObjUserTracking\_enabledLearningProgress(), error(), initSettingsForm(), and ILIAS\Repository\lng().

Referenced by saveSettingsObject().

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

Field Documentation

◆ $error

ilErrorHandling ilObjUserTrackingGUI::$error
protected

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

◆ $objectDefinition

ilObjectDefinition ilObjUserTrackingGUI::$objectDefinition
protected

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


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