ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilSAHSPresentationGUI Class Reference

Class ilSAHSPresentationGUI. More...

+ Collaboration diagram for ilSAHSPresentationGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 execute command More...
 
 attrib2arr (&$a_attributes)
 
 frameset ()
 output main menu More...
 
 explorer ($a_target="sahs_content")
 output table of content More...
 
 view ()
 
 api ()
 
 launchSahs ()
 
 finishSahs ()
 
 unloadSahs ()
 
 launchAsset ()
 
 setSingleVariable ($a_var, $a_value)
 set single value More...
 
 setArray ($a_left, $a_value, $a_name, &$v_array)
 set single value More...
 
 infoScreen ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 setInfoTabs ($a_active)
 
 outputInfoScreen ()
 info screen More...
 

Data Fields

 $ilias
 
 $tpl
 
 $lng
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSAHSPresentationGUI::__construct ( )

Definition at line 27 of file class.ilSAHSPresentationGUI.php.

28 {
29 global $ilias, $tpl, $lng, $ilCtrl;
30
31 $this->ilias = $ilias;
32 $this->tpl = $tpl;
33 $this->lng = $lng;
34 $this->ctrl = $ilCtrl;
35
36 $this->ctrl->saveParameter($this, "ref_id");
37 }
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file)

References $ilCtrl, $ilias, $lng, and $tpl.

Member Function Documentation

◆ api()

ilSAHSPresentationGUI::api ( )

Definition at line 252 of file class.ilSAHSPresentationGUI.php.

253 {
254 global $ilias;
255
256 $slm_obj = new ilObjSCORMLearningModule($_GET["ref_id"]);
257
258 $this->tpl = new ilTemplate("tpl.sahs_api.html", true, true, "Modules/ScormAicc");
259 $this->tpl->setVariable("USER_ID", $ilias->account->getId());
260 $this->tpl->setVariable("USER_FIRSTNAME", $ilias->account->getFirstname());
261 $this->tpl->setVariable("USER_LASTNAME", $ilias->account->getLastname());
262 $this->tpl->setVariable("REF_ID", $_GET["ref_id"]);
263 $this->tpl->setVariable("SESSION_ID", session_id());
264
265 $this->tpl->setVariable("CODE_BASE", "http://" . $_SERVER['SERVER_NAME'] . substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], "/ilias.php")));
266 $this->tpl->parseCurrentBlock();
267
268 $this->tpl->show(false);
269 exit;
270 }
$_GET["client_id"]
Class ilObjSCORMLearningModule.
special template class to simplify handling of ITX/PEAR
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']

References $_GET, $_SERVER, $ilias, and exit.

◆ attrib2arr()

ilSAHSPresentationGUI::attrib2arr ( $a_attributes)

Definition at line 159 of file class.ilSAHSPresentationGUI.php.

160 {
161 $attr = array();
162
163 if (!is_array($a_attributes)) {
164 return $attr;
165 }
166 foreach ($a_attributes as $attribute) {
167 $attr[$attribute->name()] = $attribute->value();
168 }
169
170
171 return $attr;
172 }

◆ executeCommand()

ilSAHSPresentationGUI::executeCommand ( )

execute command

Definition at line 42 of file class.ilSAHSPresentationGUI.php.

43 {
44 global $lng,$ilAccess, $ilNavigationHistory, $ilCtrl, $ilLocator, $ilObjDataCache;
45
46 include_once "./Services/Object/classes/class.ilObjectGUI.php";
47 include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
48
49 $lng->loadLanguageModule("content");
50 $obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
51
52 // add entry to navigation history
53 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
54 include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleAccess.php");
56
58 $ilNavigationHistory->addItem(
59 $_GET["ref_id"],
60 "ilias.php?cmd=infoScreen&baseClass=ilSAHSPresentationGUI&ref_id=" . $_GET["ref_id"],
61 "lm"
62 );
63 }
64 }
65
66 $next_class = $this->ctrl->getNextClass($this);
67 $cmd = $this->ctrl->getCmd();
68
70
71 if ($cmd == "downloadCertificate") {
72 require_once "./Modules/ScormAicc/classes/SCORM/class.ilSCORMPresentationGUI.php";
73 $scorm_gui = new ilSCORMPresentationGUI();
74 $ret = $this->ctrl->forwardCommand($scorm_gui);
75 }
76
77 if (substr($cmd, 0, 11) == "offlineMode" || $this->offline_mode) {
78 $next_class = "ilscormofflinemodegui";
79 }
80
81 include_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
82 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $_GET["ref_id"], true, false);
83
84 if ($next_class != "ilinfoscreengui" &&
85 $cmd != "infoScreen" &&
86 $next_class != "ilobjscorm2004learningmodulegui" &&
87 $next_class != "ilobjscormlearningmodulegui" &&
88 $next_class != "ilscormofflinemodegui" &&
89 $next_class != "illearningprogressgui") {
90 include_once("./Services/License/classes/class.ilLicense.php");
91 ilLicense::_noteAccess($obj_id, "sahs", $_GET["ref_id"]);
92 switch ($type) {
93 case "scorm2004":
94 $this->ctrl->setCmdClass("ilscorm13player");
95 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $_GET["ref_id"], true, false);
96 break;
97
98 case "scorm":
99 $this->ctrl->setCmdClass("ilscormpresentationgui");
100 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $_GET["ref_id"], true, false);
101 break;
102 }
103 $next_class = $this->ctrl->getNextClass($this);
104 }
105
106 switch ($next_class) {
107 case "ilinfoscreengui":
108 $ret = $this->outputInfoScreen();
109 break;
110
111 case "ilscorm13player":
112 require_once "./Modules/Scorm2004/classes/ilSCORM13Player.php";
113 $scorm_gui = new ilSCORM13Player();
114 $ret = $this->ctrl->forwardCommand($scorm_gui);
115 break;
116
117 case "ilscormpresentationgui":
118 require_once "./Modules/ScormAicc/classes/SCORM/class.ilSCORMPresentationGUI.php";
119 $scorm_gui = new ilSCORMPresentationGUI();
120 $ret = $this->ctrl->forwardCommand($scorm_gui);
121 break;
122
123
124 case "illearningprogressgui":
125 $this->setInfoTabs("learning_progress");
126 include_once "./Services/Tracking/classes/class.ilLearningProgressGUI.php";
128 $this->ctrl->forwardCommand($new_gui);
129 $this->tpl->show();
130 break;
131
132 case "ilscormofflinemodegui":
133 include_once "./Modules/ScormAicc/classes/class.ilSCORMOfflineModeGUI.php";
134 $new_gui = new ilSCORMOfflineModeGUI($type);
135 $this->ctrl->forwardCommand($new_gui);
136 break;
137
138 case "ilobjscorm2004learningmodulegui":
139 include_once './Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModuleGUI.php';
140 $new_gui = new ilObjSCORM2004LearningModuleGUI("", $_GET["ref_id"], true, false);
141 $this->ctrl->forwardCommand($new_gui);
142 $this->setInfoTabs("cont_tracking_data");
143 $this->tpl->show();
144 break;
145
146 case "ilobjscormlearningmodulegui":
147 include_once './Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php';
148 $new_gui = new ilObjSCORMLearningModuleGUI("", $_GET["ref_id"], true, false);
149 $this->ctrl->forwardCommand($new_gui);
150 $this->setInfoTabs("cont_tracking_data");
151 $this->tpl->show();
152 break;
153
154 default:
155 $this->$cmd();
156 }
157 }
Class ilObjUserTrackingGUI.
static _noteAccess($a_obj_id, $a_type, $a_ref_id)
Note the access of the current usr to an object.
static _lookupEditable($a_obj_id)
Lookup editable.
static _lookupUserIsOfflineMode($a_obj_id)
Checks offlineMode and returns false if.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
Class ilObjSCORMLearningModuleGUI.
static _lookupObjectId($a_ref_id)
lookup object id
GUI class ilSCORMOfflineModeGUI.
Class ilSCORMPresentationGUI.
$ret
Definition: parser.php:6
$type

References $_GET, $ilCtrl, $lng, $ret, $type, ilObjSAHSLearningModuleAccess\_lookupEditable(), ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilObjSAHSLearningModuleAccess\_lookupUserIsOfflineMode(), ilLicense\_noteAccess(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, outputInfoScreen(), and setInfoTabs().

+ Here is the call graph for this function:

◆ explorer()

ilSAHSPresentationGUI::explorer (   $a_target = "sahs_content")

output table of content

Definition at line 190 of file class.ilSAHSPresentationGUI.php.

191 {
192 global $ilBench;
193
194 $ilBench->start("SAHSExplorer", "initExplorer");
195
196 $this->tpl = new ilTemplate("tpl.sahs_exp_main.html", true, true, "Modules/ScormAicc");
197
198 require_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMExplorer.php");
199 $exp = new ilSCORMExplorer("ilias.php?baseClass=ilSAHSPresentationGUI&cmd=view&ref_id=" . $this->slm->getRefId(), $this->slm);
200 $exp->setTargetGet("obj_id");
201 $exp->setFrameTarget($a_target);
202
203 //$exp->setFiltered(true);
204
205 if ($_GET["scexpand"] == "") {
206 $mtree = new ilSCORMTree($this->slm->getId());
207 $expanded = $mtree->readRootId();
208 } else {
209 $expanded = $_GET["scexpand"];
210 }
211 $exp->setExpand($expanded);
212
213 $exp->forceExpandAll(true, false);
214
215 // build html-output
216 //666$exp->setOutput(0);
217 $ilBench->stop("SAHSExplorer", "initExplorer");
218
219 // set output
220 $ilBench->start("SAHSExplorer", "setOutput");
221 $exp->setOutput(0);
222 $ilBench->stop("SAHSExplorer", "setOutput");
223
224 $ilBench->start("SAHSExplorer", "getOutput");
225 $output = $exp->getOutput();
226 $ilBench->stop("SAHSExplorer", "getOutput");
227
228 $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
229 $this->tpl->addBlockFile("CONTENT", "content", "tpl.sahs_explorer.html", "Modules/ScormAicc");
230 //$this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("cont_content"));
231 $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
232 $this->tpl->setVariable("EXPLORER", $output);
233 $this->tpl->setVariable("ACTION", "ilias.php?baseClass=ilSAHSPresentationGUI&cmd=" . $_GET["cmd"] . "&frame=" . $_GET["frame"] .
234 "&ref_id=" . $this->slm->getRefId() . "&scexpand=" . $_GET["scexpand"]);
235 $this->tpl->parseCurrentBlock();
236 $this->tpl->show();
237 }
Explorer View for SCORM Learning Modules.
SCORM Object Tree.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
global $ilBench
Definition: ilias.php:18

References $_GET, $ilBench, $output, and ilUtil\getStyleSheetLocation().

+ Here is the call graph for this function:

◆ finishSahs()

ilSAHSPresentationGUI::finishSahs ( )

Definition at line 455 of file class.ilSAHSPresentationGUI.php.

456 {
457 global $lng;
458 $this->tpl = new ilTemplate("tpl.sahs_finish_cbt.html", true, true, "Modules/ScormAicc");
459 $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
460
461 $this->tpl->setCurrentBlock("switch_icon");
462 $this->tpl->setVariable("SCO_ID", $_GET["sahs_id"]);
463 $this->tpl->setVariable(
464 "SCO_ICO",
466 "scorm/" . str_replace(" ", "_", $_GET["status"]) . '.svg'
467 )
468 );
469 $this->tpl->setVariable(
470 "SCO_ALT",
471 $lng->txt("cont_status") . ": "
472 . $lng->txt("cont_sc_stat_" . str_replace(" ", "_", $_GET["status"])) . ", "
473 . $lng->txt("cont_total_time") . ": "
474 . $_GET["totime"]
475 );
476 $this->tpl->setVariable("SCO_LAUNCH_ID", $_GET["launch"]);
477 $this->tpl->parseCurrentBlock();
478 $this->tpl->show();
479 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $_GET, $lng, ilUtil\getImagePath(), and ilUtil\getStyleSheetLocation().

+ Here is the call graph for this function:

◆ frameset()

ilSAHSPresentationGUI::frameset ( )

output main menu

Definition at line 178 of file class.ilSAHSPresentationGUI.php.

179 {
180 $this->tpl = new ilTemplate("tpl.sahs_pres_frameset.html", false, false, "Modules/ScormAicc");
181 $this->tpl->setVariable("REF_ID", $this->slm->getRefId());
182 $this->tpl->show("DEFAULT", false);
183 exit;
184 }

References exit.

◆ infoScreen()

ilSAHSPresentationGUI::infoScreen ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 550 of file class.ilSAHSPresentationGUI.php.

551 {
552 $this->ctrl->setCmd("showSummary");
553 $this->ctrl->setCmdClass("ilinfoscreengui");
554 $this->outputInfoScreen();
555 }

References outputInfoScreen().

+ Here is the call graph for this function:

◆ launchAsset()

ilSAHSPresentationGUI::launchAsset ( )

Definition at line 490 of file class.ilSAHSPresentationGUI.php.

491 {
492 global $ilUser, $ilDB;
493
494 $sco_id = ($_GET["asset_id"] == "")
495 ? $_POST["asset_id"]
496 : $_GET["asset_id"];
497 $ref_id = ($_GET["ref_id"] == "")
498 ? $_POST["ref_id"]
499 : $_GET["ref_id"];
500
501 $this->slm = new ilObjSCORMLearningModule($ref_id, true);
502
503 include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
504 include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMResource.php");
505 $item = new ilSCORMItem($sco_id);
506
507 $id_ref = $item->getIdentifierRef();
508 $resource = new ilSCORMResource();
509 $resource->readByIdRef($id_ref, $item->getSLMId());
510 $href = $resource->getHref();
511 $this->tpl->setVariable("HREF", $this->slm->getDataDirectory("output") . "/" . $href);
512 $this->tpl = new ilTemplate("tpl.scorm_launch_asset.html", true, true, "Modules/ScormAicc");
513 $this->tpl->setVariable("HREF", $this->slm->getDataDirectory("output") . "/" . $href);
514 $this->tpl->show();
515 }
$_POST["username"]
global $ilDB
$ilUser
Definition: imgupload.php:18

References $_GET, $_POST, $ilDB, and $ilUser.

◆ launchSahs()

ilSAHSPresentationGUI::launchSahs ( )

Definition at line 272 of file class.ilSAHSPresentationGUI.php.

273 {
274 global $ilUser, $ilDB;
275
276 $sco_id = ($_GET["sahs_id"] == "")
277 ? $_POST["sahs_id"]
278 : $_GET["sahs_id"];
279 $ref_id = ($_GET["ref_id"] == "")
280 ? $_POST["ref_id"]
281 : $_GET["ref_id"];
282
283 $this->slm = new ilObjSCORMLearningModule($ref_id, true);
284
285 include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
286 include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMResource.php");
287 $item = new ilSCORMItem($sco_id);
288
289 $id_ref = $item->getIdentifierRef();
290 $resource = new ilSCORMResource();
291 $resource->readByIdRef($id_ref, $item->getSLMId());
292 //$slm_obj = new ilObjSCORMLearningModule($_GET["ref_id"]);
293 $href = $resource->getHref();
294 $this->tpl = new ilTemplate("tpl.sahs_launch_cbt.html", true, true, "Modules/ScormAicc");
295 $this->tpl->setVariable("HREF", $this->slm->getDataDirectory("output") . "/" . $href);
296
297 // set item data
298 $this->tpl->setVariable("LAUNCH_DATA", $item->getDataFromLms());
299 $this->tpl->setVariable("MAST_SCORE", $item->getMasteryScore());
300 $this->tpl->setVariable("MAX_TIME", $item->getMaxTimeAllowed());
301 $this->tpl->setVariable("LIMIT_ACT", $item->getTimeLimitAction());
302
303 // set alternative API name
304 if ($this->slm->getAPIAdapterName() != "API") {
305 $this->tpl->setCurrentBlock("alt_api_ref");
306 $this->tpl->setVariable("API_NAME", $this->slm->getAPIAdapterName());
307 $this->tpl->parseCurrentBlock();
308 }
309
310 $val_set = $ilDB->queryF(
311 '
312 SELECT * FROM scorm_tracking
313 WHERE user_id = %s
314 AND sco_id = %s
315 AND obj_id = %s',
316 array('integer','integer','integer'),
317 array($ilUser->getId(),$sco_id,$this->slm->getId())
318 );
319
320 $re_value = array();
321
322 while ($val_rec = $ilDB->fetchAssoc($val_set)) {
323 $val_rec["rvalue"] = str_replace("\r\n", "\n", $val_rec["rvalue"]);
324 $val_rec["rvalue"] = str_replace("\r", "\n", $val_rec["rvalue"]);
325 $val_rec["rvalue"] = str_replace("\n", "\\n", $val_rec["rvalue"]);
326 $re_value[$val_rec["lvalue"]] = $val_rec["rvalue"];
327 }
328
329 foreach ($re_value as $var => $value) {
330 switch ($var) {
331 case "cmi.core.lesson_location":
332 case "cmi.core.lesson_status":
333 case "cmi.core.entry":
334 case "cmi.core.score.raw":
335 case "cmi.core.score.max":
336 case "cmi.core.score.min":
337 case "cmi.core.total_time":
338 case "cmi.core.exit":
339 case "cmi.suspend_data":
340 case "cmi.comments":
341 case "cmi.student_preference.audio":
342 case "cmi.student_preference.language":
343 case "cmi.student_preference.speed":
344 case "cmi.student_preference.text":
345 $this->setSingleVariable($var, $value);
346 break;
347
348 case "cmi.objectives._count":
349 $this->setSingleVariable($var, $value);
350 $this->setArray("cmi.objectives", $value, "id", $re_value);
351 $this->setArray("cmi.objectives", $value, "score.raw", $re_value);
352 $this->setArray("cmi.objectives", $value, "score.max", $re_value);
353 $this->setArray("cmi.objectives", $value, "score.min", $re_value);
354 $this->setArray("cmi.objectives", $value, "status", $re_value);
355 break;
356
357 case "cmi.interactions._count":
358 $this->setSingleVariable($var, $value);
359 $this->setArray("cmi.interactions", $value, "id", $re_value);
360 for ($i=0; $i<$value; $i++) {
361 $var2 = "cmi.interactions." . $i . ".objectives._count";
362 if (isset($v_array[$var2])) {
363 $cnt = $v_array[$var2];
364 $this->setArray(
365 "cmi.interactions." . $i . ".objectives",
366 $cnt,
367 "id",
368 $re_value
369 );
370 /*
371 $this->setArray("cmi.interactions.".$i.".objectives",
372 $cnt, "score.raw", $re_value);
373 $this->setArray("cmi.interactions.".$i.".objectives",
374 $cnt, "score.max", $re_value);
375 $this->setArray("cmi.interactions.".$i.".objectives",
376 $cnt, "score.min", $re_value);
377 $this->setArray("cmi.interactions.".$i.".objectives",
378 $cnt, "status", $re_value);*/
379 }
380 }
381 $this->setArray("cmi.interactions", $value, "time", $re_value);
382 $this->setArray("cmi.interactions", $value, "type", $re_value);
383 for ($i=0; $i<$value; $i++) {
384 $var2 = "cmi.interactions." . $i . ".correct_responses._count";
385 if (isset($v_array[$var2])) {
386 $cnt = $v_array[$var2];
387 $this->setArray(
388 "cmi.interactions." . $i . ".correct_responses",
389 $cnt,
390 "pattern",
391 $re_value
392 );
393 $this->setArray(
394 "cmi.interactions." . $i . ".correct_responses",
395 $cnt,
396 "weighting",
397 $re_value
398 );
399 }
400 }
401 $this->setArray("cmi.interactions", $value, "student_response", $re_value);
402 $this->setArray("cmi.interactions", $value, "result", $re_value);
403 $this->setArray("cmi.interactions", $value, "latency", $re_value);
404 break;
405 }
406 }
407
408 global $lng;
409 $this->tpl->setCurrentBlock("switch_icon");
410 $this->tpl->setVariable("SCO_ID", $_GET["sahs_id"]);
411 $this->tpl->setVariable("SCO_ICO", ilUtil::getImagePath("scorm/running.svg"));
412 $this->tpl->setVariable(
413 "SCO_ALT",
414 $lng->txt("cont_status") . ": "
415 . $lng->txt("cont_sc_stat_running")
416 );
417 $this->tpl->parseCurrentBlock();
418
419 // lesson mode
420 $lesson_mode = $this->slm->getDefaultLessonMode();
421 if ($this->slm->getAutoReview()) {
422 if ($re_value["cmi.core.lesson_status"] == "completed" ||
423 $re_value["cmi.core.lesson_status"] == "passed" ||
424 $re_value["cmi.core.lesson_status"] == "failed") {
425 $lesson_mode = "review";
426 }
427 }
428 $this->tpl->setVariable("LESSON_MODE", $lesson_mode);
429
430 // credit mode
431 if ($lesson_mode == "normal") {
432 $this->tpl->setVariable(
433 "CREDIT_MODE",
434 str_replace("_", "-", $this->slm->getCreditMode())
435 );
436 } else {
437 $this->tpl->setVariable("CREDIT_MODE", "no-credit");
438 }
439
440 // init cmi.core.total_time, cmi.core.lesson_status and cmi.core.entry
441 $sahs_obj_id = ilObject::_lookupObjId($_GET["ref_id"]);
442 if (!isset($re_value["cmi.core.total_time"])) {
443 $item->insertTrackData("cmi.core.total_time", "0000:00:00", $sahs_obj_id);
444 }
445 if (!isset($re_value["cmi.core.lesson_status"])) {
446 $item->insertTrackData("cmi.core.lesson_status", "not attempted", $sahs_obj_id);
447 }
448 if (!isset($re_value["cmi.core.entry"])) {
449 $item->insertTrackData("cmi.core.entry", "", $sahs_obj_id);
450 }
451
452 $this->tpl->show();
453 }
static _lookupObjId($a_id)
setArray($a_left, $a_value, $a_name, &$v_array)
set single value
setSingleVariable($a_var, $a_value)
set single value
$i
Definition: disco.tpl.php:19

References $_GET, $_POST, $i, $ilDB, $ilUser, $lng, ilObject\_lookupObjId(), ilUtil\getImagePath(), setArray(), and setSingleVariable().

+ Here is the call graph for this function:

◆ outputInfoScreen()

ilSAHSPresentationGUI::outputInfoScreen ( )

info screen

Definition at line 623 of file class.ilSAHSPresentationGUI.php.

624 {
625 global $ilAccess;
626
627 //$this->tpl->setHeaderPageTitle("PAGETITLE", " - ".$this->lm->getTitle());
628
629 // set style sheets
630 /*
631 if (!$this->offlineMode())
632 {
633 $this->tpl->setStyleSheetLocation(ilUtil::getStyleSheetLocation());
634 }
635 else
636 {
637 $style_name = $this->ilias->account->prefs["style"].".css";;
638 $this->tpl->setStyleSheetLocation("./".$style_name);
639 }*/
640
641 $this->setInfoTabs("info_short");
642
643 $this->lng->loadLanguageModule("meta");
644
645 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
646
647 $info = new ilInfoScreenGUI($this->slm_gui);
648 $info->enablePrivateNotes();
649 //$info->enableLearningProgress();
650
651 $info->enableNews();
652 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
653 $info->enableNewsEditing();
654 $news_set = new ilSetting("news");
655 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
656 if ($enable_internal_rss) {
657 $info->setBlockProperty("news", "settings", true);
658 }
659 }
660
661 // add read / back button
662 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
663 $ilToolbar = $GLOBALS['DIC']->toolbar();
664 $ilToolbar->addButtonInstance($this->slm_gui->object->getViewButton());
665 }
666
667 // show standard meta data section
668 $info->addMetaDataSections(
669 $this->slm_gui->object->getId(),
670 0,
671 $this->slm_gui->object->getType()
672 );
673
674 /*
675 if ($this->offlineMode())
676 {
677 $this->tpl->setContent($info->getHTML());
678 return $this->tpl->get();
679 }
680 else
681 {*/
682 // forward the command
683 $this->ctrl->forwardCommand($info);
684 $this->tpl->show();
685 //}
686 }
Class ilInfoScreenGUI.
ILIAS Setting Class.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$info
Definition: index.php:5

References $_GET, $GLOBALS, $info, and setInfoTabs().

Referenced by executeCommand(), and infoScreen().

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

◆ setArray()

ilSAHSPresentationGUI::setArray (   $a_left,
  $a_value,
  $a_name,
$v_array 
)

set single value

Definition at line 532 of file class.ilSAHSPresentationGUI.php.

533 {
534 for ($i=0; $i<$a_value; $i++) {
535 $var = $a_left . "." . $i . "." . $a_name;
536 if (isset($v_array[$var])) {
537 $this->tpl->setCurrentBlock("set_value");
538 $this->tpl->setVariable("VAR", $var);
539 $this->tpl->setVariable("VALUE", $v_array[$var]);
540 $this->tpl->parseCurrentBlock();
541 }
542 }
543 }

References $i.

Referenced by launchSahs().

+ Here is the caller graph for this function:

◆ setInfoTabs()

ilSAHSPresentationGUI::setInfoTabs (   $a_active)

Definition at line 557 of file class.ilSAHSPresentationGUI.php.

558 {
559 global $DIC;
560
561 if (
562 !$DIC->access()->checkAccess('visible', '', (int) $_GET["ref_id"]) &&
563 !$DIC->access()->checkAccess('read', '', (int) $_GET["ref_id"])
564 ) {
565 $DIC['ilErr']->raiseError($this->lng->txt('msg_no_perm_read'), $DIC['ilErr']->MESSAGE);
566 }
567
568 // $ilTabs->clearTargets();
569 // #9658 / #11753
570 include_once "Services/Tracking/classes/class.ilLearningProgressAccess.php";
572 $DIC->tabs()->addTab(
573 "info_short",
574 $this->lng->txt("info_short"),
575 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
576 );
577
578 $DIC->tabs()->addTab(
579 "learning_progress",
580 $this->lng->txt("learning_progress"),
581 $this->ctrl->getLinkTargetByClass('illearningprogressgui', '')
582 );
583 }
584 if ($DIC->access()->checkAccess("edit_learning_progress", "", $_GET["ref_id"]) || $DIC->access()->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
585 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
587 if ($privacy->enabledSahsProtocolData()) {
588 include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
589 $obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
591 if ($type == "scorm2004") {
592 $DIC->tabs()->addTab(
593 "cont_tracking_data",
594 $this->lng->txt("cont_tracking_data"),
595 $this->ctrl->getLinkTargetByClass('ilobjscorm2004learningmodulegui', 'showTrackingItems')
596 );
597 } elseif ($type == "scorm") {
598 $DIC->tabs()->addTab(
599 "cont_tracking_data",
600 $this->lng->txt("cont_tracking_data"),
601 $this->ctrl->getLinkTargetByClass('ilobjscormlearningmodulegui', 'showTrackingItems')
602 );
603 }
604 }
605 }
606 $DIC->tabs()->activateTab($a_active);
607 $this->tpl->getStandardTemplate();
608 $this->tpl->setTitle($this->slm_gui->object->getTitle());
609 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
610 $DIC['ilLocator']->addRepositoryItems();
611 $DIC['ilLocator']->addItem(
612 $this->slm_gui->object->getTitle(),
613 $this->ctrl->getLinkTarget($this, "infoScreen"),
614 "",
615 $_GET["ref_id"]
616 );
617 $this->tpl->setLocator();
618 }
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
static _getInstance()
Get instance of ilPrivacySettings.
global $DIC
Definition: saml.php:7

References $_GET, $DIC, $type, ilPrivacySettings\_getInstance(), ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilLearningProgressAccess\checkAccess(), and ilUtil\getImagePath().

Referenced by executeCommand(), and outputInfoScreen().

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

◆ setSingleVariable()

ilSAHSPresentationGUI::setSingleVariable (   $a_var,
  $a_value 
)

set single value

Definition at line 521 of file class.ilSAHSPresentationGUI.php.

522 {
523 $this->tpl->setCurrentBlock("set_value");
524 $this->tpl->setVariable("VAR", $a_var);
525 $this->tpl->setVariable("VALUE", $a_value);
526 $this->tpl->parseCurrentBlock();
527 }

Referenced by launchSahs().

+ Here is the caller graph for this function:

◆ unloadSahs()

ilSAHSPresentationGUI::unloadSahs ( )

Definition at line 481 of file class.ilSAHSPresentationGUI.php.

482 {
483 $this->tpl = new ilTemplate("tpl.sahs_unload_cbt.html", true, true, "Modules/ScormAicc");
484 $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
485 $this->tpl->setVariable("SCO_ID", $_GET["sahs_id"]);
486 $this->tpl->show();
487 }

References $_GET, and ilUtil\getStyleSheetLocation().

+ Here is the call graph for this function:

◆ view()

ilSAHSPresentationGUI::view ( )

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

241 {
242 $sc_gui_object = ilSCORMObjectGUI::getInstance($_GET["obj_id"]);
243
244 if (is_object($sc_gui_object)) {
245 $sc_gui_object->view();
246 }
247
248 $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
249 $this->tpl->show();
250 }
& getInstance($a_id)
get instance of specialized GUI class

References $_GET, ilSCORMObjectGUI\getInstance(), and ilUtil\getStyleSheetLocation().

+ Here is the call graph for this function:

Field Documentation

◆ $ilias

ilSAHSPresentationGUI::$ilias

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

Referenced by __construct(), and api().

◆ $lng

ilSAHSPresentationGUI::$lng

◆ $tpl

ilSAHSPresentationGUI::$tpl

Definition at line 24 of file class.ilSAHSPresentationGUI.php.

Referenced by __construct().


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