ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilSCORMItemGUI Class Reference

GUI class for SCORM Items. More...

+ Inheritance diagram for ilSCORMItemGUI:
+ Collaboration diagram for ilSCORMItemGUI:

Public Member Functions

 ilSCORMItemGUI ($a_id)
 
 view ()
 
 api ()
 
- Public Member Functions inherited from ilSCORMObjectGUI
 ilSCORMObjectGUI ($a_id=0)
 
getInstance ($a_id)
 get instance of specialized GUI class More...
 
 displayParameter ($a_name, $a_value)
 

Additional Inherited Members

- Data Fields inherited from ilSCORMObjectGUI
 $sc_object
 
 $tpl
 
 $lng
 

Detailed Description

GUI class for SCORM Items.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 37 of file class.ilSCORMItemGUI.php.

Member Function Documentation

◆ api()

ilSCORMItemGUI::api ( )

Definition at line 108 of file class.ilSCORMItemGUI.php.

109 {
110 global $ilias;
111
112 $slm_obj =& new ilObjSCORMLearningModule($_GET["ref_id"]);
113
114 $func_tpl = new ilTemplate("tpl.scorm_functions.html", true, true, "Modules/ScormAicc");
115 $func_tpl->setVariable("PREFIX", $slm_obj->getAPIFunctionsPrefix());
116 $func_tpl->parseCurrentBlock();
117
118 $this->tpl =& new ilTemplate("tpl.scorm_api.html", true, true, "Modules/ScormAicc");
119 $this->tpl->setVariable("SCORM_FUNCTIONS", $func_tpl->get());
120 $this->tpl->setVariable("ITEM_ID", $_GET["obj_id"]);
121 $this->tpl->setVariable("USER_ID",$ilias->account->getId());
122 $this->tpl->setVariable("SESSION_ID",session_id());
123
124 $this->tpl->setVariable("CODE_BASE", "http://".$_SERVER['SERVER_NAME'].substr($_SERVER['PHP_SELF'], 0, strpos ($_SERVER['PHP_SELF'], "/ilias.php")));
125
126 $this->tpl->show();
127 exit;
128 }
$_GET["client_id"]
Class ilObjSCORMLearningModule.
special template class to simplify handling of ITX/PEAR
exit
Definition: login.php:54
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']

References $_GET, $_SERVER, and exit.

◆ ilSCORMItemGUI()

ilSCORMItemGUI::ilSCORMItemGUI (   $a_id)

Definition at line 39 of file class.ilSCORMItemGUI.php.

40 {
41 parent::ilSCORMObjectGUI();
42 $this->sc_object =& new ilSCORMItem($a_id);
43 }

◆ view()

ilSCORMItemGUI::view ( )

Definition at line 45 of file class.ilSCORMItemGUI.php.

46 {
47 global $ilias;
48
49 // get ressource identifier
50 $id_ref = $this->sc_object->getIdentifierRef();
51 if ($id_ref != "")
52 {
53 $resource =& new ilSCORMResource();
54 $resource->readByIdRef($id_ref, $this->sc_object->getSLMId());
55
56 $slm_obj =& new ilObjSCORMLearningModule($_GET["ref_id"]);
57
58 if ($resource->getHref() != "")
59 {
60 $param_str = ($this->sc_object->getParameters() != "")
61 ? "?".$this->sc_object->getParameters()
62 : "";
63
64 $this->tpl =& new ilTemplate("tpl.scorm_content_frameset.html", true, true, "Modules/ScormAicc");
65 $this->tpl->setVariable("ITEM_LOCATION",$slm_obj->getDataDirectory()."/".$resource->getHref().$param_str);
66 $this->tpl->setVariable("ITEM_ID", $_GET["obj_id"]);
67 $this->tpl->setVariable("REF_ID", $_GET["ref_id"]);
68 $this->tpl->setVariable("USER_ID",$ilias->account->getId());
69 $this->tpl->setVariable("ADAPTER_NAME", $slm_obj->getAPIAdapterName());
70 $this->tpl->show();
71 exit;
72 }
73 }
74
75 // this point is only reached if now resource could be displayed above!
76 $this->tpl->addBlockFile("CONTENT", "content", "tpl.scorm_obj.html", "Modules/ScormAicc");
77 $this->tpl->setCurrentBlock("par_table");
78 $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_item"));
79 $this->displayParameter($this->lng->txt("cont_import_id"),
80 $this->sc_object->getImportId());
81 $this->displayParameter($this->lng->txt("cont_id_ref"),
82 $this->sc_object->getIdentifierRef());
83 $str_visible = ($this->sc_object->getVisible())
84 ? "true"
85 : "false";
86 $this->displayParameter($this->lng->txt("cont_is_visible"),
87 $str_visible);
88 $this->displayParameter($this->lng->txt("cont_parameters"),
89 $this->sc_object->getParameters());
90 $this->displayParameter($this->lng->txt("cont_sc_title"),
91 $this->sc_object->getTitle());
92 $this->displayParameter($this->lng->txt("cont_prereq_type"),
93 $this->sc_object->getPrereqType());
94 $this->displayParameter($this->lng->txt("cont_prerequisites"),
95 $this->sc_object->getPrerequisites());
96 $this->displayParameter($this->lng->txt("cont_max_time_allowed"),
97 $this->sc_object->getMaxTimeAllowed());
98 $this->displayParameter($this->lng->txt("cont_time_limit_action"),
99 $this->sc_object->getTimeLimitAction());
100 $this->displayParameter($this->lng->txt("cont_data_from_lms"),
101 $this->sc_object->getDataFromLms());
102 $this->displayParameter($this->lng->txt("cont_mastery_score"),
103 $this->sc_object->getMasteryScore());
104 $this->tpl->parseCurrentBlock();
105
106 }
displayParameter($a_name, $a_value)

References $_GET, ilSCORMObjectGUI\displayParameter(), and exit.

+ Here is the call graph for this function:

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