ILIAS  release_8 Revision v8.24
class.ilSCORMObjectGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
29{
33 public $sc_object;
36
37 public function __construct(int $a_id = 0)
38 {
39 global $DIC;
40 $tpl = $DIC['tpl'];
41 $lng = $DIC->language();
42
43 if ($a_id !== 0) {
44 $this->sc_object = new ilSCORMItem($a_id);
45 }
46 $this->tpl = $tpl;
47 $this->lng = $lng;
48 }
49
53 public function &getInstance(int $a_id)
54 {
55 $object = new ilSCORMObject($a_id);
56 switch ($object->getType()) {
57 case "sit": // item
58 $item = new ilSCORMItemGUI($a_id);
59 return $item;
60
61 case "sos": // organizations
62 $sos_gui = new ilSCORMOrganizationsGUI($a_id);
63 return $sos_gui;
64
65 case "sor": // organization
66 $sor_gui = new ilSCORMOrganizationGUI($a_id);
67 return $sor_gui;
68
69 case "sma": // manifest
70 $sma_gui = new ilSCORMManifestGUI($a_id);
71 return $sma_gui;
72
73 case "srs": // resources
74 $srs_gui = new ilSCORMResourcesGUI($a_id);
75 return $srs_gui;
76
77 default:
78 case "sre": // resource
79 $sre_gui = new ilSCORMResourceGUI($a_id);
80 return $sre_gui;
81 }
82 }
83
84 public function displayParameter(string $a_name, string $a_value): void
85 {
86 $this->tpl->setCurrentBlock("parameter");
87 $this->tpl->setVariable("TXT_PARAMETER_NAME", $a_name);
88 $this->tpl->setVariable("TXT_PARAMETER_VALUE", $a_value);
89 $this->tpl->parseCurrentBlock();
90 }
91}
special template class to simplify handling of ITX/PEAR
language handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
displayParameter(string $a_name, string $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28