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';
30 function __construct($a_parent_type, $a_id = 0, $a_old_nr = 0, $a_slm_id = 0,
35 $this->glo_id = $a_glo_id;
52 $this->
getPageConfig()->addIntLinkFilter(array(
"StructureObject",
53 "StructureObject_New",
"PageObject",
"PageObject_FAQ",
"PageObject_New",
55 "Media",
"Media_FAQ",
"Media_Media",
"Media_New",
59 $this->
getPageConfig()->addIntLinkFilter(array(
"GlossaryItem"));
63 $ilCtrl->getLinkTargetByClass(
"ilobjscorm2004learningmodulegui",
"showTree",
65 $this->slm_id = $a_slm_id;
66 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
75 $page->setGlossaryId($this->glo_id);
86 $this->glossary_ov_id = $a_ov_id;
97 return $this->glossary_ov_id;
107 $next_class = $this->ctrl->getNextClass($this);
108 $cmd = $this->ctrl->getCmd();
112 case 'ilmdeditorgui':
116 case "ilpageobjectgui":
119 $page_gui->setEnabledPCTabs(
true);
120 $html = $ilCtrl->forwardCommand($page_gui);
168 if (count($q_ids) > 0)
170 foreach ($q_ids as $q_id)
172 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php");
174 $q_gui->outAdditionalOutput();
175 $html[$q_id] = $q_gui->getPreview(TRUE);
194 if ($this->scorm_mode ==
"preview")
208 if ($this->scorm_mode ==
"preview")
223 $this->scorm_mode = $a_mode;
238 $this->glossary_links = $int_links;
243 $link_info =
"<IntLinkInfos>";
244 $targetframe =
"None";
246 foreach ($int_links as $int_link)
249 $target = $int_link[
"Target"];
250 $targetframe =
"None";
251 if (substr($target, 0, 4) ==
"il__")
255 $type = $int_link[
"Type"];
263 $onclick =
'OnClick="return false;"';
264 $anc_par =
'Anchor=""';
265 $targetframe =
"Glossary";
274 include_once(
"./Modules/File/classes/class.ilObjFile.php");
285 $anc_par =
'Anchor=""';
286 $targetframe =
"None";
290 $link_info.=
"<IntLinkInfo $onclick Target=\"$target\" Type=\"$type\" ".$anc_par.
" ".
291 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
294 $link_info.=
"</IntLinkInfos>";
306 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
308 if ($this->scorm_mode !=
"export")
310 $tpl =
new ilTemplate(
"tpl.glossary_entries.html",
true,
true,
"Modules/Scorm2004");
325 $ovov->setAutoHide(
false);
326 $ovov->setCloseElementId(
"glo_ov_close");
329 if ($this->scorm_mode !=
"export" ||
336 $tpl->setCurrentBlock(
"add_script");
337 $tpl->setVariable(
"ADD_SCRIPT",
"il.Util.addOnLoad(function () {".$overlays[$this->
getGlossaryOverviewId()]->getOnLoadCode().
"});");
338 $tpl->parseCurrentBlock();
345 if (is_array($this->glossary_links))
347 foreach ($this->glossary_links as $k => $e)
350 if ($e[
"Type"] ==
"GlossaryItem")
352 $karr = explode(
":", $k);
353 $link_id = $karr[0].
"_".$this->
getPageObject()->getId().
"_".$karr[4];
355 $ov_id =
"ov".$karr[0];
356 $cl_id =
"ov".$karr[0].
"cl";
357 $glov_id =
"ov".$karr[0].
"ov";
358 $term_id_arr = explode(
"_", $karr[0]);
359 $term_id = $term_id_arr[count($term_id_arr) - 1];
362 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
363 $id_arr = explode(
"_", $karr[0]);
369 $tpl->setCurrentBlock(
"entry");
370 $tpl->setVariable(
"CONTENT", $html);
371 $tpl->setVariable(
"OVERLAY_ID", $ov_id);
376 if (!isset($overlays[$ov_id]))
379 $overlays[$ov_id]->setAnchor($link_id);
380 $overlays[$ov_id]->setTrigger($link_id,
"click", $link_id);
381 $overlays[$ov_id]->setAutoHide(
false);
382 $overlays[$ov_id]->setCloseElementId($cl_id);
383 if ($this->scorm_mode !=
"export" ||
386 $overlays[$ov_id]->add();
390 $tpl->setVariable(
"SCRIPT",
"il.Util.addOnLoad(function () {".$overlays[$ov_id]->getOnLoadCode().
"});");
395 if ($this->scorm_mode !=
"export" ||
398 $overlays[$ov_id]->addTrigger($link_id,
"click", $link_id);
402 $tpl->setVariable(
"SCRIPT",
403 "il.Util.addOnLoad(function () {".$overlays[$ov_id]->getTriggerOnLoadCode($link_id,
"click", $link_id).
"});");
409 if ($this->scorm_mode !=
"export" ||
415 $overlays[$ov_id]->addTrigger(
"glo_ov_t".$term_id,
"click", $this->
getGlossaryOverviewId(),
false,
"tl",
"tl");
419 $tpl->setVariable(
"SCRIPT2",
420 "il.Util.addOnLoad(function () {".
421 $overlays[$this->
getGlossaryOverviewId()]->getTriggerOnLoadCode($glov_id,
"click", $ov_id,
false,
"tl",
"tl").
"});");
422 $tpl->setVariable(
"SCRIPT3",
423 "il.Util.addOnLoad(function () {".
424 $overlays[$ov_id]->getTriggerOnLoadCode(
"glo_ov_t".$term_id,
"click", $this->
getGlossaryOverviewId(),
false,
"tl",
"tl").
"});");
428 $tpl->parseCurrentBlock();
433 if ($glossary && $this->scorm_mode !=
"export")
435 $ret = $a_output.$tpl->get();
452 self::$export_glo_tpl =
new ilTemplate(
"tpl.glossary_entries.html",
true,
true,
"Modules/Scorm2004");
460 $ret = self::$export_glo_tpl->get();