ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSCORMResourceGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
29{
30 public function __construct(int $a_id)
31 {
33 $this->sc_object = new ilSCORMResource($a_id);
34 $files = &$this->sc_object->getFiles();
35 }
36
40 public function view(): void
41 {
42 $this->tpl = new ilGlobalTemplate("tpl.main.html", true, true);
43 $this->tpl->addBlockFile("CONTENT", "content", "tpl.scorm_obj.html", "components/ILIAS/ScormAicc");
44 $this->displayParameter(
45 $this->lng->txt("cont_import_id"),
46 $this->sc_object->getImportId()
47 );
48 $this->displayParameter(
49 $this->lng->txt("cont_resource_type"),
50 $this->sc_object->getResourceType()
51 );
52 $this->displayParameter(
53 $this->lng->txt("cont_scorm_type"),
54 $this->sc_object->getScormType()
55 );
56 $this->displayParameter(
57 $this->lng->txt("cont_href"),
58 $this->sc_object->getHref()
59 );
60 $this->displayParameter(
61 $this->lng->txt("cont_xml_base"),
62 $this->sc_object->getXmlBase()
63 );
64 $this->tpl->setCurrentBlock("partable");
65 $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_resource"));
66 $this->tpl->parseCurrentBlock();
67
68 // files
69 $files = &$this->sc_object->getFiles();
70 foreach ($files as $value) {
71 $this->displayParameter(
72 $this->lng->txt("cont_href"),
73 $value->getHRef()
74 );
75 }
76 $this->tpl->setCurrentBlock("partable");
77 $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_files"));
78 $this->tpl->parseCurrentBlock();
79
80 // dependencies
81 $deps = &$this->sc_object->getDependencies();
82 foreach ($deps as $value) {
83 $this->displayParameter(
84 $this->lng->txt("cont_id_ref"),
85 $value->getIdentifierRef()
86 );
87 }
88 $this->tpl->setCurrentBlock("partable");
89 $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_dependencies"));
90 $this->tpl->parseCurrentBlock();
91 }
92}
special template class to simplify handling of ITX/PEAR
Parent object for SCORM GUI objects.
displayParameter(string $a_name, string $a_value)
GUI class for SCORM Resource element.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc