24 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
25 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php");
26 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
49 function __construct($a_parent_type, $a_id = 0, $a_old_nr = 0, $a_slm_id = 0,
54 $this->glo_id = $a_glo_id;
69 $this->
getPageConfig()->addIntLinkFilter(array(
"StructureObject",
70 "StructureObject_New",
"PageObject",
"PageObject_FAQ",
"PageObject_New",
72 "Media",
"Media_FAQ",
"Media_Media",
"Media_New",
76 $this->
getPageConfig()->addIntLinkFilter(array(
"GlossaryItem"));
80 $ilCtrl->getLinkTargetByClass(
"ilobjscorm2004learningmodulegui",
"showTree",
82 $this->slm_id = $a_slm_id;
89 $page->setGlossaryId($this->glo_id);
100 $this->glossary_ov_id = $a_ov_id;
111 return $this->glossary_ov_id;
121 $next_class = $this->ctrl->getNextClass($this);
122 $cmd = $this->ctrl->getCmd();
126 case 'ilmdeditorgui':
130 case "ilpageobjectgui":
133 $page_gui->setEnabledPCTabs(
true);
134 $html = $ilCtrl->forwardCommand($page_gui);
182 if (count($q_ids) > 0)
184 foreach ($q_ids as $q_id)
186 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php");
188 $q_gui->outAdditionalOutput();
189 $html[$q_id] = $q_gui->getPreview(TRUE);
208 if ($this->scorm_mode ==
"preview")
222 if ($this->scorm_mode ==
"preview")
237 $this->scorm_mode = $a_mode;
252 $this->glossary_links = $int_links;
257 $link_info =
"<IntLinkInfos>";
258 $targetframe =
"None";
260 foreach ($int_links as $int_link)
263 $target = $int_link[
"Target"];
264 $targetframe =
"None";
265 if (substr($target, 0, 4) ==
"il__")
269 $type = $int_link[
"Type"];
277 $onclick =
'OnClick="return false;"';
278 $anc_par =
'Anchor=""';
279 $targetframe =
"Glossary";
288 include_once(
"./Modules/File/classes/class.ilObjFile.php");
299 $anc_par =
'Anchor=""';
300 $targetframe =
"None";
304 $link_info.=
"<IntLinkInfo $onclick Target=\"$target\" Type=\"$type\" ".$anc_par.
" ".
305 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
308 $link_info.=
"</IntLinkInfos>";
320 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
322 if ($this->scorm_mode !=
"export")
324 $tpl =
new ilTemplate(
"tpl.glossary_entries.html",
true,
true,
"Modules/Scorm2004");
339 $ovov->setAutoHide(
false);
340 $ovov->setCloseElementId(
"glo_ov_close");
343 if ($this->scorm_mode !=
"export" ||
350 $tpl->setCurrentBlock(
"add_script");
351 $tpl->setVariable(
"ADD_SCRIPT",
"ilAddOnLoad(function () {".$overlays[$this->
getGlossaryOverviewId()]->getOnLoadCode().
"});");
352 $tpl->parseCurrentBlock();
357 if (is_array($this->glossary_links))
359 foreach ($this->glossary_links as $k => $e)
362 if ($e[
"Type"] ==
"GlossaryItem")
364 $karr = explode(
":", $k);
365 $link_id = $karr[0].
"_".$this->
getPageObject()->getId().
"_".$karr[4];
367 $ov_id =
"ov".$karr[0];
368 $cl_id =
"ov".$karr[0].
"cl";
369 $glov_id =
"ov".$karr[0].
"ov";
370 $term_id_arr = explode(
"_", $karr[0]);
371 $term_id = $term_id_arr[count($term_id_arr) - 1];
374 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
375 $id_arr = explode(
"_", $karr[0]);
380 $tpl->setCurrentBlock(
"entry");
381 $tpl->setVariable(
"CONTENT", $html);
382 $tpl->setVariable(
"OVERLAY_ID", $ov_id);
387 if (!isset($overlays[$ov_id]))
390 $overlays[$ov_id]->setAnchor($link_id);
391 $overlays[$ov_id]->setTrigger($link_id,
"onclick", $link_id);
392 $overlays[$ov_id]->setAutoHide(
false);
393 $overlays[$ov_id]->setCloseElementId($cl_id);
394 if ($this->scorm_mode !=
"export" ||
397 $overlays[$ov_id]->add();
401 $tpl->setVariable(
"SCRIPT",
"ilAddOnLoad(function () {".$overlays[$ov_id]->getOnLoadCode().
"});");
406 if ($this->scorm_mode !=
"export" ||
409 $overlays[$ov_id]->addTrigger($link_id,
"click", $link_id);
413 $tpl->setVariable(
"SCRIPT",
414 "ilAddOnLoad(function () {".$overlays[$ov_id]->getTriggerOnLoadCode($link_id,
"click", $link_id).
"});");
420 if ($this->scorm_mode !=
"export" ||
426 $overlays[$ov_id]->addTrigger(
"glo_ov_t".$term_id,
"click", $this->
getGlossaryOverviewId(),
false,
"tl",
"tl");
430 $tpl->setVariable(
"SCRIPT2",
431 "ilAddOnLoad(function () {".
432 $overlays[$this->
getGlossaryOverviewId()]->getTriggerOnLoadCode($glov_id,
"click", $ov_id,
false,
"tl",
"tl").
"});");
433 $tpl->setVariable(
"SCRIPT3",
434 "ilAddOnLoad(function () {".
435 $overlays[$ov_id]->getTriggerOnLoadCode(
"glo_ov_t".$term_id,
"click", $this->
getGlossaryOverviewId(),
false,
"tl",
"tl").
"});");
439 $tpl->parseCurrentBlock();
444 if ($glossary && $this->scorm_mode !=
"export")
446 $ret = $a_output.$tpl->get();
462 self::$export_glo_tpl =
new ilTemplate(
"tpl.glossary_entries.html",
true,
true,
"Modules/Scorm2004");
470 $ret = self::$export_glo_tpl->get();