ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilSCORMObjectGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
29 {
32  public ilLanguage $lng;
33 
34  public function __construct(int $a_id = 0)
35  {
36  global $DIC;
37  $tpl = $DIC['tpl'];
38  $lng = $DIC->language();
39 
40  if ($a_id !== 0) {
41  $this->sc_object = new ilSCORMItem($a_id);
42  }
43  $this->tpl = $tpl;
44  $this->lng = $lng;
45  }
46 
48  {
49  $object = new ilSCORMObject($a_id);
50  switch ($object->getType()) {
51  case "sit": // item
52  $item = new ilSCORMItemGUI($a_id);
53  return $item;
54 
55  case "sos": // organizations
56  $sos_gui = new ilSCORMOrganizationsGUI($a_id);
57  return $sos_gui;
58 
59  case "sor": // organization
60  $sor_gui = new ilSCORMOrganizationGUI($a_id);
61  return $sor_gui;
62 
63  case "sma": // manifest
64  $sma_gui = new ilSCORMManifestGUI($a_id);
65  return $sma_gui;
66 
67  case "srs": // resources
68  $srs_gui = new ilSCORMResourcesGUI($a_id);
69  return $srs_gui;
70 
71  default:
72  case "sre": // resource
73  $sre_gui = new ilSCORMResourceGUI($a_id);
74  return $sre_gui;
75  }
76  }
77 
78  public function displayParameter(string $a_name, string $a_value): void
79  {
80  $this->tpl->setCurrentBlock("parameter");
81  $this->tpl->setVariable("TXT_PARAMETER_NAME", $a_name);
82  $this->tpl->setVariable("TXT_PARAMETER_VALUE", $a_value);
83  $this->tpl->parseCurrentBlock();
84  }
85 }
Parent object for SCORM GUI objects.
GUI class for SCORM Organization element.
special template class to simplify handling of ITX/PEAR
ilSCORMManifest ilSCORMItem ilSCORMOrganization ilSCORMOrganizations ilSCORMResource ilSCORMResources $sc_object
displayParameter(string $a_name, string $a_value)
GUI class for SCORM Resource element.
Parent object for all SCORM objects, that are stored in table scorm_object.
global $DIC
Definition: shib_login.php:22
SCORM Item.
GUI class for SCORM Organizations element.
GUI class for SCORM Resources element.
SCORM Resources Element.
GUI class for SCORM Items.