36 $this->ctrl->saveParameter($this,
"ref_id");
44 global
$lng,$ilAccess, $ilNavigationHistory,
$ilCtrl, $ilLocator, $ilObjDataCache;
46 include_once
"./Services/Object/classes/class.ilObjectGUI.php";
47 include_once
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
49 $lng->loadLanguageModule(
"content");
53 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
55 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleAccess.php");
60 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
61 "ilias.php?cmd=infoScreen&baseClass=ilSAHSPresentationGUI&ref_id=".
$_GET[
"ref_id"],
"lm");
65 $next_class = $this->ctrl->getNextClass($this);
66 $cmd = $this->ctrl->getCmd();
70 if (
$cmd ==
"downloadCertificate")
72 require_once
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMPresentationGUI.php";
74 $ret = $this->ctrl->forwardCommand($scorm_gui);
77 if (substr(
$cmd,0,11) ==
"offlineMode" || $this->offline_mode) $next_class =
"ilscormofflinemodegui";
83 include_once(
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
88 include_once(
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
93 include_once(
"./Modules/ScormAicc/classes/class.ilObjAICCLearningModuleGUI.php");
98 include_once(
"./Modules/ScormAicc/classes/class.ilObjHACPLearningModuleGUI.php");
103 if ($next_class !=
"ilinfoscreengui" &&
104 $cmd !=
"infoScreen" &&
105 $next_class !=
"ilobjscorm2004learningmodulegui" &&
106 $next_class !=
"ilobjscormlearningmodulegui" &&
107 $next_class !=
"ilscormofflinemodegui" &&
108 $next_class !=
"illearningprogressgui")
110 include_once(
"./Services/License/classes/class.ilLicense.php");
115 $this->ctrl->setCmdClass(
"ilscorm13player");
120 $this->ctrl->setCmdClass(
"ilscormpresentationgui");
125 $this->ctrl->setCmdClass(
"ilaiccpresentationgui");
129 $this->ctrl->setCmdClass(
"ilhacppresentationgui");
132 $next_class = $this->ctrl->getNextClass($this);
137 case "ilinfoscreengui":
141 case "ilscorm13player":
142 require_once
"./Modules/Scorm2004/classes/ilSCORM13Player.php";
144 $ret = $this->ctrl->forwardCommand($scorm_gui);
147 case "ilscormpresentationgui":
148 require_once
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMPresentationGUI.php";
150 $ret = $this->ctrl->forwardCommand($scorm_gui);
153 case "ilaiccpresentationgui":
154 require_once
"./Modules/ScormAicc/classes/AICC/class.ilAICCPresentationGUI.php";
156 $ret = $this->ctrl->forwardCommand($aicc_gui);
159 case "ilhacppresentationgui":
160 require_once
"./Modules/ScormAicc/classes/HACP/class.ilHACPPresentationGUI.php";
161 $hacp_gui =
new ilHACPPresentationGUI();
162 $ret = $this->ctrl->forwardCommand($hacp_gui);
165 case "illearningprogressgui":
167 include_once
"./Services/Tracking/classes/class.ilLearningProgressGUI.php";
169 $this->ctrl->forwardCommand($new_gui);
173 case "ilscormofflinemodegui":
174 include_once
"./Modules/ScormAicc/classes/class.ilSCORMOfflineModeGUI.php";
176 $this->ctrl->forwardCommand($new_gui);
179 case "ilobjscorm2004learningmodulegui":
180 include_once
'./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModuleGUI.php';
182 $this->ctrl->forwardCommand($new_gui);
187 case "ilobjscormlearningmodulegui":
188 include_once
'./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php';
190 $this->ctrl->forwardCommand($new_gui);
204 if(!is_array($a_attributes))
208 foreach ($a_attributes as $attribute)
210 $attr[$attribute->name()] = $attribute->value();
223 $this->tpl =
new ilTemplate(
"tpl.sahs_pres_frameset.html",
false,
false,
"Modules/ScormAicc");
224 $this->tpl->setVariable(
"REF_ID",$this->slm->getRefId());
225 $this->tpl->show(
"DEFAULT",
false);
237 $ilBench->start(
"SAHSExplorer",
"initExplorer");
239 $this->tpl =
new ilTemplate(
"tpl.sahs_exp_main.html",
true,
true,
"Modules/ScormAicc");
241 require_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMExplorer.php");
242 $exp =
new ilSCORMExplorer(
"ilias.php?baseClass=ilSAHSPresentationGUI&cmd=view&ref_id=".$this->slm->getRefId(), $this->slm);
244 $exp->setFrameTarget($a_target);
248 if (
$_GET[
"scexpand"] ==
"")
255 $expanded =
$_GET[
"scexpand"];
257 $exp->setExpand($expanded);
259 $exp->forceExpandAll(
true,
false);
263 $ilBench->stop(
"SAHSExplorer",
"initExplorer");
266 $ilBench->start(
"SAHSExplorer",
"setOutput");
268 $ilBench->stop(
"SAHSExplorer",
"setOutput");
270 $ilBench->start(
"SAHSExplorer",
"getOutput");
272 $ilBench->stop(
"SAHSExplorer",
"getOutput");
275 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.sahs_explorer.html",
"Modules/ScormAicc");
277 $this->tpl->setVariable(
"EXP_REFRESH", $this->lng->txt(
"refresh"));
278 $this->tpl->setVariable(
"EXPLORER",
$output);
279 $this->tpl->setVariable(
"ACTION",
"ilias.php?baseClass=ilSAHSPresentationGUI&cmd=".
$_GET[
"cmd"].
"&frame=".
$_GET[
"frame"].
280 "&ref_id=".$this->slm->getRefId().
"&scexpand=".
$_GET[
"scexpand"]);
281 $this->tpl->parseCurrentBlock();
290 if(is_object($sc_gui_object))
292 $sc_gui_object->view();
305 $this->tpl =
new ilTemplate(
"tpl.sahs_api.html",
true,
true,
"Modules/ScormAicc");
306 $this->tpl->setVariable(
"USER_ID",$ilias->account->getId());
307 $this->tpl->setVariable(
"USER_FIRSTNAME",$ilias->account->getFirstname());
308 $this->tpl->setVariable(
"USER_LASTNAME",$ilias->account->getLastname());
309 $this->tpl->setVariable(
"REF_ID",
$_GET[
"ref_id"]);
310 $this->tpl->setVariable(
"SESSION_ID",session_id());
312 $this->tpl->setVariable(
"CODE_BASE",
"http://".
$_SERVER[
'SERVER_NAME'].substr(
$_SERVER[
'PHP_SELF'], 0, strpos (
$_SERVER[
'PHP_SELF'],
"/ilias.php")));
313 $this->tpl->parseCurrentBlock();
315 $this->tpl->show(
false);
324 $sco_id = (
$_GET[
"sahs_id"] ==
"")
333 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
334 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMResource.php");
337 $id_ref = $item->getIdentifierRef();
339 $resource->readByIdRef($id_ref, $item->getSLMId());
341 $href = $resource->getHref();
342 $this->tpl =
new ilTemplate(
"tpl.sahs_launch_cbt.html",
true,
true,
"Modules/ScormAicc");
343 $this->tpl->setVariable(
"HREF", $this->slm->getDataDirectory(
"output").
"/".$href);
346 $this->tpl->setVariable(
"LAUNCH_DATA", $item->getDataFromLms());
347 $this->tpl->setVariable(
"MAST_SCORE", $item->getMasteryScore());
348 $this->tpl->setVariable(
"MAX_TIME", $item->getMaxTimeAllowed());
349 $this->tpl->setVariable(
"LIMIT_ACT", $item->getTimeLimitAction());
352 if ($this->slm->getAPIAdapterName() !=
"API")
354 $this->tpl->setCurrentBlock(
"alt_api_ref");
355 $this->tpl->setVariable(
"API_NAME", $this->slm->getAPIAdapterName());
356 $this->tpl->parseCurrentBlock();
359 $val_set = $ilDB->queryF(
' 360 SELECT * FROM scorm_tracking 364 array(
'integer',
'integer',
'integer'),
365 array($ilUser->getId(),$sco_id,$this->slm->getId()));
369 while($val_rec = $ilDB->fetchAssoc($val_set))
371 $val_rec[
"rvalue"] = str_replace(
"\r\n",
"\n", $val_rec[
"rvalue"]);
372 $val_rec[
"rvalue"] = str_replace(
"\r",
"\n", $val_rec[
"rvalue"]);
373 $val_rec[
"rvalue"] = str_replace(
"\n",
"\\n", $val_rec[
"rvalue"]);
374 $re_value[$val_rec[
"lvalue"]] = $val_rec[
"rvalue"];
377 foreach($re_value as $var => $value)
381 case "cmi.core.lesson_location":
382 case "cmi.core.lesson_status":
383 case "cmi.core.entry":
384 case "cmi.core.score.raw":
385 case "cmi.core.score.max":
386 case "cmi.core.score.min":
387 case "cmi.core.total_time":
388 case "cmi.core.exit":
389 case "cmi.suspend_data":
391 case "cmi.student_preference.audio":
392 case "cmi.student_preference.language":
393 case "cmi.student_preference.speed":
394 case "cmi.student_preference.text":
398 case "cmi.objectives._count":
400 $this->
setArray(
"cmi.objectives", $value,
"id", $re_value);
401 $this->
setArray(
"cmi.objectives", $value,
"score.raw", $re_value);
402 $this->
setArray(
"cmi.objectives", $value,
"score.max", $re_value);
403 $this->
setArray(
"cmi.objectives", $value,
"score.min", $re_value);
404 $this->
setArray(
"cmi.objectives", $value,
"status", $re_value);
407 case "cmi.interactions._count":
409 $this->
setArray(
"cmi.interactions", $value,
"id", $re_value);
410 for($i=0; $i<$value; $i++)
412 $var2 =
"cmi.interactions.".$i.
".objectives._count";
413 if (isset($v_array[$var2]))
415 $cnt = $v_array[$var2];
416 $this->
setArray(
"cmi.interactions.".$i.
".objectives",
417 $cnt,
"id", $re_value);
429 $this->
setArray(
"cmi.interactions", $value,
"time", $re_value);
430 $this->
setArray(
"cmi.interactions", $value,
"type", $re_value);
431 for($i=0; $i<$value; $i++)
433 $var2 =
"cmi.interactions.".$i.
".correct_responses._count";
434 if (isset($v_array[$var2]))
436 $cnt = $v_array[$var2];
437 $this->
setArray(
"cmi.interactions.".$i.
".correct_responses",
438 $cnt,
"pattern", $re_value);
439 $this->
setArray(
"cmi.interactions.".$i.
".correct_responses",
440 $cnt,
"weighting", $re_value);
443 $this->
setArray(
"cmi.interactions", $value,
"student_response", $re_value);
444 $this->
setArray(
"cmi.interactions", $value,
"result", $re_value);
445 $this->
setArray(
"cmi.interactions", $value,
"latency", $re_value);
451 $this->tpl->setCurrentBlock(
"switch_icon");
452 $this->tpl->setVariable(
"SCO_ID",
$_GET[
"sahs_id"]);
454 $this->tpl->setVariable(
"SCO_ALT",
455 $lng->txt(
"cont_status").
": " 456 .$lng->txt(
"cont_sc_stat_running")
458 $this->tpl->parseCurrentBlock();
461 $lesson_mode = $this->slm->getDefaultLessonMode();
462 if ($this->slm->getAutoReview())
464 if ($re_value[
"cmi.core.lesson_status"] ==
"completed" ||
465 $re_value[
"cmi.core.lesson_status"] ==
"passed" ||
466 $re_value[
"cmi.core.lesson_status"] ==
"failed")
468 $lesson_mode =
"review";
471 $this->tpl->setVariable(
"LESSON_MODE", $lesson_mode);
474 if ($lesson_mode ==
"normal")
476 $this->tpl->setVariable(
"CREDIT_MODE",
477 str_replace(
"_",
"-", $this->slm->getCreditMode()));
481 $this->tpl->setVariable(
"CREDIT_MODE",
"no-credit");
486 if (!isset($re_value[
"cmi.core.total_time"]))
488 $item->insertTrackData(
"cmi.core.total_time",
"0000:00:00", $sahs_obj_id);
490 if (!isset($re_value[
"cmi.core.lesson_status"]))
492 $item->insertTrackData(
"cmi.core.lesson_status",
"not attempted", $sahs_obj_id);
494 if (!isset($re_value[
"cmi.core.entry"]))
496 $item->insertTrackData(
"cmi.core.entry",
"", $sahs_obj_id);
505 $this->tpl =
new ilTemplate(
"tpl.sahs_finish_cbt.html",
true,
true,
"Modules/ScormAicc");
508 $this->tpl->setCurrentBlock(
"switch_icon");
509 $this->tpl->setVariable(
"SCO_ID",
$_GET[
"sahs_id"]);
511 "scorm/".str_replace(
" ",
"_",
$_GET[
"status"]).
'.svg')
513 $this->tpl->setVariable(
"SCO_ALT",
514 $lng->txt(
"cont_status").
": " 515 .$lng->txt(
"cont_sc_stat_".str_replace(
" ",
"_",
$_GET[
"status"])).
", " 516 .$lng->txt(
"cont_total_time").
": " 519 $this->tpl->setVariable(
"SCO_LAUNCH_ID",
$_GET[
"launch"]);
520 $this->tpl->parseCurrentBlock();
526 $this->tpl =
new ilTemplate(
"tpl.sahs_unload_cbt.html",
true,
true,
"Modules/ScormAicc");
528 $this->tpl->setVariable(
"SCO_ID",
$_GET[
"sahs_id"]);
537 $sco_id = (
$_GET[
"asset_id"] ==
"")
546 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
547 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMResource.php");
550 $id_ref = $item->getIdentifierRef();
552 $resource->readByIdRef($id_ref, $item->getSLMId());
553 $href = $resource->getHref();
554 $this->tpl->setVariable(
"HREF", $this->slm->getDataDirectory(
"output").
"/".$href);
555 $this->tpl =
new ilTemplate(
"tpl.scorm_launch_asset.html",
true,
true,
"Modules/ScormAicc");
556 $this->tpl->setVariable(
"HREF", $this->slm->getDataDirectory(
"output").
"/".$href);
566 $this->tpl->setCurrentBlock(
"set_value");
567 $this->tpl->setVariable(
"VAR", $a_var);
568 $this->tpl->setVariable(
"VALUE", $a_value);
569 $this->tpl->parseCurrentBlock();
575 function setArray($a_left, $a_value, $a_name, &$v_array)
577 for($i=0; $i<$a_value; $i++)
579 $var = $a_left.
".".$i.
".".$a_name;
580 if (isset($v_array[$var]))
582 $this->tpl->setCurrentBlock(
"set_value");
583 $this->tpl->setVariable(
"VAR", $var);
584 $this->tpl->setVariable(
"VALUE", $v_array[$var]);
585 $this->tpl->parseCurrentBlock();
597 $this->ctrl->setCmd(
"showSummary");
598 $this->ctrl->setCmdClass(
"ilinfoscreengui");
604 global $ilTabs, $ilLocator, $ilAccess;
607 include_once
"Services/Tracking/classes/class.ilLearningProgressAccess.php";
609 ((!$ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"]) &&
610 !$ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) ||
611 !$ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])))
613 $ilTabs->addTab(
"info_short", $this->lng->txt(
"info_short"),
614 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
616 $ilTabs->addTab(
"learning_progress", $this->lng->txt(
"learning_progress"),
617 $this->ctrl->getLinkTargetByClass(
'illearningprogressgui',
''));
619 if($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"]) || $ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"]))
621 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
623 if($privacy->enabledSahsProtocolData()) {
624 include_once
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
627 if($type ==
"scorm2004") {
628 $ilTabs->addTab(
"cont_tracking_data", $this->lng->txt(
"cont_tracking_data"),
629 $this->ctrl->getLinkTargetByClass(
'ilobjscorm2004learningmodulegui',
'showTrackingItems'));
631 else if($type ==
"scorm") {
632 $ilTabs->addTab(
"cont_tracking_data", $this->lng->txt(
"cont_tracking_data"),
633 $this->ctrl->getLinkTargetByClass(
'ilobjscormlearningmodulegui',
'showTrackingItems'));
637 $ilTabs->activateTab($a_active);
638 $this->tpl->getStandardTemplate();
639 $this->tpl->setTitle($this->slm_gui->object->getTitle());
641 $ilLocator->addRepositoryItems();
642 $ilLocator->addItem($this->slm_gui->object->getTitle(),
643 $this->ctrl->getLinkTarget($this,
"infoScreen"),
"",
$_GET[
"ref_id"]);
644 $this->tpl->setLocator();
670 $this->lng->loadLanguageModule(
"meta");
672 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
675 $info->enablePrivateNotes();
679 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
681 $info->enableNewsEditing();
683 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
684 if ($enable_internal_rss)
686 $info->setBlockProperty(
"news",
"settings",
true);
691 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
693 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
695 $om = $sahs_obj->getOpenMode();
696 $width = $sahs_obj->getWidth();
697 $height = $sahs_obj->getHeight();
698 if ( ($om == 5 || $om == 1) && $width > 0 && $height > 0) $om++;
701 $info->addButton($this->lng->txt(
"view"),
702 "javascript:void(0); onclick=startSAHS('".$this->ctrl->getLinkTarget($this,
"").
"','ilContObj".$this->slm_gui->object->getId().
"',".$om.
",".$width.
",".$height.
");",
707 $info->addButton($this->lng->txt(
"view"),
708 $this->ctrl->getLinkTarget($this,
""),
709 ' target="ilContObj'.$this->slm_gui->object->getId().
'" ',
715 $info->addMetaDataSections($this->slm_gui->object->getId(),0,
716 $this->slm_gui->object->getType());
727 $this->ctrl->forwardCommand(
$info);
Class ilObjSCORMLearningModuleGUI.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
setTargetGet($a_target_get)
set the varname in Get-string public
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
setSingleVariable($a_var, $a_value)
set single value
GUI class ilSCORMOfflineModeGUI.
Class ilObjAICCLearningModuleGUI.
static _lookupUserIsOfflineMode($a_obj_id)
Checks offlineMode and returns false if.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, aicc, hacp)
Class ilObjHACPLearningModuleGUI.
frameset()
output main menu
static _lookupObjectId($a_ref_id)
lookup object id
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
& getInstance($a_id)
get instance of specialized GUI class
attrib2arr(&$a_attributes)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
redirection script todo: (a better solution should control the processing via a xml file) ...
executeCommand()
execute command
static _lookupEditable($a_obj_id)
Lookup editable.
Explorer View for SCORM Learning Modules.
Create styles array
The data for the language used.
outputInfoScreen()
info screen
Class ilSCORMPresentationGUI.
setArray($a_left, $a_value, $a_name, &$v_array)
set single value
const LP_CONTEXT_REPOSITORY
Class ilSAHSPresentationGUI.
static _getInstance()
Get instance of ilPrivacySettings.
Class ilObjUserTrackingGUI.
Class ilObjSCORMLearningModule.
Class ilObjSCORMLearningModule.
explorer($a_target="sahs_content")
output table of content
static _noteAccess($a_obj_id, $a_type, $a_ref_id)
Note the access of the current usr to an object.
Class ilObjSCORMLearningModuleGUI.
readRootId()
read root id from database
Class ilAICCPresentationGUI.