5 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
6 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php");
7 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
39 $this->tpl = $DIC[
"tpl"];
40 $this->ctrl = $DIC->ctrl();
43 $this->glo_id = $a_glo_id;
44 $this->slm_id = $a_slm_id;
46 $a_parent_type =
"sahs";
48 parent::__construct($a_parent_type, $a_id, $a_old_nr);
51 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
62 $this->glossary_ov_id = $a_ov_id;
73 return $this->glossary_ov_id;
85 "ilobjscorm2004learningmodulegui",
93 $next_class = $this->ctrl->getNextClass($this);
94 $cmd = $this->ctrl->getCmd();
96 switch ($next_class) {
98 return parent::executeCommand();
101 case "ilpageobjectgui":
102 die(
"ilSCORM2004PageGUI forwarding to ilpageobjectgui error.");
106 $html = parent::executeCommand();
151 if (count($q_ids) > 0) {
152 foreach ($q_ids as $q_id) {
153 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php");
156 $q_gui->outAdditionalOutput();
157 $html[$q_id] = $q_gui->getPreview(
true);
173 if ($this->scorm_mode ==
"preview") {
186 if ($this->scorm_mode ==
"preview") {
187 $a_output = parent::selfAssessmentRendering($a_output);
201 $this->scorm_mode = $a_mode;
216 $this->glossary_links = $int_links;
221 $link_info =
"<IntLinkInfos>";
222 $targetframe =
"None";
224 foreach ($int_links as $int_link) {
227 $targetframe =
"None";
228 if (substr(
$target, 0, 4) ==
"il__") {
231 $type = $int_link[
"Type"];
238 $onclick =
'OnClick="return false;"';
239 $anc_par =
'Anchor=""';
240 $targetframe =
"Glossary";
247 include_once(
"./Modules/File/classes/class.ilObjFile.php");
256 $anc_par =
'Anchor=""';
257 $targetframe =
"None";
261 $link_info .=
"<IntLinkInfo $onclick Target=\"$target\" Type=\"$type\" " . $anc_par .
" " .
262 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
265 $link_info .=
"</IntLinkInfos>";
277 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
279 if ($this->scorm_mode !=
"export") {
280 $tpl =
new ilTemplate(
"tpl.glossary_entries.html",
true,
true,
"Modules/Scorm2004");
282 $tpl = self::$export_glo_tpl;
292 $ovov->setAutoHide(
false);
293 $ovov->setCloseElementId(
"glo_ov_close");
295 if ($this->scorm_mode !=
"export" ||
299 $tpl->setCurrentBlock(
"add_script");
301 $tpl->parseCurrentBlock();
307 if (is_array($this->glossary_links)) {
308 foreach ($this->glossary_links as $k => $e) {
310 if ($e[
"Type"] ==
"GlossaryItem") {
311 $karr = explode(
":", $k);
312 $link_id = $karr[0] .
"_" . $this->
getPageObject()->getId() .
"_" . $karr[4];
314 $ov_id =
"ov" . $karr[0];
315 $cl_id =
"ov" . $karr[0] .
"cl";
316 $glov_id =
"ov" . $karr[0] .
"ov";
317 $term_id_arr = explode(
"_", $karr[0]);
318 $term_id = $term_id_arr[count($term_id_arr) - 1];
321 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
322 $id_arr = explode(
"_", $karr[0]);
324 $html = $term_gui->getOverlayHTML(
331 $tpl->setCurrentBlock(
"entry");
333 $tpl->setVariable(
"OVERLAY_ID", $ov_id);
338 if (!isset($overlays[$ov_id])) {
340 $overlays[$ov_id]->setAnchor($link_id);
341 $overlays[$ov_id]->setTrigger($link_id,
"click", $link_id);
342 $overlays[$ov_id]->setAutoHide(
false);
343 $overlays[$ov_id]->setCloseElementId($cl_id);
344 if ($this->scorm_mode !=
"export" ||
346 $overlays[$ov_id]->add();
348 $tpl->setVariable(
"SCRIPT",
"il.Util.addOnLoad(function () {" . $overlays[$ov_id]->
getOnLoadCode() .
"});");
351 if ($this->scorm_mode !=
"export" ||
353 $overlays[$ov_id]->addTrigger($link_id,
"click", $link_id);
357 "il.Util.addOnLoad(function () {" . $overlays[$ov_id]->getTriggerOnLoadCode($link_id,
"click", $link_id) .
"});" 363 if ($this->scorm_mode !=
"export" ||
368 $overlays[$ov_id]->addTrigger(
"glo_ov_t" . $term_id,
"click", $this->
getGlossaryOverviewId(),
false,
"tl",
"tl");
372 "il.Util.addOnLoad(function () {" .
373 $overlays[$this->
getGlossaryOverviewId()]->getTriggerOnLoadCode($glov_id,
"click", $ov_id,
false,
"tl",
"tl") .
"});" 377 "il.Util.addOnLoad(function () {" .
378 $overlays[$ov_id]->getTriggerOnLoadCode(
"glo_ov_t" . $term_id,
"click", $this->
getGlossaryOverviewId(),
false,
"tl",
"tl") .
"});" 383 $tpl->parseCurrentBlock();
388 if ($glossary && $this->scorm_mode !=
"export") {
405 self::$export_glo_tpl =
new ilTemplate(
"tpl.glossary_entries.html",
true,
true,
"Modules/Scorm2004");
413 $ret = self::$export_glo_tpl->get();
enableNotes($a_enabled, $a_parent_id)
getPageObject()
Get Page Object.
setTemplateOutput($a_output=true)
showPage($a_mode="preview")
Show the page.
setDefaultLinkXml()
Set standard link xml (currently only glossaries)
setGlossaryOverviewInfo($a_ov_id, $a_sco)
Set glossary overview id.
initSelfAssessmentRendering()
Init question handling.
static getGloOverviewOv($a_sco)
des
static _lookupFileName($a_id)
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
getQuestionHtmlOfPage()
Get question html for page.
determineFileDownloadLink()
Determine file download link.
setPageObject(ilPageObject $a_pg_obj)
Set Page Object.
special template class to simplify handling of ITX/PEAR
This is a utility class for the yui overlays.
GUI class for glossary terms.
getSCORM2004Page()
Get SCORM2004 Page Object.
static _lookupType($a_id, $a_reference=false)
lookup object type
selfAssessmentRendering($a_output)
Self assessment question rendering.
executeCommand()
execute command
setSCORM2004Page($a_scpage)
Set SCORM2004 Page Object.
Class ilSCORM2004Page GUI class.
static getGlossaryHTML($a_sco)
Get glossary html (only in export mode)
static getAffectiveLocalization($a_id)
Get affective localization.
postOutputProcessing($a_output)
Post output processing:
const RENDER_PURPOSE_PREVIEW
__construct( $a_parent_type, $a_id=0, $a_old_nr=0, $a_slm_id=0, $a_glo_id=0)
Constructor.
getGlossaryOverviewId()
Get glossary overview id.
setIntLinkReturn($a_return)
static initExport()
Init export.