ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilSCORMItemGUI Class Reference

GUI class for SCORM Items. More...

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

Public Member Functions

 __construct ($a_id)
 
 view ()
 
 api ()
 
- Public Member Functions inherited from ilSCORMObjectGUI
 __construct ($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.

Constructor & Destructor Documentation

◆ __construct()

ilSCORMItemGUI::__construct (   $a_id)

Reimplemented from ilSCORMObjectGUI.

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

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

Member Function Documentation

◆ api()

ilSCORMItemGUI::api ( )

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

128 {
129 global $ilias;
130
131 $slm_obj = new ilObjSCORMLearningModule($_GET["ref_id"]);
132
133 $func_tpl = new ilTemplate("tpl.scorm_functions.html", true, true, "Modules/ScormAicc");
134 $func_tpl->setVariable("PREFIX", $slm_obj->getAPIFunctionsPrefix());
135 $func_tpl->parseCurrentBlock();
136
137 $this->tpl = new ilTemplate("tpl.scorm_api.html", true, true, "Modules/ScormAicc");
138 $this->tpl->setVariable("SCORM_FUNCTIONS", $func_tpl->get());
139 $this->tpl->setVariable("ITEM_ID", $_GET["obj_id"]);
140 $this->tpl->setVariable("USER_ID", $ilias->account->getId());
141 $this->tpl->setVariable("SESSION_ID", session_id());
142
143 $this->tpl->setVariable("CODE_BASE", "http://" . $_SERVER['SERVER_NAME'] . substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], "/ilias.php")));
144
145 $this->tpl->show();
146 exit;
147 }
$_GET["client_id"]
Class ilObjSCORMLearningModule.
special template class to simplify handling of ITX/PEAR
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']

References $_GET, $_SERVER, and exit.

◆ 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 $resource = new ilSCORMResource();
53 $resource->readByIdRef($id_ref, $this->sc_object->getSLMId());
54
55 $slm_obj = new ilObjSCORMLearningModule($_GET["ref_id"]);
56
57 if ($resource->getHref() != "") {
58 $param_str = ($this->sc_object->getParameters() != "")
59 ? "?" . $this->sc_object->getParameters()
60 : "";
61
62 $this->tpl = new ilTemplate("tpl.scorm_content_frameset.html", true, true, "Modules/ScormAicc");
63 $this->tpl->setVariable("ITEM_LOCATION", $slm_obj->getDataDirectory() . "/" . $resource->getHref() . $param_str);
64 $this->tpl->setVariable("ITEM_ID", $_GET["obj_id"]);
65 $this->tpl->setVariable("REF_ID", $_GET["ref_id"]);
66 $this->tpl->setVariable("USER_ID", $ilias->account->getId());
67 $this->tpl->setVariable("ADAPTER_NAME", $slm_obj->getAPIAdapterName());
68 $this->tpl->show();
69 exit;
70 }
71 }
72
73 // this point is only reached if now resource could be displayed above!
74 $this->tpl->addBlockFile("CONTENT", "content", "tpl.scorm_obj.html", "Modules/ScormAicc");
75 $this->tpl->setCurrentBlock("par_table");
76 $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_item"));
77 $this->displayParameter(
78 $this->lng->txt("cont_import_id"),
79 $this->sc_object->getImportId()
80 );
81 $this->displayParameter(
82 $this->lng->txt("cont_id_ref"),
83 $this->sc_object->getIdentifierRef()
84 );
85 $str_visible = ($this->sc_object->getVisible())
86 ? "true"
87 : "false";
88 $this->displayParameter(
89 $this->lng->txt("cont_is_visible"),
90 $str_visible
91 );
92 $this->displayParameter(
93 $this->lng->txt("cont_parameters"),
94 $this->sc_object->getParameters()
95 );
96 $this->displayParameter(
97 $this->lng->txt("cont_sc_title"),
98 $this->sc_object->getTitle()
99 );
100 $this->displayParameter(
101 $this->lng->txt("cont_prereq_type"),
102 $this->sc_object->getPrereqType()
103 );
104 $this->displayParameter(
105 $this->lng->txt("cont_prerequisites"),
106 $this->sc_object->getPrerequisites()
107 );
108 $this->displayParameter(
109 $this->lng->txt("cont_max_time_allowed"),
110 $this->sc_object->getMaxTimeAllowed()
111 );
112 $this->displayParameter(
113 $this->lng->txt("cont_time_limit_action"),
114 $this->sc_object->getTimeLimitAction()
115 );
116 $this->displayParameter(
117 $this->lng->txt("cont_data_from_lms"),
118 $this->sc_object->getDataFromLms()
119 );
120 $this->displayParameter(
121 $this->lng->txt("cont_mastery_score"),
122 $this->sc_object->getMasteryScore()
123 );
124 $this->tpl->parseCurrentBlock();
125 }
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: