5 include_once
'./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php';
6 include_once
'./Services/Tracking/classes/class.ilLPObjSettings.php';
34 switch($this->ctrl->getNextClass())
48 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.lp_obj_settings.html',
'Services/Tracking');
50 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormaction($this));
52 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'tracking_settings'));
53 $this->tpl->setVariable(
"TXT_TRACKING_SETTINGS", $this->lng->txt(
"tracking_settings"));
55 $this->tpl->setVariable(
"TXT_ACTIVATE_TRACKING", $this->lng->txt(
"trac_activated"));
59 $this->tpl->setVariable(
"ACTIVATED_STATUS",$activated ? $this->lng->txt(
'yes') : $this->lng->txt(
'no'));
61 $this->tpl->setVariable(
"TXT_USER_RELATED_DATA", $this->lng->txt(
"trac_anonymized"));
65 $this->tpl->setVariable(
"ANONYMIZED_STATUS",$anonymized ? $this->lng->txt(
'no') : $this->lng->txt(
'yes'));
67 $this->tpl->setVariable(
"TXT_VALID_REQUEST",$this->lng->txt(
'trac_valid_request'));
68 $this->tpl->setVariable(
"INFO_VALID_REQUEST",$this->lng->txt(
'info_valid_request'));
69 $this->tpl->setVariable(
"SECONDS",$this->lng->txt(
'seconds'));
76 $this->tpl->setCurrentBlock(
"visits");
77 $this->tpl->setVariable(
"TXT_VISITS",$this->lng->txt(
'trac_num_visits'));
78 $this->tpl->setVariable(
"NUM_VISITS",$this->obj_settings->getVisits());
79 $this->tpl->setVariable(
"INFO_VISITS",$this->lng->txt(
'trac_visits_info'));
80 $this->tpl->parseCurrentBlock();
83 $this->tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
92 $this->obj_settings->setMode(
$_POST[
'modus']);
95 $this->obj_settings->setVisits((
int) $_POST[
'visits']);
97 $this->obj_settings->update();
109 if(count(
$_POST[
'item_ids']))
111 include_once
'Services/Tracking/classes/class.ilLPCollections.php';
115 $lp_collections->add($ref_id);
119 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
134 if(count(
$_POST[
'item_ids']))
136 include_once
'Services/Tracking/classes/class.ilLPCollections.php';
140 $lp_collections->delete($ref_id);
144 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
153 switch($this->obj_settings->getMode())
172 global $ilObjDataCache,$tree;
174 include_once
'Services/Tracking/classes/class.ilLPCollections.php';
175 include_once
'./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php';
185 $tpl =&
new ilTemplate(
'tpl.trac_collections.html',
true,
true,
'Services/Tracking');
188 $tpl->setVariable(
"COLL_TITLE_IMG_ALT",$this->lng->txt(
'trac_lp_determination'));
191 $tpl->setVariable(
"TABLE_TITLE", $this->lng->txt(
'trac_lp_determination'));
192 $tpl->setVariable(
"TABLE_INFO", $this->lng->txt(
'trac_lp_determination_info_sco'));
197 $tpl->setVariable(
"BTN_ASSIGN",$this->lng->txt(
'trac_collection_assign'));
198 $tpl->setVariable(
"BTN_DEASSIGN",$this->lng->txt(
'trac_collection_deassign'));
203 $tpl->addBlockFile(
'MATERIALS',
'materials',
'tpl.trac_collections_sco_row.html',
'Services/Tracking');
205 foreach($items as $obj_id =>
$data)
207 $tpl->setCurrentBlock(
"materials");
208 $tpl->setVariable(
"COLL_TITLE",
$data[
'title']);
213 $tpl->setVariable(
"ASSIGNED_IMG_OK",$lp_collections->isAssigned($obj_id)
216 $tpl->setVariable(
"ASSIGNED_STATUS",$lp_collections->isAssigned($obj_id)
217 ? $this->lng->txt(
'trac_assigned')
218 : $this->lng->txt(
'trac_not_assigned'));
221 $tpl->parseCurrentBlock();
224 $tpl->setVariable(
"SELECT_ALL",$this->lng->txt(
'select_all'));
225 $this->tpl->setVariable(
"COLLECTION_TABLE",
$tpl->get());
233 global $ilObjDataCache,$tree;
235 include_once
'Services/Tracking/classes/class.ilLPCollections.php';
236 include_once
'classes/class.ilLink.php';
237 include_once
'classes/class.ilFrameTargetInfo.php';
242 $tpl =&
new ilTemplate(
'tpl.trac_collections.html',
true,
true,
'Services/Tracking');
244 $tpl->setVariable(
"COLL_TITLE_IMG_ALT",$this->lng->txt(
'trac_lp_determination'));
251 $tpl->setVariable(
"TABLE_TITLE",$this->lng->txt(
'trac_lp_determination'));
252 $tpl->setVariable(
"TABLE_INFO",$this->lng->txt(
'trac_lp_determination_info_crs'));
256 $tpl->setVariable(
"TABLE_TITLE",$this->lng->txt(
'trac_lp_determination_tutor'));
257 $tpl->setVariable(
"TABLE_INFO",$this->lng->txt(
'trac_lp_determination_info_crs_tutor'));
260 $tpl->setVariable(
"ITEM_DESC",$this->lng->txt(
'trac_crs_items'));
261 $tpl->setVariable(
"ITEM_ASSIGNED",$this->lng->txt(
'trac_assigned'));
264 $tpl->setVariable(
"BTN_ASSIGN",$this->lng->txt(
'trac_collection_assign'));
265 $tpl->setVariable(
"BTN_DEASSIGN",$this->lng->txt(
'trac_collection_deassign'));
270 $tpl->setCurrentBlock(
"no_items");
271 $tpl->setVariable(
"NO_ITEM_MESSAGE",$this->lng->txt(
'trac_no_items'));
272 $tpl->parseCurrentBlock();
276 $tpl->addBlockFile(
'MATERIALS',
'materials',
'tpl.trac_collections_row.html',
'Services/Tracking');
281 $obj_id = $ilObjDataCache->lookupObjId($ref_id);
282 $type = $ilObjDataCache->lookupType($obj_id);
286 $tpl->setCurrentBlock(
"materials");
289 $tpl->setVariable(
'ALT_IMG',$this->lng->txt(
'obj_'.$type));
294 $tpl->setVariable(
"COLL_MODE",
295 $this->lng->txt(
'trac_mode').
": ".
300 $tpl->setVariable(
"COLL_MODE",
301 $this->lng->txt(
'trac_mode').
":");
302 $tpl->setVariable(
"COLL_MODE_DEACTIVATED",
307 $tpl->setVariable(
"ANONYMIZED",$this->lng->txt(
'trac_anonymized_info_short'));
313 $tpl->setVariable(
"COLL_DESC",$ilObjDataCache->lookupDescription($obj_id));
314 $tpl->setVariable(
"COLL_TITLE",$ilObjDataCache->lookupTitle($obj_id));
323 $tpl->setVariable(
"COLL_PATH",$this->lng->txt(
'path').
": ".
$path);
326 $tpl->setVariable(
"ASSIGNED_IMG_OK",$lp_collections->isAssigned($ref_id)
329 $tpl->setVariable(
"ASSIGNED_STATUS",$lp_collections->isAssigned($ref_id)
330 ? $this->lng->txt(
'trac_assigned')
331 : $this->lng->txt(
'trac_not_assigned'));
334 $tpl->parseCurrentBlock();
338 $tpl->setVariable(
"SELECT_ALL",$this->lng->txt(
'select_all'));
340 $this->tpl->setVariable(
"COLLECTION_TABLE",
$tpl->get());
344 $message = $this->lng->txt(
'trac_settings_saved');
346 if($this->obj_settings->getMode() ==
$_POST[
'modus'])
357 $message = $this->lng->txt(
'trac_edit_collection');
362 $message = $this->lng->txt(
'trac_edit_visits');
376 #$path = $this->__formatPath($tree->getPathFull($ref_id));
377 #$tpl->setVariable("COLL_PATH",$this->lng->txt('path').": ".$path);
379 foreach($a_path_arr as
$data)
381 if(!$tree->isGrandChild($this->getRefId(),$data[
'ref_id']))
385 if($a_ref_id == $data[
'ref_id'])
393 $path .= $data[
'title'];
404 include_once
'./Modules/Test/classes/class.ilObjTest.php';
425 $this->tpl->setVariable(
'TXT_MODE',$this->lng->txt(
'trac_mode'));
427 foreach($this->obj_settings->getValidModes() as $mode_key => $mode_name)
429 $this->tpl->setCurrentBlock(
'mode_check');
430 $this->tpl->setVariable(
'RADIO_ID',$mode_key);
431 $this->tpl->setVariable(
'RADIO_CHECKED',$mode_key == $this->obj_settings->getMode() ?
' checked="checked"' :
'');
432 $this->tpl->setVariable(
'RADIO_VALUE',$mode_key);
433 $this->tpl->setVariable(
'MODE_NAME',$mode_name);
435 $this->tpl->parseCurrentBlock();