ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSCORMItemGUI Class Reference

GUI class for SCORM Items. More...

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

Public Member Functions

 __construct (int $a_id)
 
 view ()
 
- Public Member Functions inherited from ilSCORMObjectGUI
 __construct (int $a_id=0)
 
getInstance (int $a_id)
 
 displayParameter (string $a_name, string $a_value)
 

Additional Inherited Members

- Data Fields inherited from ilSCORMObjectGUI
ilSCORMManifest ilSCORMItem ilSCORMOrganization ilSCORMOrganizations ilSCORMResource ilSCORMResources $sc_object
 
ilGlobalTemplate $tpl
 
ilLanguage $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 28 of file class.ilSCORMItemGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilSCORMItemGUI::__construct ( int  $a_id)

Reimplemented from ilSCORMObjectGUI.

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

31 {
33 $this->sc_object = new ilSCORMItem($a_id);
34 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ view()

ilSCORMItemGUI::view ( )

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

36 : void
37 {
38 global $DIC;
39 $usr = $DIC->user();
40
41 // get ressource identifier
42 $id_ref = $this->sc_object->getIdentifierRef();
43 if ($id_ref != "") {
44 $resource = new ilSCORMResource();
45 $resource->readByIdRef($id_ref, $this->sc_object->getSLMId());
46
47 $refId = $DIC->http()->wrapper()->query()->retrieve('ref_id', $DIC->refinery()->kindlyTo()->int());
48 $objId = $DIC->http()->wrapper()->query()->retrieve('obj_id', $DIC->refinery()->kindlyTo()->int());
49
50 $slm_obj = new ilObjSCORMLearningModule($refId);
51
52 if ($resource->getHref() != "") {
53 $param_str = ($this->sc_object->getParameters() != "")
54 ? "?" . $this->sc_object->getParameters()
55 : "";
56
57 $this->tpl = new ilGlobalTemplate("tpl.scorm_content_frameset.html", true, true, "components/ILIAS/ScormAicc");
58 $this->tpl->setVariable("ITEM_LOCATION", $slm_obj->getDataDirectory() . "/" . $resource->getHref() . $param_str);
59 $this->tpl->setVariable("ITEM_ID", $objId);
60 $this->tpl->setVariable("REF_ID", $refId);
61 $this->tpl->setVariable("USER_ID", $usr->getId());
62 $this->tpl->setVariable("ADAPTER_NAME", $slm_obj->getAPIAdapterName());
63 $this->tpl->printToStdout();
64 exit;
65 }
66 }
67
68 // this point is only reached if now resource could be displayed above!
69 $this->tpl->addBlockFile("CONTENT", "content", "tpl.scorm_obj.html", "components/ILIAS/ScormAicc");
70 $this->tpl->setCurrentBlock("par_table");
71 $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_item"));
72 $this->displayParameter(
73 $this->lng->txt("cont_import_id"),
74 $this->sc_object->getImportId()
75 );
76 $this->displayParameter(
77 $this->lng->txt("cont_id_ref"),
78 $this->sc_object->getIdentifierRef()
79 );
80 $str_visible = ($this->sc_object->getVisible())
81 ? "true"
82 : "false";
83 $this->displayParameter(
84 $this->lng->txt("cont_is_visible"),
85 $str_visible
86 );
87 $this->displayParameter(
88 $this->lng->txt("cont_parameters"),
89 $this->sc_object->getParameters()
90 );
91 $this->displayParameter(
92 $this->lng->txt("cont_sc_title"),
93 $this->sc_object->getTitle()
94 );
95 $this->displayParameter(
96 $this->lng->txt("cont_prereq_type"),
97 $this->sc_object->getPrereqType()
98 );
99 $this->displayParameter(
100 $this->lng->txt("cont_prerequisites"),
101 $this->sc_object->getPrerequisites()
102 );
103 $this->displayParameter(
104 $this->lng->txt("cont_max_time_allowed"),
105 $this->sc_object->getMaxTimeAllowed()
106 );
107 $this->displayParameter(
108 $this->lng->txt("cont_time_limit_action"),
109 $this->sc_object->getTimeLimitAction()
110 );
111 $this->displayParameter(
112 $this->lng->txt("cont_data_from_lms"),
113 $this->sc_object->getDataFromLms()
114 );
115 $this->displayParameter(
116 $this->lng->txt("cont_mastery_score"),
117 $this->sc_object->getMasteryScore()
118 );
119 $this->tpl->parseCurrentBlock();
120 }
special template class to simplify handling of ITX/PEAR
Class ilObjSCORMLearningModule.
displayParameter(string $a_name, string $a_value)
exit
global $DIC
Definition: shib_login.php:26
$objId
Definition: xapitoken.php:57
$refId
Definition: xapitoken.php:58

References $DIC, $objId, $refId, ilSCORMObjectGUI\displayParameter(), exit, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

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