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();
150 if (count($q_ids) > 0) {
151 foreach ($q_ids as $q_id) {
152 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php");
155 $q_gui->outAdditionalOutput();
156 $html[$q_id] = $q_gui->getPreview(
true);
172 if ($this->scorm_mode ==
"preview") {
185 if ($this->scorm_mode ==
"preview") {
186 $a_output = parent::selfAssessmentRendering($a_output);
200 $this->scorm_mode = $a_mode;
215 $this->glossary_links = $int_links;
220 $link_info =
"<IntLinkInfos>";
221 $targetframe =
"None";
223 foreach ($int_links as $int_link) {
226 $targetframe =
"None";
227 if (substr(
$target, 0, 4) ==
"il__") {
230 $type = $int_link[
"Type"];
237 $onclick =
'OnClick="return false;"';
238 $anc_par =
'Anchor=""';
239 $targetframe =
"Glossary";
246 include_once(
"./Modules/File/classes/class.ilObjFile.php");
255 $anc_par =
'Anchor=""';
256 $targetframe =
"None";
260 $link_info.=
"<IntLinkInfo $onclick Target=\"$target\" Type=\"$type\" " . $anc_par .
" " .
261 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
264 $link_info.=
"</IntLinkInfos>";
276 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
278 if ($this->scorm_mode !=
"export") {
279 $tpl =
new ilTemplate(
"tpl.glossary_entries.html",
true,
true,
"Modules/Scorm2004");
281 $tpl = self::$export_glo_tpl;
291 $ovov->setAutoHide(
false);
292 $ovov->setCloseElementId(
"glo_ov_close");
294 if ($this->scorm_mode !=
"export" ||
298 $tpl->setCurrentBlock(
"add_script");
300 $tpl->parseCurrentBlock();
306 if (is_array($this->glossary_links)) {
307 foreach ($this->glossary_links as $k => $e) {
309 if ($e[
"Type"] ==
"GlossaryItem") {
310 $karr = explode(
":", $k);
311 $link_id = $karr[0] .
"_" . $this->
getPageObject()->getId() .
"_" . $karr[4];
313 $ov_id =
"ov" . $karr[0];
314 $cl_id =
"ov" . $karr[0] .
"cl";
315 $glov_id =
"ov" . $karr[0] .
"ov";
316 $term_id_arr = explode(
"_", $karr[0]);
317 $term_id = $term_id_arr[count($term_id_arr) - 1];
320 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
321 $id_arr = explode(
"_", $karr[0]);
323 $html = $term_gui->getOverlayHTML(
330 $tpl->setCurrentBlock(
"entry");
332 $tpl->setVariable(
"OVERLAY_ID", $ov_id);
337 if (!isset($overlays[$ov_id])) {
339 $overlays[$ov_id]->setAnchor($link_id);
340 $overlays[$ov_id]->setTrigger($link_id,
"click", $link_id);
341 $overlays[$ov_id]->setAutoHide(
false);
342 $overlays[$ov_id]->setCloseElementId($cl_id);
343 if ($this->scorm_mode !=
"export" ||
345 $overlays[$ov_id]->add();
347 $tpl->setVariable(
"SCRIPT",
"il.Util.addOnLoad(function () {" . $overlays[$ov_id]->
getOnLoadCode() .
"});");
350 if ($this->scorm_mode !=
"export" ||
352 $overlays[$ov_id]->addTrigger($link_id,
"click", $link_id);
356 "il.Util.addOnLoad(function () {" . $overlays[$ov_id]->getTriggerOnLoadCode($link_id,
"click", $link_id) .
"});" 362 if ($this->scorm_mode !=
"export" ||
367 $overlays[$ov_id]->addTrigger(
"glo_ov_t" . $term_id,
"click", $this->
getGlossaryOverviewId(),
false,
"tl",
"tl");
371 "il.Util.addOnLoad(function () {" .
372 $overlays[$this->
getGlossaryOverviewId()]->getTriggerOnLoadCode($glov_id,
"click", $ov_id,
false,
"tl",
"tl") .
"});" 376 "il.Util.addOnLoad(function () {" .
377 $overlays[$ov_id]->getTriggerOnLoadCode(
"glo_ov_t" . $term_id,
"click", $this->
getGlossaryOverviewId(),
false,
"tl",
"tl") .
"});" 382 $tpl->parseCurrentBlock();
387 if ($glossary && $this->scorm_mode !=
"export") {
404 self::$export_glo_tpl =
new ilTemplate(
"tpl.glossary_entries.html",
true,
true,
"Modules/Scorm2004");
412 $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
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
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.
Create styles array
The data for the language used.
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.