ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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)

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

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

Member Function Documentation

◆ api()

ilSCORMItemGUI::api ( )

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

References $_GET, $_SERVER, $DIC, and exit.

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

◆ view()

ilSCORMItemGUI::view ( )

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

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

46  {
47  global $DIC;
48  $ilias = $DIC['ilias'];
49 
50  // get ressource identifier
51  $id_ref = $this->sc_object->getIdentifierRef();
52  if ($id_ref != "") {
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  $param_str = ($this->sc_object->getParameters() != "")
60  ? "?" . $this->sc_object->getParameters()
61  : "";
62 
63  $this->tpl = new ilTemplate("tpl.scorm_content_frameset.html", true, true, "Modules/ScormAicc");
64  $this->tpl->setVariable("ITEM_LOCATION", $slm_obj->getDataDirectory() . "/" . $resource->getHref() . $param_str);
65  $this->tpl->setVariable("ITEM_ID", $_GET["obj_id"]);
66  $this->tpl->setVariable("REF_ID", $_GET["ref_id"]);
67  $this->tpl->setVariable("USER_ID", $ilias->account->getId());
68  $this->tpl->setVariable("ADAPTER_NAME", $slm_obj->getAPIAdapterName());
69  $this->tpl->show();
70  exit;
71  }
72  }
73 
74  // this point is only reached if now resource could be displayed above!
75  $this->tpl->addBlockFile("CONTENT", "content", "tpl.scorm_obj.html", "Modules/ScormAicc");
76  $this->tpl->setCurrentBlock("par_table");
77  $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_item"));
78  $this->displayParameter(
79  $this->lng->txt("cont_import_id"),
80  $this->sc_object->getImportId()
81  );
82  $this->displayParameter(
83  $this->lng->txt("cont_id_ref"),
84  $this->sc_object->getIdentifierRef()
85  );
86  $str_visible = ($this->sc_object->getVisible())
87  ? "true"
88  : "false";
89  $this->displayParameter(
90  $this->lng->txt("cont_is_visible"),
91  $str_visible
92  );
93  $this->displayParameter(
94  $this->lng->txt("cont_parameters"),
95  $this->sc_object->getParameters()
96  );
97  $this->displayParameter(
98  $this->lng->txt("cont_sc_title"),
99  $this->sc_object->getTitle()
100  );
101  $this->displayParameter(
102  $this->lng->txt("cont_prereq_type"),
103  $this->sc_object->getPrereqType()
104  );
105  $this->displayParameter(
106  $this->lng->txt("cont_prerequisites"),
107  $this->sc_object->getPrerequisites()
108  );
109  $this->displayParameter(
110  $this->lng->txt("cont_max_time_allowed"),
111  $this->sc_object->getMaxTimeAllowed()
112  );
113  $this->displayParameter(
114  $this->lng->txt("cont_time_limit_action"),
115  $this->sc_object->getTimeLimitAction()
116  );
117  $this->displayParameter(
118  $this->lng->txt("cont_data_from_lms"),
119  $this->sc_object->getDataFromLms()
120  );
121  $this->displayParameter(
122  $this->lng->txt("cont_mastery_score"),
123  $this->sc_object->getMasteryScore()
124  );
125  $this->tpl->parseCurrentBlock();
126  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
special template class to simplify handling of ITX/PEAR
displayParameter($a_name, $a_value)
exit
Definition: backend.php:16
Class ilObjSCORMLearningModule.
+ Here is the call graph for this function:

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