ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSCORMItemGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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
 $sc_object
 
ilGlobalTemplate $tpl
 
ilLanguage $lng
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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)

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

References ILIAS\GlobalScreen\Provider\__construct().

31  {
33  $this->sc_object = new ilSCORMItem($a_id);
34  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ view()

ilSCORMItemGUI::view ( )

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

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

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, "Modules/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", "Modules/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  }
exit
Definition: login.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
$objId
Definition: xapitoken.php:57
$refId
Definition: xapitoken.php:58
displayParameter(string $a_name, string $a_value)
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

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