ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSCORM2004PageGUI Class Reference

Class ilSCORM2004Page GUI class. More...

+ Inheritance diagram for ilSCORM2004PageGUI:
+ Collaboration diagram for ilSCORM2004PageGUI:

Public Member Functions

 __construct ($a_parent_type, $a_id=0, $a_old_nr=0, $a_slm_id=0, $a_glo_id=0)
 Constructor. More...
 
 setGlossaryOverviewInfo ($a_ov_id, $a_sco)
 Set glossary overview id. More...
 
 getGlossaryOverviewId ()
 Get glossary overview id. More...
 
executeCommand ()
 execute command More...
 
 setSCORM2004Page ($a_scpage)
 Set SCORM2004 Page Object. More...
 
 getSCORM2004Page ()
 Get SCORM2004 Page Object. More...
 
 getQuestionHtmlOfPage ()
 Get question html for page. More...
 
 initSelfAssessmentRendering ()
 Init question handling. More...
 
 selfAssessmentRendering ($a_output)
 Self assessment question rendering. More...
 
 showPage ($a_mode="preview")
 Show the page. More...
 
 setDefaultLinkXml ()
 Set standard link xml (currently only glossaries) More...
 
 postOutputProcessing ($a_output)
 Post output processing: More...
 
- Public Member Functions inherited from ilPageObjectGUI
 ilPageObjectGUI ($a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
 Constructor. More...
 
 afterConstructor ()
 After constructor. More...
 
 setParentType ($a_val)
 Set parent type. More...
 
 getParentType ()
 Get parent type. More...
 
 setId ($a_val)
 Set ID. More...
 
 getId ()
 Get ID. More...
 
 setOldNr ($a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 Get old nr (historic page) More...
 
 setLanguage ($a_val)
 Set language. More...
 
 getLanguage ()
 Get language. More...
 
 setEnablePCType ($a_pc_type, $a_val)
 Set enable pc type. More...
 
 getEnablePCType ($a_pc_type)
 Get enable pc type. More...
 
 setPageConfig ($a_val)
 Set page config object. More...
 
 getPageConfig ()
 Get page config object. More...
 
 setBibId ($a_id)
 Set Bib Id. More...
 
 getBibId ()
 Get Bib Id. More...
 
 setPageObject ($a_pg_obj)
 Set Page Object. More...
 
 getPageObject ()
 Get Page Object. More...
 
 setOutputMode ($a_mode=IL_PAGE_PRESENTATION)
 Set Output Mode. More...
 
 getOutputMode ()
 
 setTemplateOutput ($a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle ($a_title="")
 
 getPresentationTitle ()
 
 setHeader ($a_title="")
 
 getHeader ()
 
 setLinkParams ($l_params="")
 
 getLinkParams ()
 
 setLinkFrame ($l_frame="")
 
 getLinkFrame ()
 
 setLinkXML ($link_xml)
 
 getLinkXML ()
 
 setQuestionXML ($question_xml)
 
 setQuestionHTML ($question_html)
 
 getQuestionXML ()
 
 getQuestionHTML ()
 
 setTemplateTargetVar ($a_variable)
 
 getTemplateTargetVar ()
 
 setTemplateOutputVar ($a_value)
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript ($script_name)
 
 getSourcecodeDownloadScript ()
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink ($a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn ($a_return)
 
 enableChangeComments ($a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes ($a_enabled, $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory ($offdir)
 set offline directory to offdir More...
 
 getOfflineDirectory ()
 get offline directory More...
 
 setViewPageLink ($a_link, $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 get view page link More...
 
 getViewPageTarget ()
 get view page target frame More...
 
 setActivationListener (&$a_obj, $a_meth)
 
 setEnabledNews ($a_enabled, $a_news_obj_id=0, $a_news_obj_type=0)
 Set enabled news. More...
 
 getEnabledNews ()
 Get enabled news. More...
 
 setTabHook ($a_object, $a_function)
 Set tab hook. More...
 
 setEditPreview ($a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 Get Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 setEnabledTabs ($a_enabledtabs)
 Set Output tabs. More...
 
 getEnabledTabs ()
 Get Output tabs. More...
 
 setEnabledPageFocus ($a_enabledpagefocus)
 Set Enable page focus. More...
 
 getEnabledPageFocus ()
 Get Enable page focus. More...
 
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater. More...
 
 setPrependingHtml ($a_prependinghtml)
 Set Prepending HTML. More...
 
 getPrependingHtml ()
 Get Prepending HTML. More...
 
 setEnableEditing ($a_enableediting)
 Set Enable Editing. More...
 
 getEnableEditing ()
 Get Enable Editing. More...
 
 setRawPageContent ($a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 Get Get raw page content only. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 setCompareMode ($a_val)
 Set compare mode. More...
 
 getCompareMode ()
 Get compare mode. More...
 
 setAbstractOnly ($a_val)
 Set abstract only. More...
 
 getAbstractOnly ()
 Get abstract only. More...
 
 setRenderPageContainer ($a_val)
 Set render page container. More...
 
 getRenderPageContainer ()
 Get render page container. More...
 
 activateMetaDataEditor ($a_rep_obj_id, $a_sub_obj_id, $a_type, $a_observer_obj=NULL, $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 Determine file download link. More...
 
 determineFullscreenLink ()
 Determine fullscreen link. More...
 
 determineSourcecodeDownloadScript ()
 Determine source code download script. More...
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
executeCommand ()
 execute command More...
 
 setQEditTabs ($a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 On feedback editing forwarding. More...
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 
 replaceCurlyBrackets ($output)
 Replace curly brackets. More...
 
 addActionsMenu ($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
 Add actions menu. More...
 
 addMultiLangActionsAndInfo ($a_list, $a_tpl)
 Add multi-language actions to menu. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 Set standard link xml. More...
 
 downloadFile ()
 Download file of file lists. More...
 
 displayMediaFullscreen ()
 Show media in fullscreen mode. More...
 
 displayMedia ($a_fullscreen=false)
 Display media. More...
 
 download_paragraph ()
 download source code paragraph More...
 
 insertContentIncludes ($a_html)
 Insert content includes. More...
 
 insertPageToc ($a_output)
 Insert page toc. More...
 
 insertResources ($a_output)
 Insert resources. More...
 
 insertAdvTrigger ($a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
 insertHelp ($a_tpl)
 Insert help texts. More...
 
 preview ()
 preview More...
 
 edit ()
 edit ("view" before) More...
 
 insertJSAtPlaceholder ()
 InsertJS at placeholder. More...
 
 presentation ($a_mode=IL_PAGE_PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen ($a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 Set screen id component. More...
 
 getTabs ($a_activate="")
 adds tabs to tab gui object More...
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags ($a_html)
 
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration) More...
 
 initActivationForm ()
 Init activation form. More...
 
 getActivationFormValues ()
 Get values for activation form. More...
 
 saveActivation ()
 Save Activation. More...
 
 getNotesHTML ($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
 Get html for public and/or private notes. More...
 
 getQuestionJsOfPage ($a_no_interaction=false)
 Get question js. More...
 
 initSelfAssessmentRendering ($a_force_no_form=false)
 Init question handling. More...
 
 processAnswer ()
 Process answer. More...
 
 selfAssessmentRendering ($a_output)
 Self assessment question rendering. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 Init form for initially opened content. More...
 
 saveInitialOpenedContent ()
 Save initial opened content. More...
 
 switchToLanguage ()
 Switch to language. More...
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 createPageTranslation ()
 Create page translation. More...
 
 releasePageLock ()
 Release page lock. More...
 

Static Public Member Functions

static initExport ()
 Init export. More...
 
static getGlossaryHTML ($a_sco)
 Get glossary html (only in export mode) More...
 
- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu ($a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true)
 Get Tiny Menu. More...
 
static addPreparationJavascript ($a_tpl, $a_lang)
 Add standard texts. More...
 
static getJSTextInitCode ($a_lang)
 Get js txt init code. More...
 

Static Public Attributes

static $export_glo_tpl
 

Protected Attributes

 $glossary_links = array()
 
 $scorm_mode = "preview"
 
- Protected Attributes inherited from ilPageObjectGUI
 $parent_type = ""
 

Additional Inherited Members

- Data Fields inherited from ilPageObjectGUI
 $tpl
 
 $lng
 
 $ctrl
 
 $obj
 
 $output_mode
 
 $presentation_title
 
 $target_script
 
 $return_location
 
 $target_var
 
 $template_output_var
 
 $output2template
 
 $link_params
 
 $bib_id
 
 $citation
 
 $sourcecode_download_script
 
 $change_comments
 
 $question_html
 
 $activation = false
 
 $activated = true
 
 $editpreview = false
 
 $use_meta_data = false
 
 $link_xml_set = false
 
 $enableediting = true
 
 $rawpagecontent = false
 
 $enabledcontentincludes = false
 
 $compare_mode = false
 
 $page_config = null
 
 $tabs_enabled = true
 
 $render_page_container = false
 
 $pl_start = "{{{{{"
 
 $pl_end = "}}}}}"
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSCORM2004PageGUI::__construct (   $a_parent_type,
  $a_id = 0,
  $a_old_nr = 0,
  $a_slm_id = 0,
  $a_glo_id = 0 
)

Constructor.

Definition at line 30 of file class.ilSCORM2004PageGUI.php.

References $ilCtrl, ilPageObjectGUI\$tpl, ilPageObjectGUI\enableNotes(), ilPageObjectGUI\getPageObject(), and ilPageObjectGUI\setIntLinkReturn().

32  {
33  global $tpl, $ilCtrl;
34 
35  $this->glo_id = $a_glo_id;
36  $this->slm_id = $a_slm_id;
37 
38  $a_parent_type = "sahs";
39 
40  parent::__construct($a_parent_type, $a_id, $a_old_nr);
41  $this->getPageObject()->setGlossaryId($this->glo_id);
42 
43  $this->setIntLinkReturn(
44  $ilCtrl->getLinkTargetByClass("ilobjscorm2004learningmodulegui", "showTree",
45  "", false, false));
46  include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
47  $this->enableNotes(true, $this->slm_id);
48  }
enableNotes($a_enabled, $a_parent_id)
getPageObject()
Get Page Object.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

& ilSCORM2004PageGUI::executeCommand ( )

execute command

Definition at line 74 of file class.ilSCORM2004PageGUI.php.

References $cmd, and $ilCtrl.

75  {
76  global $ilCtrl;
77 
78  $next_class = $this->ctrl->getNextClass($this);
79  $cmd = $this->ctrl->getCmd();
80 
81  switch($next_class)
82  {
83  case 'ilmdeditorgui':
84  return parent::executeCommand();
85  break;
86 
87  case "ilpageobjectgui":
88 die("ilSCORM2004PageGUI forwarding to ilpageobjectgui error.");
89  return;
90 
91  default:
92  $html = parent::executeCommand();
93  return $html;
94  }
95  }
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18

◆ getGlossaryHTML()

static ilSCORM2004PageGUI::getGlossaryHTML (   $a_sco)
static

Get glossary html (only in export mode)

Definition at line 426 of file class.ilSCORM2004PageGUI.php.

References $ret, and ilSCORM2004ScoGUI\getGloOverviewOv().

Referenced by ilSCORM2004Asset\exportHTMLPageObjects(), and ilSCORM2004ScoGUI\sco_preview().

427  {
428  $ret = self::$export_glo_tpl->get();
429 
431 
432  return $ret;
433  }
static getGloOverviewOv($a_sco)
des
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGlossaryOverviewId()

ilSCORM2004PageGUI::getGlossaryOverviewId ( )

Get glossary overview id.

Returns
string glossary overview id

Definition at line 66 of file class.ilSCORM2004PageGUI.php.

Referenced by postOutputProcessing().

67  {
68  return $this->glossary_ov_id;
69  }
+ Here is the caller graph for this function:

◆ getQuestionHtmlOfPage()

ilSCORM2004PageGUI::getQuestionHtmlOfPage ( )

Get question html for page.

Definition at line 131 of file class.ilSCORM2004PageGUI.php.

References assQuestionGUI\_getQuestionGUI(), and ilPageObjectGUI\getPageObject().

132  {
133  $q_ids = $this->getPageObject()->getQuestionIds();
134 
135  $html = array();
136  if (count($q_ids) > 0)
137  {
138  foreach ($q_ids as $q_id)
139  {
140  include_once("./Modules/TestQuestionPool/classes/class.assQuestionGUI.php");
141  $q_gui =& assQuestionGUI::_getQuestionGUI("", $q_id);
142  $q_gui->outAdditionalOutput();
143  $html[$q_id] = $q_gui->getPreview(TRUE);
144  }
145  }
146 
147  return $html;
148  }
getPageObject()
Get Page Object.
& _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
+ Here is the call graph for this function:

◆ getSCORM2004Page()

ilSCORM2004PageGUI::getSCORM2004Page ( )

Get SCORM2004 Page Object.

Returns
object Page Object

Definition at line 112 of file class.ilSCORM2004PageGUI.php.

References ilPageObjectGUI\getPageObject().

113  {
114  return $this->getPageObject();
115  }
getPageObject()
Get Page Object.
+ Here is the call graph for this function:

◆ initExport()

static ilSCORM2004PageGUI::initExport ( )
static

Init export.

Definition at line 418 of file class.ilSCORM2004PageGUI.php.

Referenced by ilSCORM2004Asset\exportHTMLPageObjects(), and ilSCORM2004ScoGUI\sco_preview().

419  {
420  self::$export_glo_tpl = new ilTemplate("tpl.glossary_entries.html", true, true, "Modules/Scorm2004");
421  }
special template class to simplify handling of ITX/PEAR
+ Here is the caller graph for this function:

◆ initSelfAssessmentRendering()

ilSCORM2004PageGUI::initSelfAssessmentRendering ( )

Init question handling.

Parameters

Definition at line 160 of file class.ilSCORM2004PageGUI.php.

161  {
162  if ($this->scorm_mode == "preview")
163  {
164  parent::initSelfAssessmentRendering();
165  }
166  }

◆ postOutputProcessing()

ilSCORM2004PageGUI::postOutputProcessing (   $a_output)

Post output processing:

  • Add glossary divs

Definition at line 271 of file class.ilSCORM2004PageGUI.php.

References $ret, ilPageObjectGUI\$tpl, ilObjSAHSLearningModule\getAffectiveLocalization(), ilSCORM2004ScoGUI\getGloOverviewOv(), getGlossaryOverviewId(), ilPageObjectGUI\getOutputMode(), ilPageObjectGUI\getPageObject(), and IL_PAGE_PREVIEW.

272  {
273 //var_dump($this->glossary_links);
274  include_once("./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
275 
276  if ($this->scorm_mode != "export")
277  {
278  $tpl = new ilTemplate("tpl.glossary_entries.html", true, true, "Modules/Scorm2004");
279  }
280  else
281  {
282  $tpl = self::$export_glo_tpl;
283  }
284  $glossary = false;
285 
286  $overlays = array();
287 
288  // overlay for sco glossary
289  if ($this->getGlossaryOverviewId() != "" && $this->getOutputMode() != "edit")
290  {
291  $ovov = $overlays[$this->getGlossaryOverviewId()] = new ilOverlayGUI($this->getGlossaryOverviewId());
292 // $ovov->setFixedCenter(true);
293  $ovov->setAutoHide(false);
294  $ovov->setCloseElementId("glo_ov_close");
295  if ($this->getGlossaryOverviewId() != "")
296  {
297  if ($this->scorm_mode != "export" ||
298  $this->getOutputMode() == IL_PAGE_PREVIEW)
299  {
300  $overlays[$this->getGlossaryOverviewId()]->add();
301  }
302  else
303  {
304  $tpl->setCurrentBlock("add_script");
305  $tpl->setVariable("ADD_SCRIPT", "il.Util.addOnLoad(function () {".$overlays[$this->getGlossaryOverviewId()]->getOnLoadCode()."});");
306  $tpl->parseCurrentBlock();
307  }
308  }
309  }
310 
311  if ($this->getOutputMode() != "edit")
312  {
313  if (is_array($this->glossary_links))
314  {
315  foreach ($this->glossary_links as $k => $e)
316  {
317  // glossary link
318  if ($e["Type"] == "GlossaryItem")
319  {
320  $karr = explode(":", $k);
321  $link_id = $karr[0]."_".$this->getPageObject()->getId()."_".$karr[4];
322  //$ov_id = "ov".$karr[0]."_".$karr[4];
323  $ov_id = "ov".$karr[0];
324  $cl_id = "ov".$karr[0]."cl";
325  $glov_id = "ov".$karr[0]."ov";
326  $term_id_arr = explode("_", $karr[0]);
327  $term_id = $term_id_arr[count($term_id_arr) - 1];
328 
329  // get overlay html from glossary term
330  include_once("./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
331  $id_arr = explode("_", $karr[0]);
332  $term_gui =& new ilGlossaryTermGUI($id_arr[count($id_arr) - 1]);
333  $html = $term_gui->getOverlayHTML($cl_id, ($this->getGlossaryOverviewId() != "")
334  ? $glov_id
335  : "",
337  $tpl->setCurrentBlock("entry");
338  $tpl->setVariable("CONTENT", $html);
339  $tpl->setVariable("OVERLAY_ID", $ov_id);
340 
341  $glossary = true;
342 
343  // first time the term is used
344  if (!isset($overlays[$ov_id]))
345  {
346  $overlays[$ov_id] = new ilOverlayGUI($ov_id);
347  $overlays[$ov_id]->setAnchor($link_id);
348  $overlays[$ov_id]->setTrigger($link_id, "click", $link_id);
349  $overlays[$ov_id]->setAutoHide(false);
350  $overlays[$ov_id]->setCloseElementId($cl_id);
351  if ($this->scorm_mode != "export" ||
352  $this->getOutputMode() == IL_PAGE_PREVIEW)
353  {
354  $overlays[$ov_id]->add();
355  }
356  else
357  {
358  $tpl->setVariable("SCRIPT", "il.Util.addOnLoad(function () {".$overlays[$ov_id]->getOnLoadCode()."});");
359  }
360  }
361  else
362  {
363  if ($this->scorm_mode != "export" ||
364  $this->getOutputMode() == IL_PAGE_PREVIEW)
365  {
366  $overlays[$ov_id]->addTrigger($link_id, "click", $link_id);
367  }
368  else
369  {
370  $tpl->setVariable("SCRIPT",
371  "il.Util.addOnLoad(function () {".$overlays[$ov_id]->getTriggerOnLoadCode($link_id, "click", $link_id)."});");
372  }
373  }
374 
375  if ($this->getGlossaryOverviewId() != "")
376  {
377  if ($this->scorm_mode != "export" ||
378  $this->getOutputMode() == IL_PAGE_PREVIEW)
379  {
380  //$overlays[$this->getGlossaryOverviewId()]->addTrigger($glov_id, "click", null);
381  $overlays[$this->getGlossaryOverviewId()]->addTrigger($glov_id, "click", $ov_id, false, "tl", "tl");
382  //$overlays[$ov_id]->addTrigger("glo_ov_t".$term_id, "click", null, true);
383  $overlays[$ov_id]->addTrigger("glo_ov_t".$term_id, "click", $this->getGlossaryOverviewId(), false, "tl", "tl");
384  }
385  else
386  {
387  $tpl->setVariable("SCRIPT2",
388  "il.Util.addOnLoad(function () {".
389  $overlays[$this->getGlossaryOverviewId()]->getTriggerOnLoadCode($glov_id, "click", $ov_id, false, "tl", "tl")."});");
390  $tpl->setVariable("SCRIPT3",
391  "il.Util.addOnLoad(function () {".
392  $overlays[$ov_id]->getTriggerOnLoadCode("glo_ov_t".$term_id, "click", $this->getGlossaryOverviewId(), false, "tl", "tl")."});");
393  }
394  }
395 
396  $tpl->parseCurrentBlock();
397  }
398  }
399  }
400 
401  if ($glossary && $this->scorm_mode != "export")
402  {
403  $ret = $a_output.$tpl->get();
404  if ($this->getGlossaryOverviewId() != "")
405  {
407  }
408  return $ret;
409  }
410  }
411 
412  return $a_output;
413  }
const IL_PAGE_PREVIEW
getPageObject()
Get Page Object.
static getGloOverviewOv($a_sco)
des
special template class to simplify handling of ITX/PEAR
This is a utility class for the yui overlays.
GUI class for glossary terms.
getAffectiveLocalization($a_id)
Get affective localization.
getGlossaryOverviewId()
Get glossary overview id.
+ Here is the call graph for this function:

◆ selfAssessmentRendering()

ilSCORM2004PageGUI::selfAssessmentRendering (   $a_output)

Self assessment question rendering.

Parameters

Definition at line 174 of file class.ilSCORM2004PageGUI.php.

175  {
176  if ($this->scorm_mode == "preview")
177  {
178  $a_output = parent::selfAssessmentRendering($a_output);
179  }
180 
181  return $a_output;
182  }

◆ setDefaultLinkXml()

ilSCORM2004PageGUI::setDefaultLinkXml ( )

Set standard link xml (currently only glossaries)

Definition at line 203 of file class.ilSCORM2004PageGUI.php.

References $target_arr, $target_id, ilObjFile\_lookupFileName(), ilObject\_lookupType(), ilPageObjectGUI\determineFileDownloadLink(), ilPageObjectGUI\getOutputMode(), ilPageObjectGUI\getPageObject(), and ilPageObjectGUI\setLinkXML().

204  {
205  $int_links = $this->getPageObject()->getInternalLinks(true);
206  $this->glossary_links = $int_links;
207 //var_dump($int_links);
208 
209 // key is il__git_18:GlossaryItem:Glossary::4 => id is il__git_18_4,
210 
211  $link_info = "<IntLinkInfos>";
212  $targetframe = "None";
213  $ltarget = "";
214  foreach ($int_links as $int_link)
215  {
216  $onclick = "";
217  $target = $int_link["Target"];
218  $targetframe = "None";
219  if (substr($target, 0, 4) == "il__")
220  {
221  $target_arr = explode("_", $target);
222  $target_id = $target_arr[count($target_arr) - 1];
223  $type = $int_link["Type"];
224 
225  switch($type)
226  {
227  case "GlossaryItem":
228  $ltarget = "";
229  //$href = "./goto.php?target=git_".$target_id;
230  $href = "#";
231  $onclick = 'OnClick="return false;"';
232  $anc_par = 'Anchor=""';
233  $targetframe = "Glossary";
234  break;
235 
236  case "File":
237  $ltarget = "";
238  if ($this->getOutputMode() == "offline")
239  {
240  if (ilObject::_lookupType($target_id) == "file")
241  {
242  include_once("./Modules/File/classes/class.ilObjFile.php");
243  $href = "./files/file_".$target_id."/".ilObjFile::_lookupFileName($target_id);
244  $ltarget = "_blank";
245  }
246  }
247  else
248  {
249  $href = str_replace("&", "&amp;", $this->determineFileDownloadLink())."&amp;file_id=il__file_".$target_id;
250 //echo htmlentities($href);
251  }
252 
253  $anc_par = 'Anchor=""';
254  $targetframe = "None"; //???
255  break;
256 
257  }
258  $link_info.="<IntLinkInfo $onclick Target=\"$target\" Type=\"$type\" ".$anc_par." ".
259  "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
260  }
261  }
262  $link_info.= "</IntLinkInfos>";
263  $this->setLinkXML($link_info);
264 //var_dump($link_info);
265  }
$target_arr
Definition: goto.php:86
getPageObject()
Get Page Object.
$target_id
Definition: goto.php:88
determineFileDownloadLink()
Determine file download link.
static _lookupType($a_id, $a_reference=false)
lookup object type
_lookupFileName($a_id)
+ Here is the call graph for this function:

◆ setGlossaryOverviewInfo()

ilSCORM2004PageGUI::setGlossaryOverviewInfo (   $a_ov_id,
  $a_sco 
)

Set glossary overview id.

Parameters
stringglossary overview id

Definition at line 55 of file class.ilSCORM2004PageGUI.php.

56  {
57  $this->glossary_ov_id = $a_ov_id;
58  $this->sco = $a_sco;
59  }

◆ setSCORM2004Page()

ilSCORM2004PageGUI::setSCORM2004Page (   $a_scpage)

Set SCORM2004 Page Object.

Parameters
object$a_scpagePage Object

Definition at line 102 of file class.ilSCORM2004PageGUI.php.

References ilPageObjectGUI\setPageObject().

103  {
104  $this->setPageObject($a_scpage);
105  }
setPageObject($a_pg_obj)
Set Page Object.
+ Here is the call graph for this function:

◆ showPage()

ilSCORM2004PageGUI::showPage (   $a_mode = "preview")

Show the page.

Definition at line 187 of file class.ilSCORM2004PageGUI.php.

References $ilCtrl, ilPageObjectGUI\$tpl, and ilPageObjectGUI\setTemplateOutput().

188  {
189  global $tpl, $ilCtrl;
190 
191  $this->scorm_mode = $a_mode;
192 
193  $this->setTemplateOutput(false);
194 
195  $output = parent::showPage();
196 
197  return $output;
198  }
setTemplateOutput($a_output=true)
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

Field Documentation

◆ $export_glo_tpl

ilSCORM2004PageGUI::$export_glo_tpl
static

Definition at line 25 of file class.ilSCORM2004PageGUI.php.

◆ $glossary_links

ilSCORM2004PageGUI::$glossary_links = array()
protected

Definition at line 23 of file class.ilSCORM2004PageGUI.php.

◆ $scorm_mode

ilSCORM2004PageGUI::$scorm_mode = "preview"
protected

Definition at line 24 of file class.ilSCORM2004PageGUI.php.


The documentation for this class was generated from the following file: