ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjUserTrackingGUI Class Reference
+ Inheritance diagram for ilObjUserTrackingGUI:
+ Collaboration diagram for ilObjUserTrackingGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference)
 
 executeCommand ()
 
 getAdminTabs ()
 
 getTabs ()
 
 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 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Data Fields

 $tpl = null
 
 $lng = null
 
 $ctrl = null
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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...
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs 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...
 

Protected Attributes

 $dic
 
 $rbacsystem
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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...
 

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

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

44  {
45  global $DIC;
46 
47  $this->type = "trac";
48  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
49 
50  $this->dic = $DIC;
51  $this->tpl = $this->dic['tpl'];
52  $this->lng = $this->dic->language();
53  $this->lng->loadLanguageModule('trac');
54  $this->rbacsystem = $this->dic->rbac()->system();
55 
56  $this->ctrl = $this->dic->ctrl();
57  }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addToExternalSettingsForm()

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

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

References ilAdministrationSettingsFormHandler\FORM_CERTIFICATE.

497  {
498  switch ($a_form_id) {
500  $fields = array();
501 
502  return array('obj_trac' => array('editLPDefaults', $fields));
503  }
504  }

◆ editLPDefaultsObject()

ilObjUserTrackingGUI::editLPDefaultsObject (   $a_form = null)
protected

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

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

Referenced by saveLPDefaultsObject().

376  {
377  $this->checkPermission('read');
378 
379  $this->tabs_gui->addSubTab(
380  'lp_settings',
381  $this->lng->txt('settings'),
382  $this->ctrl->getLinkTarget($this, 'settings')
383  );
384 
385  $this->tabs_gui->addSubTab(
386  'lpdef',
387  $this->lng->txt('trac_defaults'),
388  $this->ctrl->getLinkTarget($this, 'editLPDefaults')
389  );
390 
391  $this->tabs_gui->setTabActive('settings');
392  $this->tabs_gui->setSubTabActive('lpdef');
393 
394  if (!$a_form) {
395  $a_form = $this->initLPDefaultsForm();
396  }
397 
398  $this->tpl->setContent($a_form->getHTML());
399  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjUserTrackingGUI::executeCommand ( )

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

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

60  {
61  $next_class = $this->ctrl->getNextClass();
62  $this->ctrl->setReturn($this, "show");
63  $this->prepareOutput();
64 
65  switch ($next_class) {
66  case 'ilpermissiongui':
67  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
68  $perm_gui = new ilPermissionGUI($this);
69  $ret = &$this->ctrl->forwardCommand($perm_gui);
70  break;
71 
72  case 'illearningprogressgui':
73  $this->tabs_gui->setTabActive('learning_progress');
74  include_once("./Services/Tracking/classes/class.ilLearningProgressGUI.php");
76  $ret = &$this->ctrl->forwardCommand($lp_gui);
77  break;
78 
79  case 'illpobjectstatisticsgui':
80  $this->tabs_gui->setTabActive('statistics');
81  include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsGUI.php");
83  $ret = &$this->ctrl->forwardCommand($os_gui);
84  break;
85 
86  case 'ilsessionstatisticsgui':
87  $this->tabs_gui->setTabActive('session_statistics');
88  include_once("./Services/Authentication/classes/class.ilSessionStatisticsGUI.php");
89  $sess_gui = new ilSessionStatisticsGUI();
90  $ret = &$this->ctrl->forwardCommand($sess_gui);
91  break;
92 
93  default:
94  $cmd = $this->ctrl->getCmd();
95  if ($cmd == "view" || $cmd == "") {
96  $cmd = "settings";
97  }
98  $cmd .= "Object";
99  $this->$cmd();
100  break;
101  }
102 
103  return true;
104  }
Class ilSessionStatisticsGUI.
prepareOutput($a_show_subobjects=true)
prepare output
$ret
Definition: parser.php:6
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjUserTrackingGUI.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjUserTrackingGUI::getAdminTabs ( )

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

References getTabs().

107  {
108  $this->getTabs();
109  }
+ Here is the call graph for this function:

◆ getTabs()

ilObjUserTrackingGUI::getTabs ( )

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

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

Referenced by getAdminTabs().

112  {
113  $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
114 
115  $this->tabs_gui->addTarget(
116  "settings",
117  $this->ctrl->getLinkTarget($this, "settings"),
118  "settings",
119  get_class($this)
120  );
121 
122  if ($this->rbacsystem->checkAccess("visible,read", $this->ref_id)) {
124  $this->tabs_gui->addTarget(
125  "statistics",
126  $this->ctrl->getLinkTargetByClass(
127  "illpobjectstatisticsgui",
128  "access"
129  ),
130  "",
131  "illpobjectstatisticsgui"
132  );
133  }
134 
136  $this->tabs_gui->addTarget(
137  "learning_progress",
138  $this->ctrl->getLinkTargetByClass(
139  "illearningprogressgui",
140  "show"
141  ),
142  "",
143  "illearningprogressgui"
144  );
145  }
146 
147  // session statistics
149  $this->tabs_gui->addTarget(
150  "session_statistics",
151  $this->ctrl->getLinkTargetByClass(
152  "ilsessionstatisticsgui",
153  ""
154  ),
155  "",
156  "ilsessionstatisticsgui"
157  );
158  }
159  }
160 
161  if ($this->checkPermissionBool("edit_permission")) {
162  $this->tabs_gui->addTarget(
163  "perm_settings",
164  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
165  array("perm","info","owner"),
166  'ilpermissiongui'
167  );
168  }
169  }
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initLPDefaultsForm()

ilObjUserTrackingGUI::initLPDefaultsForm ( )
protected

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

References $DIC, ilObjectGUI\$objDefinition, $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().

402  {
403  global $DIC;
404 
405  $objDefinition = $DIC['objDefinition'];
406 
407  include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
408  $form = new ilPropertyFormGUI();
409  $form->setFormAction($this->ctrl->getFormAction($this));
410  $form->setTitle($this->lng->txt('trac_defaults'));
411  $form->setDescription($this->lng->txt('trac_defaults_info'));
412 
413  include_once "Services/Object/classes/class.ilObjectLP.php";
414  include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
415 
416  $types = array();
417  foreach ($objDefinition->getAllRepositoryTypes() as $type) {
419  $types[$type] = array(
420  "type" => $type,
421  "caption" => $this->lng->txt("obj_" . $type)
422  );
423  }
424  }
425  $types = ilUtil::sortArray($types, "caption", "asc");
426  foreach ($types as $item) {
427  $class = ilObjectLP::getTypeClass($item["type"]);
428  $modes = $class::getDefaultModes(ilObjUserTracking::_enabledLearningProgress());
429  if (sizeof($modes) > 1) {
430  $def_type = new ilSelectInputGUI($item["caption"], "def_" . $item["type"]);
431  $form->addItem($def_type);
432 
433  $def_type->setRequired(true);
434  $def_type->setValue(ilObjectLP::getTypeDefault($item["type"]));
435 
436  $options = array();
437  foreach ($modes as $mode) {
438  $caption = ($mode == ilLPObjSettings::LP_MODE_DEACTIVATED)
439  ? $this->lng->txt("trac_defaults_inactive")
441  $options[$mode] = $caption;
442  }
443  $def_type->setOptions($options);
444  }
445  }
446 
447  if ($this->checkPermissionBool("write")) {
448  $form->addCommandButton('saveLPDefaults', $this->lng->txt('save'));
449  } else {
450  foreach ($types as $item) {
451  $form->getItemByPostVar("def_" . $item["type"])->setDisabled(true);
452  }
453  }
454 
455  return $form;
456  }
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static getTypeClass($a_type)
This class represents a property form user interface.
$type
static getTypeDefault($a_type)
Get current type default.
static _enabledLearningProgress()
check wether learing progress is enabled or not
global $DIC
Definition: goto.php:24
static isSupportedObjectType($type)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static _mode2Text($a_mode)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjUserTrackingGUI::initSettingsForm ( )
protected

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

References ilObjectGUI\$user, $valid, ilAdministrationSettingsFormHandler\addFieldsToForm(), ilCheckboxGroupInputGUI\addOption(), ilObjectGUI\checkPermissionBool(), ilObjUserTracking\EXTENDED_DATA_LAST_ACCESS, ilObjUserTracking\EXTENDED_DATA_READ_COUNT, ilObjUserTracking\EXTENDED_DATA_SPENT_SECONDS, ilAdministrationSettingsFormHandler\FORM_LP, ilCheckboxInputGUI\setChecked(), and ilFormPropertyGUI\setInfo().

Referenced by saveSettingsObject(), and settingsObject().

208  {
209  include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
210  $form = new ilPropertyFormGUI();
211  $form->setFormAction($this->ctrl->getFormAction($this));
212  $form->setTitle($this->lng->txt('tracking_settings'));
213 
214  $activate = new ilCheckboxGroupInputGUI($this->lng->txt('activate_tracking'));
215  $form->addItem($activate);
216 
217  // learning progress
218  $lp = new ilCheckboxInputGUI($this->lng->txt('trac_learning_progress'), 'learning_progress_tracking');
219  if ($this->object->enabledLearningProgress()) {
220  $lp->setChecked(true);
221  }
222  $activate->addSubItem($lp);
223 
224 
225  // lp settings
226 
227  $learner = new ilCheckboxInputGUI($this->lng->txt('trac_lp_learner_access'), 'lp_learner');
228  $learner->setInfo($this->lng->txt('trac_lp_learner_access_info'));
229  $learner->setChecked($this->object->hasLearningProgressLearner());
230  $lp->addSubItem($learner);
231 
232 
233  // extended data
234 
235  $extdata = new ilCheckboxGroupInputGUI($this->lng->txt('trac_learning_progress_settings_info'), 'lp_extdata');
236  $extdata->addOption(new ilCheckboxOption($this->lng->txt('trac_first_and_last_access'), 'lp_access'));
237  $extdata->addOption(new ilCheckboxOption($this->lng->txt('trac_read_count'), 'lp_count'));
238  $extdata->addOption(new ilCheckboxOption($this->lng->txt('trac_spent_seconds'), 'lp_spent'));
239  $lp->addSubItem($extdata);
240 
241  $ext_value = array();
242  if ($this->object->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_LAST_ACCESS)) {
243  $ext_value[] = 'lp_access';
244  }
245  if ($this->object->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_READ_COUNT)) {
246  $ext_value[] = 'lp_count';
247  }
248  if ($this->object->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_SPENT_SECONDS)) {
249  $ext_value[] = 'lp_spent';
250  }
251  $extdata->setValue($ext_value);
252 
253  $listgui = new ilCheckboxInputGUI($this->lng->txt('trac_lp_list_gui'), 'lp_list');
254  $listgui->setInfo($this->lng->txt('trac_lp_list_gui_info'));
255  $listgui->setChecked($this->object->hasLearningProgressListGUI());
256  $lp->addSubItem($listgui);
257 
258  /* => REPOSITORY
259  // change event
260  $event = new ilCheckboxInputGUI($this->lng->txt('trac_repository_changes'), 'change_event_tracking');
261  if($this->object->enabledChangeEventTracking())
262  {
263  $event->setChecked(true);
264  }
265  $activate->addSubItem($event);
266  */
267 
268  // object statistics
269  $objstat = new ilCheckboxInputGUI($this->lng->txt('trac_object_statistics'), 'object_statistics');
270  if ($this->object->enabledObjectStatistics()) {
271  $objstat->setChecked(true);
272  }
273  $activate->addSubItem($objstat);
274 
275  // session statistics
276  $sessstat = new ilCheckboxInputGUI($this->lng->txt('session_statistics'), 'session_statistics');
277  if ($this->object->enabledSessionStatistics()) {
278  $sessstat->setChecked(true);
279  }
280  $activate->addSubItem($sessstat);
281 
282  // Anonymized
283  $user = new ilCheckboxInputGUI($this->lng->txt('trac_anonymized'), 'user_related');
284  $user->setInfo($this->lng->txt('trac_anonymized_info'));
285  $user->setChecked(!$this->object->enabledUserRelatedData());
286  $form->addItem($user);
287 
288  // Max time gap
289  $valid = new ilNumberInputGUI($this->lng->txt('trac_valid_request'), 'valid_request');
290  $valid->setMaxLength(4);
291  $valid->setSize(4);
292  $valid->setSuffix($this->lng->txt('seconds'));
293  $valid->setInfo($this->lng->txt('info_valid_request'));
294  $valid->setValue($this->object->getValidTimeSpan());
295  $valid->setMinValue(1);
296  $valid->setMaxValue(9999);
297  $valid->setRequired(true);
298  $form->addItem($valid);
299 
300  include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
303  $form,
304  $this
305  );
306 
307  // #12259
308  if ($this->checkPermissionBool("write")) {
309  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
310  } else {
311  $lp->setDisabled(true);
312  $learner->setDisabled(true);
313  $extdata->setDisabled(true);
314  $listgui->setDisabled(true);
315  $objstat->setDisabled(true);
316  $user->setDisabled(true);
317  $valid->setDisabled(true);
318  }
319 
320  return $form;
321  }
This class represents an option in a checkbox group.
This class represents a property form user interface.
$valid
This class represents a checkbox property in a property form.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
setInfo($a_info)
Set Information Text.
setChecked($a_checked)
Set Checked.
This class represents a number property in a property form.
This class represents a property in a property form.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveLPDefaultsObject()

ilObjUserTrackingGUI::saveLPDefaultsObject ( )
protected

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

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

459  {
460  global $DIC;
461 
462  $objDefinition = $DIC['objDefinition'];
463 
464  $this->checkPermission('write');
465 
466  $form = $this->initLPDefaultsForm();
467  if ($form->checkInput()) {
468  include_once "Services/Object/classes/class.ilObjectLP.php";
469  include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
470 
471  $res = array();
472  foreach ($objDefinition->getAllRepositoryTypes() as $type) {
474  $mode = $form->getInput("def_" . $type);
475  $res[$type] = $mode
476  ? $mode
478  }
479  }
480 
482 
483  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
484  $this->ctrl->redirect($this, "editLPDefaults");
485  }
486 
487  $form->setValuesByPost();
488  $this->editLPDefaultsObject($form);
489  return false;
490  }
$type
foreach($_POST as $key=> $value) $res
static saveTypeDefaults(array $a_data)
global $DIC
Definition: goto.php:24
static isSupportedObjectType($type)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjUserTrackingGUI::saveSettingsObject ( )

save user tracking settings

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

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

327  {
328  $this->checkPermission('write');
329 
330  $form = $this->initSettingsForm();
331  if ($form->checkInput()) {
332  $lp_active = $form->getInput('learning_progress_tracking');
333 
334  $this->object->enableLearningProgress($lp_active);
335 
336  if ($lp_active) {
337  $ext_data = (array) $form->getInput("lp_extdata");
338  $code = 0;
339  if (in_array('lp_access', $ext_data)) {
341  }
342  if (in_array('lp_count', $ext_data)) {
344  }
345  if (in_array('lp_spent', $ext_data)) {
347  }
348  $this->object->setExtendedData($code);
349  }
350 
351  $this->object->enableChangeEventTracking($form->getInput('change_event_tracking'));
352  $this->object->enableObjectStatistics($form->getInput('object_statistics'));
353  $this->object->enableUserRelatedData(!$form->getInput('user_related'));
354  $this->object->setValidTimeSpan($form->getInput('valid_request'));
355  // $this->object->setLearningProgressDesktop($form->getInput('lp_desktop'));
356  $this->object->setLearningProgressLearner($form->getInput('lp_learner'));
357  $this->object->enableSessionStatistics($form->getInput('session_statistics'));
358  $this->object->setLearningProgressListGUI($form->getInput('lp_list'));
359  $this->object->updateSettings();
360 
361  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
362  $this->ctrl->redirect($this, "settings");
363  }
364 
365  $form->setValuesByPost();
366  $this->settingsObject($form);
367  return false;
368  }
settingsObject($a_form=null)
display tracking settings form
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ settingsObject()

ilObjUserTrackingGUI::settingsObject (   $a_form = null)

display tracking settings form

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

References ilObjectGUI\$ilErr, ilObjUserTracking\_enabledLearningProgress(), and initSettingsForm().

Referenced by saveSettingsObject().

176  {
177  global $ilErr;
178 
179  if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
180  $ilErr->raiseError($this->lng->txt("no_permission"), $ilErr->WARNING);
181  }
182 
183  $this->tabs_gui->addSubTab(
184  'lp_settings',
185  $this->lng->txt('settings'),
186  $this->ctrl->getLinkTarget($this, 'settings')
187  );
188 
190  $this->tabs_gui->addSubTab(
191  'lpdef',
192  $this->lng->txt('trac_defaults'),
193  $this->ctrl->getLinkTarget($this, 'editLPDefaults')
194  );
195  }
196 
197  $this->tabs_gui->setTabActive('settings');
198  $this->tabs_gui->setSubTabActive('lp_settings');
199 
200  if (!$a_form) {
201  $a_form = $this->initSettingsForm();
202  }
203 
204  $this->tpl->setContent($a_form->getHTML());
205  }
static _enabledLearningProgress()
check wether learing progress is enabled or not
+ 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 33 of file class.ilObjUserTrackingGUI.php.

◆ $dic

ilObjUserTrackingGUI::$dic
protected

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

◆ $lng

ilObjUserTrackingGUI::$lng = null

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

◆ $rbacsystem

ilObjUserTrackingGUI::$rbacsystem
protected

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

◆ $tpl

ilObjUserTrackingGUI::$tpl = null

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


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