ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLPListOfSettingsGUI Class Reference

Class ilLPListOfSettingsGUI. More...

+ Inheritance diagram for ilLPListOfSettingsGUI:
+ Collaboration diagram for ilLPListOfSettingsGUI:

Public Member Functions

 __construct ($a_mode, $a_ref_id)
 
 executeCommand ()
 execute command More...
 
- Public Member Functions inherited from ilLearningProgressBaseGUI
 __construct ($a_mode, $a_ref_id=0, $a_usr_id=0)
 
 isAnonymized ()
 
 getMode ()
 
 getRefId ()
 
 getObjId ()
 
 getUserId ()
 
 __getDefaultCommand ()
 
 __setSubTabs ($a_active)
 
 __buildFooter ()
 
 __buildHeader ()
 
 __insertPath (&$a_tpl, $a_ref_id)
 insert path More...
 
 __showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 
__initTableGUI ()
 
 __showObjectDetails (&$info, $item_id=0, $add_section=true)
 show details about current object. More...
 
 __appendUserInfo (&$info, $a_user)
 
 __appendLPDetails (&$info, $item_id, $user_id)
 
 __sort ($a_ids, $a_table, $a_field, $a_id_name)
 Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname. More...
 
 __getPercent ($max, $reached)
 
 __readItemStatusInfo ($a_items)
 
 __getLegendHTML ()
 
 __showEditUser ($a_user_id, $a_ref_id, $a_cancel, $a_sub_id=false)
 
 __updateUser ($user_id, $obj_id)
 

Protected Member Functions

 show ()
 Show settings tables. More...
 
 initFormSettings ()
 Init property form. More...
 
 saveSettings ()
 Save learning progress settings. More...
 
 getTableByMode ()
 Get tables by mode. More...
 
 assign ()
 Save material assignment. More...
 
 deassign ()
 save mterial assignment More...
 
 groupMaterials ()
 Group materials. More...
 
 releaseMaterials ()
 
 saveObligatoryMaterials ()
 Save obligatory state per grouped materials. More...
 
 updateTLT ()
 
 getLPPathInfo ($a_ref_id, array &$a_res)
 Gather LP data about parent objects. More...
 
 handleLPUsageInfo ()
 
- Protected Member Functions inherited from ilLearningProgressBaseGUI
 initEditUserForm ($a_user_id, $a_obj_id, $a_cancel=null)
 

Protected Attributes

 $obj_settings
 
 $obj_lp
 
- Protected Attributes inherited from ilLearningProgressBaseGUI
 $anonymized
 
 $logger
 
 $tabs_gui
 

Additional Inherited Members

- Static Public Member Functions inherited from ilLearningProgressBaseGUI
static _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 
static _getImagePathForStatus ($a_status)
 Get image path for status. More...
 
static _getStatusText ($a_status, $a_lng=null)
 Get status alt text. More...
 
static __readStatus ($a_obj_id, $user_id)
 
static isObjectOffline ($a_obj_id, $a_type=null)
 
- Data Fields inherited from ilLearningProgressBaseGUI
 $tpl = null
 
 $ctrl = null
 
 $lng = null
 
 $ref_id = 0
 
 $mode = 0
 
const LP_CONTEXT_PERSONAL_DESKTOP = 1
 
const LP_CONTEXT_ADMINISTRATION = 2
 
const LP_CONTEXT_REPOSITORY = 3
 
const LP_CONTEXT_USER_FOLDER = 4
 
const LP_CONTEXT_ORG_UNIT = 5
 
const LP_ACTIVE_SETTINGS = 1
 
const LP_ACTIVE_OBJECTS = 2
 
const LP_ACTIVE_PROGRESS = 3
 
const LP_ACTIVE_USERS = 5
 
const LP_ACTIVE_SUMMARY = 6
 
const LP_ACTIVE_OBJSTATACCESS = 7
 
const LP_ACTIVE_OBJSTATTYPES = 8
 
const LP_ACTIVE_OBJSTATDAILY = 9
 
const LP_ACTIVE_OBJSTATADMIN = 10
 
const LP_ACTIVE_MATRIX = 11
 

Detailed Description

Class ilLPListOfSettingsGUI.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilLPListOfSettingsGUI:

Definition at line 20 of file class.ilLPListOfSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLPListOfSettingsGUI::__construct (   $a_mode,
  $a_ref_id 
)

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

26 {
27 parent::__construct($a_mode, $a_ref_id);
28
29 $this->obj_settings = new ilLPObjSettings($this->getObjId());
30
31 include_once './Services/Object/classes/class.ilObjectLP.php';
32 $this->obj_lp = ilObjectLP::getInstance($this->getObjId());
33 }
static getInstance($a_obj_id)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), ilObjectLP\getInstance(), and ilLearningProgressBaseGUI\getObjId().

+ Here is the call graph for this function:

Member Function Documentation

◆ assign()

ilLPListOfSettingsGUI::assign ( )
protected

Save material assignment.

Returns
void

Definition at line 213 of file class.ilLPListOfSettingsGUI.php.

214 {
215 if (!$_POST['item_ids']) {
216 ilUtil::sendFailure($this->lng->txt('select_one'), true);
217 $this->ctrl->redirect($this, 'show');
218 }
219 if (count($_POST['item_ids'])) {
220 $collection = $this->obj_lp->getCollectionInstance();
221 if ($collection && $collection->hasSelectableItems()) {
222 $collection->activateEntries($_POST['item_ids']);
223 }
224
225 // #15045 - has to be done before LP refresh!
226 $this->obj_lp->resetCaches();
227
228 // refresh learning progress
229 include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
231 }
232 ilUtil::sendSuccess($this->lng->txt('trac_settings_saved'), true);
233 $this->ctrl->redirect($this, 'show');
234 }
$_POST["username"]
static _refreshStatus($a_obj_id, $a_users=null)
Set dirty.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $_POST, ilLPStatusWrapper\_refreshStatus(), ilLearningProgressBaseGUI\getObjId(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ deassign()

ilLPListOfSettingsGUI::deassign ( )
protected

save mterial assignment

Returns
void

Definition at line 240 of file class.ilLPListOfSettingsGUI.php.

241 {
242 if (!$_POST['item_ids']) {
243 ilUtil::sendFailure($this->lng->txt('select_one'), true);
244 $this->ctrl->redirect($this, 'show');
245 return false;
246 }
247 if (count($_POST['item_ids'])) {
248 $collection = $this->obj_lp->getCollectionInstance();
249 if ($collection && $collection->hasSelectableItems()) {
250 $collection->deactivateEntries($_POST['item_ids']);
251 }
252
253 // #15045 - has to be done before LP refresh!
254 $this->obj_lp->resetCaches();
255
256 // refresh learning progress
257 include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
259 }
260 ilUtil::sendSuccess($this->lng->txt('trac_settings_saved'), true);
261 $this->ctrl->redirect($this, 'show');
262 }

References $_POST, ilLPStatusWrapper\_refreshStatus(), ilLearningProgressBaseGUI\getObjId(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ executeCommand()

ilLPListOfSettingsGUI::executeCommand ( )

execute command

Definition at line 38 of file class.ilLPListOfSettingsGUI.php.

39 {
40 switch ($this->ctrl->getNextClass()) {
41 default:
42 $cmd = $this->__getDefaultCommand();
43 $this->$cmd();
44
45 }
46 return true;
47 }

References ilLearningProgressBaseGUI\__getDefaultCommand().

+ Here is the call graph for this function:

◆ getLPPathInfo()

ilLPListOfSettingsGUI::getLPPathInfo (   $a_ref_id,
array &  $a_res 
)
protected

Gather LP data about parent objects.

Parameters
int$a_ref_id
array$a_res
Returns
bool

Definition at line 379 of file class.ilLPListOfSettingsGUI.php.

380 {
381 global $DIC;
382
383 $tree = $DIC['tree'];
384
385 $has_lp_parents = false;
386
387 $path = $tree->getNodePath($a_ref_id);
388 array_shift($path); // root
389 foreach ($path as $node) {
390 $supports_lp = ilObjectLP::isSupportedObjectType($node["type"]);
391
392 if ($supports_lp || $has_lp_parents) {
393 $a_res[$node["child"]]["node"] = array(
394 "type" => $node["type"]
395 ,"title" => $node["title"]
396 ,"obj_id" => $node["obj_id"]
397 ,"lp" => false
398 ,"active" => false
399 );
400 }
401
402 if (
403 $supports_lp &&
404 $node["child"] != $a_ref_id) {
405 $a_res[$node["child"]]["node"]["lp"] = true;
406 $has_lp_parents = true;
407
408 $parent_obj_id = $node['obj_id'];
409 $parent_obj_lp = \ilObjectLP::getInstance($parent_obj_id);
410 $parent_collection = $parent_obj_lp->getCollectionInstance();
411 if (
412 $parent_collection &&
413 $parent_collection->hasSelectableItems() &&
414 $parent_collection->isAssignedEntry($a_ref_id)
415 ) {
416 $a_res[$node['child']]['node']['active'] = true;
417 }
418 }
419 }
420 return $has_lp_parents;
421 }
static isSupportedObjectType($a_type)
$DIC
Definition: xapitoken.php:46

References $DIC, ilObjectLP\getInstance(), and ilObjectLP\isSupportedObjectType().

Referenced by handleLPUsageInfo().

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

◆ getTableByMode()

ilLPListOfSettingsGUI::getTableByMode ( )
protected

Get tables by mode.

Definition at line 198 of file class.ilLPListOfSettingsGUI.php.

199 {
200 $collection = $this->obj_lp->getCollectionInstance();
201 if ($collection && $collection->hasSelectableItems()) {
202 include_once "Services/Tracking/classes/repository_statistics/class.ilLPCollectionSettingsTableGUI.php";
203 $table = new ilLPCollectionSettingsTableGUI($this, 'show', $this->getRefId(), $this->obj_lp->getCurrentMode());
204 $table->parse($collection);
205 return $table->getHTML();
206 }
207 }

References ilLearningProgressBaseGUI\getRefId().

Referenced by saveSettings().

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

◆ groupMaterials()

ilLPListOfSettingsGUI::groupMaterials ( )
protected

Group materials.

Definition at line 267 of file class.ilLPListOfSettingsGUI.php.

268 {
269 if (!count((array) $_POST['item_ids'])) {
270 ilUtil::sendFailure($this->lng->txt('select_one'), true);
271 $this->ctrl->redirect($this, 'show');
272 }
273
274 $collection = $this->obj_lp->getCollectionInstance();
275 if ($collection && $collection->hasSelectableItems()) {
276 // Assign new grouping id
277 $collection->createNewGrouping((array) $_POST['item_ids']);
278
279 // refresh learning progress
280 include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
282 }
283
284 ilUtil::sendSuccess($this->lng->txt('trac_settings_saved'), true);
285 $this->ctrl->redirect($this, 'show');
286 }

References $_POST, ilLPStatusWrapper\_refreshStatus(), ilLearningProgressBaseGUI\getObjId(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ handleLPUsageInfo()

ilLPListOfSettingsGUI::handleLPUsageInfo ( )
protected

Definition at line 423 of file class.ilLPListOfSettingsGUI.php.

424 {
425 global $DIC;
426
427 $lng = $DIC['lng'];
428 $ilAccess = $DIC['ilAccess'];
429
430 $ref_id = $_GET["ref_id"];
431 if (!$ref_id) {
432 $ref_id = $_REQUEST["ref_id"];
433 }
434
435 $coll = array();
436 if ($ref_id &&
437 $this->getLPPathInfo($ref_id, $coll)) {
438 include_once "Services/Link/classes/class.ilLink.php";
439
440 $tpl = new ilTemplate("tpl.lp_obj_settings_tree_info.html", true, true, "Services/Tracking");
441
442 $margin = 0;
443 $has_active = false;
444 foreach ($coll as $parent_ref_id => $parts) {
445 $node = $parts["node"];
446 $params = array();
447 if ($node["lp"]) {
448 if ($node["active"]) {
449 $tpl->touchBlock("parent_active_bl");
450 $has_active = true;
451 }
452
453 $params["gotolp"] = 1;
454 }
455
456 if ($ilAccess->checkAccess("read", "", $parent_ref_id) &&
457 $parent_ref_id != $ref_id) { // #17170
458 $tpl->setCurrentBlock("parent_link_bl");
459 $tpl->setVariable("PARENT_LINK_TITLE", $node["title"]);
460 $tpl->setVariable("PARENT_URL", ilLink::_getLink($parent_ref_id, $node["type"], $params));
461 $tpl->parseCurrentBlock();
462 } else {
463 $tpl->setCurrentBlock("parent_nolink_bl");
464 $tpl->setVariable("PARENT_NOLINK_TITLE", $node["title"]);
465 $tpl->parseCurrentBlock();
466 }
467
468 $tpl->setCurrentBlock("parent_usage_bl");
469 $tpl->setVariable("PARENT_TYPE_URL", ilUtil::getTypeIconPath($node["type"], $node["obj_id"]));
470 $tpl->setVariable("PARENT_TYPE_ALT", $lng->txt("obj_" . $node["type"]));
471
472 $tpl->setVariable("PARENT_STYLE", $node["lp"]
473 ? ''
474 : ' class="ilLPParentInfoListLPUnsupported"');
475 $tpl->setVariable("MARGIN", $margin);
476 $tpl->parseCurrentBlock();
477
478 $margin += 25;
479 }
480
481 if ($has_active) {
482 $tpl->setVariable("LEGEND", sprintf(
483 $lng->txt("trac_lp_settings_info_parent_legend"),
485 ));
486 }
487
488 include_once "Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
489 $panel = ilPanelGUI::getInstance();
490 $panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
491 $panel->setHeading($lng->txt("trac_lp_settings_info_parent_container"));
492 $panel->setBody($tpl->get());
493
494 return $panel->getHTML();
495 }
496 }
$_GET["client_id"]
getLPPathInfo($a_ref_id, array &$a_res)
Gather LP data about parent objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
const PANEL_STYLE_SECONDARY
static getInstance()
Get instance.
special template class to simplify handling of ITX/PEAR
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...

References $_GET, $DIC, ilLearningProgressBaseGUI\$lng, ilLearningProgressBaseGUI\$ref_id, ilLearningProgressBaseGUI\$tpl, ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilPanelGUI\getInstance(), getLPPathInfo(), ilUtil\getTypeIconPath(), and ilPanelGUI\PANEL_STYLE_SECONDARY.

Referenced by show().

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

◆ initFormSettings()

ilLPListOfSettingsGUI::initFormSettings ( )
protected

Init property form.

Returns
ilPropertyFormGUI $form

this is neccessary for cmix object

See also
ilCmiXapiLP::initModeOptions()

Definition at line 79 of file class.ilLPListOfSettingsGUI.php.

80 {
81 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
82 $form = new ilPropertyFormGUI();
83 $form->setTitle($this->lng->txt('tracking_settings'));
84 $form->setFormAction($this->ctrl->getFormAction($this));
85
86 // Mode
87 $mod = new ilRadioGroupInputGUI($this->lng->txt('trac_mode'), 'modus');
88 $mod->setRequired(true);
89 $mod->setValue($this->obj_lp->getCurrentMode());
90 $form->addItem($mod);
91
92 if (method_exists($this->obj_lp, 'initModeOptions')) {
97 $this->obj_lp->initModeOptions($mod);
98 } else {
99 foreach ($this->obj_lp->getValidModes() as $mode_key) {
100 $opt = new ilRadioOption(
101 $this->obj_lp->getModeText($mode_key),
102 $mode_key,
103 $this->obj_lp->getModeInfoText($mode_key)
104 );
105 $opt->setValue($mode_key);
106 $mod->addOption($opt);
107
108 // :TODO: Subitem for visits ?!
109 if ($mode_key == ilLPObjSettings::LP_MODE_VISITS) {
110 $vis = new ilNumberInputGUI($this->lng->txt('trac_visits'), 'visits');
111 $vis->setSize(3);
112 $vis->setMaxLength(4);
113 $vis->setInfo(sprintf(
114 $this->lng->txt('trac_visits_info'),
116 ));
117 $vis->setRequired(true);
118 $vis->setValue($this->obj_settings->getVisits());
119 $opt->addSubItem($vis);
120 }
121 }
122 }
123
124 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
125
126 return $form;
127 }
This class represents a number property in a property form.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.

References ilObjUserTracking\_getValidTimeSpan(), and ilLPObjSettings\LP_MODE_VISITS.

Referenced by saveSettings(), and show().

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

◆ releaseMaterials()

ilLPListOfSettingsGUI::releaseMaterials ( )
protected

Definition at line 291 of file class.ilLPListOfSettingsGUI.php.

292 {
293 if (!count((array) $_POST['item_ids'])) {
294 ilUtil::sendFailure($this->lng->txt('select_one'), true);
295 $this->ctrl->redirect($this, 'show');
296 }
297
298 $collection = $this->obj_lp->getCollectionInstance();
299 if ($collection && $collection->hasSelectableItems()) {
300 $collection->releaseGrouping((array) $_POST['item_ids']);
301
302 // refresh learning progress
303 include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
305 }
306
307 ilUtil::sendSuccess($this->lng->txt('trac_settings_saved'), true);
308 $this->ctrl->redirect($this, 'show');
309 }

References $_POST, ilLPStatusWrapper\_refreshStatus(), ilLearningProgressBaseGUI\getObjId(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ saveObligatoryMaterials()

ilLPListOfSettingsGUI::saveObligatoryMaterials ( )
protected

Save obligatory state per grouped materials.

Definition at line 314 of file class.ilLPListOfSettingsGUI.php.

315 {
316 if (!is_array((array) $_POST['grp'])) {
317 ilUtil::sendFailure($this->lng->txt('select_one'), true);
318 $this->ctrl->redirect($this, 'show');
319 }
320
321 try {
322 $collection = $this->obj_lp->getCollectionInstance();
323 if ($collection && $collection->hasSelectableItems()) {
324 $collection->saveObligatoryMaterials((array) $_POST['grp']);
325
326 // refresh learning progress
327 include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
329 }
330
331 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
332 $this->ctrl->redirect($this, 'show');
333 } catch (UnexpectedValueException $e) {
334 ilUtil::sendFailure($this->lng->txt('trac_grouped_material_obligatory_err'), true);
335 ilUtil::sendInfo($this->lng->txt('err_check_input'), true);
336 $this->ctrl->redirect($this, 'show');
337 }
338 }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_POST, Vendor\Package\$e, ilLPStatusWrapper\_refreshStatus(), ilLearningProgressBaseGUI\getObjId(), ilUtil\sendFailure(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ saveSettings()

ilLPListOfSettingsGUI::saveSettings ( )
protected

Save learning progress settings.

Returns
void

this is neccessary for cmix object

See also
ilCmiXapiLP::fetchModeOption()

Definition at line 133 of file class.ilLPListOfSettingsGUI.php.

134 {
135 $form = $this->initFormSettings();
136 if ($form->checkInput()) {
137 // anything changed?
138
139 // mode
140 if (method_exists($this->obj_lp, 'fetchModeOption')) {
145 $new_mode = (int) $this->obj_lp->fetchModeOption($form);
146 } else {
147 $new_mode = (int) $form->getInput('modus');
148 }
149 $old_mode = $this->obj_lp->getCurrentMode();
150 $mode_changed = ($old_mode != $new_mode);
151
152 // visits
153 $new_visits = null;
154 $visits_changed = null;
155 if ($new_mode == ilLPObjSettings::LP_MODE_VISITS) {
156 $new_visits = (int) $form->getInput('visits');
157 $old_visits = $this->obj_settings->getVisits();
158 $visits_changed = ($old_visits != $new_visits);
159 }
160
161 if ($mode_changed) {
162 // delete existing collection
163 $collection = $this->obj_lp->getCollectionInstance();
164 if ($collection) {
165 $collection->delete();
166 }
167 }
168
169 $refresh_lp = ($mode_changed || $visits_changed);
170
171 // has to be done before LP refresh!
172 $this->obj_lp->resetCaches();
173
174 $this->obj_settings->setMode($new_mode);
175 $this->obj_settings->setVisits($new_visits);
176 $this->obj_settings->update($refresh_lp);
177
178 if ($mode_changed &&
179 $this->obj_lp->getCollectionInstance() &&
180 $new_mode != ilLPObjSettings::LP_MODE_MANUAL_BY_TUTOR) { // #14819
181 ilUtil::sendInfo($this->lng->txt('trac_edit_collection'), true);
182 }
183 ilUtil::sendSuccess($this->lng->txt('trac_settings_saved'), true);
184 $this->ctrl->redirect($this, 'show');
185 }
186
187 $form->setValuesByPost();
188 ilUtil::sendFailure($this->lng->txt('err_check_input'));
189
190 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_obj_settings.html', 'Services/Tracking');
191 $this->tpl->setVariable('PROP_FORM', $form->getHTML());
192 $this->tpl->setVariable('COLLECTION_TABLE', $this->getTableByMode());
193 }
initFormSettings()
Init property form.

References getTableByMode(), initFormSettings(), ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR, ilLPObjSettings\LP_MODE_VISITS, ilUtil\sendFailure(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ show()

ilLPListOfSettingsGUI::show ( )
protected

Show settings tables.

Definition at line 52 of file class.ilLPListOfSettingsGUI.php.

53 {
54 global $DIC;
55
56 $ilHelp = $DIC['ilHelp'];
57
58 $ilHelp->setSubScreenId("trac_settings");
59
60 $info = $this->obj_lp->getSettingsInfo();
61 if ($info) {
62 ilUtil::sendInfo($info);
63 }
64
65 $form = $this->initFormSettings();
66 $this->tpl->setContent(
67 $this->handleLPUsageInfo() .
68 $form->getHTML() .
69 $this->getTableByMode()
70 );
71 }

References $DIC, handleLPUsageInfo(), initFormSettings(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ updateTLT()

ilLPListOfSettingsGUI::updateTLT ( )
protected

Definition at line 340 of file class.ilLPListOfSettingsGUI.php.

341 {
342 include_once "Services/MetaData/classes/class.ilMD.php";
343 foreach ($_POST['tlt'] as $item_id => $item) {
344 $md_obj = new ilMD($this->getObjId(), $item_id, 'st');
345 if (!is_object($md_section = $md_obj->getEducational())) {
346 $md_section = $md_obj->addEducational();
347 $md_section->save();
348 }
349 $md_section->setPhysicalTypicalLearningTime(
350 (int) $item['mo'],
351 (int) $item['d'],
352 (int) $item['h'],
353 (int) $item['m'],
354 0
355 );
356 $md_section->update();
357 }
358
359 // refresh learning progress
360 include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
362
363 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
364 $this->ctrl->redirect($this, 'show');
365 }

References $_POST, ilLPStatusWrapper\_refreshStatus(), and ilLearningProgressBaseGUI\getObjId().

+ Here is the call graph for this function:

Field Documentation

◆ $obj_lp

ilLPListOfSettingsGUI::$obj_lp
protected

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

◆ $obj_settings

ilLPListOfSettingsGUI::$obj_settings
protected

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


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