ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 
- 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 ()
 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...
 

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

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
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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.

References $ilCtrl, $lng, and $tpl.

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

Member Function Documentation

◆ editLPDefaultsObject()

ilObjUserTrackingGUI::editLPDefaultsObject (   $a_form = null)
protected

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

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

Referenced by saveLPDefaultsObject().

359  {
360  $this->checkPermission('read');
361 
362  $this->tabs_gui->addSubTab(
363  'lp_settings',
364  $this->lng->txt('settings'),
365  $this->ctrl->getLinkTarget($this, 'settings')
366  );
367 
368  $this->tabs_gui->addSubTab(
369  'lpdef',
370  $this->lng->txt('trac_defaults'),
371  $this->ctrl->getLinkTarget($this, 'editLPDefaults')
372  );
373 
374  $this->tabs_gui->setTabActive('settings');
375  $this->tabs_gui->setSubTabActive('lpdef');
376 
377  if (!$a_form) {
378  $a_form = $this->initLPDefaultsForm();
379  }
380 
381  $this->tpl->setContent($a_form->getHTML());
382  }
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 39 of file class.ilObjUserTrackingGUI.php.

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

40  {
41  $next_class = $this->ctrl->getNextClass();
42  $this->ctrl->setReturn($this, "show");
43  $this->prepareOutput();
44 
45  switch ($next_class) {
46  case 'ilpermissiongui':
47  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
48  $perm_gui = new ilPermissionGUI($this);
49  $ret =&$this->ctrl->forwardCommand($perm_gui);
50  break;
51 
52  case 'illearningprogressgui':
53  $this->tabs_gui->setTabActive('learning_progress');
54  include_once("./Services/Tracking/classes/class.ilLearningProgressGUI.php");
56  $ret =&$this->ctrl->forwardCommand($lp_gui);
57  break;
58 
59  case 'illpobjectstatisticsgui':
60  $this->tabs_gui->setTabActive('statistics');
61  include_once("./Services/Tracking/classes/object_statistics/class.ilLPObjectStatisticsGUI.php");
63  $ret =&$this->ctrl->forwardCommand($os_gui);
64  break;
65 
66  case 'ilsessionstatisticsgui':
67  $this->tabs_gui->setTabActive('session_statistics');
68  include_once("./Services/Authentication/classes/class.ilSessionStatisticsGUI.php");
69  $sess_gui = new ilSessionStatisticsGUI();
70  $ret =&$this->ctrl->forwardCommand($sess_gui);
71  break;
72 
73  default:
74  $cmd = $this->ctrl->getCmd();
75  if ($cmd == "view" || $cmd == "") {
76  $cmd = "settings";
77  }
78  $cmd .= "Object";
79  $this->$cmd();
80  break;
81  }
82 
83  return true;
84  }
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 86 of file class.ilObjUserTrackingGUI.php.

References getTabs().

87  {
88  $this->getTabs();
89  }
+ Here is the call graph for this function:

◆ getTabs()

ilObjUserTrackingGUI::getTabs ( )

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

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

Referenced by getAdminTabs().

92  {
93  $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
94 
95  $this->tabs_gui->addTarget(
96  "settings",
97  $this->ctrl->getLinkTarget($this, "settings"),
98  "settings",
99  get_class($this)
100  );
101 
102  if ($this->checkPermissionBool("read")) {
104  $this->tabs_gui->addTarget(
105  "statistics",
106  $this->ctrl->getLinkTargetByClass(
107  "illpobjectstatisticsgui",
108  "access"
109  ),
110  "",
111  "illpobjectstatisticsgui"
112  );
113  }
114 
116  $this->tabs_gui->addTarget(
117  "learning_progress",
118  $this->ctrl->getLinkTargetByClass(
119  "illearningprogressgui",
120  "show"
121  ),
122  "",
123  "illearningprogressgui"
124  );
125  }
126 
127  // session statistics
129  $this->tabs_gui->addTarget(
130  "session_statistics",
131  $this->ctrl->getLinkTargetByClass(
132  "ilsessionstatisticsgui",
133  ""
134  ),
135  "",
136  "ilsessionstatisticsgui"
137  );
138  }
139  }
140 
141  if ($this->checkPermissionBool("edit_permission")) {
142  $this->tabs_gui->addTarget(
143  "perm_settings",
144  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
145  array("perm","info","owner"),
146  'ilpermissiongui'
147  );
148  }
149  }
static _enabledObjectStatistics()
check wether object statistics is enabled or not
static _enabledLearningProgress()
check wether learing progress is enabled or not
Create styles array
The data for the language used.
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 384 of file class.ilObjUserTrackingGUI.php.

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

Referenced by editLPDefaultsObject(), and saveLPDefaultsObject().

385  {
386  global $objDefinition;
387 
388  include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
389  $form = new ilPropertyFormGUI();
390  $form->setFormAction($this->ctrl->getFormAction($this));
391  $form->setTitle($this->lng->txt('trac_defaults'));
392  $form->setDescription($this->lng->txt('trac_defaults_info'));
393 
394  include_once "Services/Object/classes/class.ilObjectLP.php";
395  include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
396 
397  $types = array();
398  foreach ($objDefinition->getAllRepositoryTypes() as $type) {
400  $types[$type] = array(
401  "type" => $type,
402  "caption" => $this->lng->txt("obj_" . $type)
403  );
404  }
405  }
406  $types = ilUtil::sortArray($types, "caption", "asc");
407  foreach ($types as $item) {
408  $class = ilObjectLP::getTypeClass($item["type"]);
409  $modes = $class::getDefaultModes(ilObjUserTracking::_enabledLearningProgress());
410  if (sizeof($modes) > 1) {
411  $def_type = new ilSelectInputGUI($item["caption"], "def_" . $item["type"]);
412  $form->addItem($def_type);
413 
414  $def_type->setRequired(true);
415  $def_type->setValue(ilObjectLP::getTypeDefault($item["type"]));
416 
417  $options = array();
418  foreach ($modes as $mode) {
419  $caption = ($mode == ilLPObjSettings::LP_MODE_DEACTIVATED)
420  ? $this->lng->txt("trac_defaults_inactive")
422  $options[$mode] = $caption;
423  }
424  $def_type->setOptions($options);
425  }
426  }
427 
428  if ($this->checkPermissionBool("write")) {
429  $form->addCommandButton('saveLPDefaults', $this->lng->txt('save'));
430  } else {
431  foreach ($types as $item) {
432  $form->getItemByPostVar("def_" . $item["type"])->setDisabled(true);
433  }
434  }
435 
436  return $form;
437  }
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 selection list property in a property form.
This class represents a property form user interface.
$type
static isSupportedObjectType($a_type)
static getTypeDefault($a_type)
Get current type default.
static _enabledLearningProgress()
check wether learing progress is enabled or not
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
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 183 of file class.ilObjUserTrackingGUI.php.

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

Referenced by saveSettingsObject(), and settingsObject().

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

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

440  {
441  global $objDefinition;
442 
443  $this->checkPermission('write');
444 
445  $form = $this->initLPDefaultsForm();
446  if ($form->checkInput()) {
447  include_once "Services/Object/classes/class.ilObjectLP.php";
448  include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
449 
450  $res = array();
451  foreach ($objDefinition->getAllRepositoryTypes() as $type) {
453  $mode = $form->getInput("def_" . $type);
454  $res[$type] = $mode
455  ? $mode
457  }
458  }
459 
461 
462  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
463  $this->ctrl->redirect($this, "editLPDefaults");
464  }
465 
466  $form->setValuesByPost();
467  $this->editLPDefaultsObject($form);
468  return false;
469  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$type
static isSupportedObjectType($a_type)
foreach($_POST as $key=> $value) $res
if(isset($_POST['submit'])) $form
static saveTypeDefaults(array $a_data)
Create styles array
The data for the language used.
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 309 of file class.ilObjUserTrackingGUI.php.

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

310  {
311  $this->checkPermission('write');
312 
313  $form = $this->initSettingsForm();
314  if ($form->checkInput()) {
315  $lp_active = $form->getInput('learning_progress_tracking');
316 
317  $this->object->enableLearningProgress($lp_active);
318 
319  if ($lp_active) {
320  $ext_data = (array) $form->getInput("lp_extdata");
321  $code = 0;
322  if (in_array('lp_access', $ext_data)) {
324  }
325  if (in_array('lp_count', $ext_data)) {
327  }
328  if (in_array('lp_spent', $ext_data)) {
330  }
331  $this->object->setExtendedData($code);
332  }
333 
334  $this->object->enableChangeEventTracking($form->getInput('change_event_tracking'));
335  $this->object->enableObjectStatistics($form->getInput('object_statistics'));
336  $this->object->enableUserRelatedData(!$form->getInput('user_related'));
337  $this->object->setValidTimeSpan($form->getInput('valid_request'));
338  // $this->object->setLearningProgressDesktop($form->getInput('lp_desktop'));
339  $this->object->setLearningProgressLearner($form->getInput('lp_learner'));
340  $this->object->enableSessionStatistics($form->getInput('session_statistics'));
341  $this->object->setLearningProgressListGUI($form->getInput('lp_list'));
342  $this->object->updateSettings();
343 
344  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
345  $this->ctrl->redirect($this, "settings");
346  }
347 
348  $form->setValuesByPost();
349  $this->settingsObject($form);
350  return false;
351  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$code
Definition: example_050.php:99
settingsObject($a_form=null)
display tracking settings form
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
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 155 of file class.ilObjUserTrackingGUI.php.

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

Referenced by saveSettingsObject().

156  {
157  $this->checkPermission('read');
158 
159  $this->tabs_gui->addSubTab(
160  'lp_settings',
161  $this->lng->txt('settings'),
162  $this->ctrl->getLinkTarget($this, 'settings')
163  );
164 
166  $this->tabs_gui->addSubTab(
167  'lpdef',
168  $this->lng->txt('trac_defaults'),
169  $this->ctrl->getLinkTarget($this, 'editLPDefaults')
170  );
171  }
172 
173  $this->tabs_gui->setTabActive('settings');
174  $this->tabs_gui->setSubTabActive('lp_settings');
175 
176  if (!$a_form) {
177  $a_form = $this->initSettingsForm();
178  }
179 
180  $this->tpl->setContent($a_form->getHTML());
181  }
static _enabledLearningProgress()
check wether learing progress is enabled or not
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:

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: