ILIAS  release_8 Revision v8.24
ilSAHSPresentationGUI 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 ilSAHSPresentationGUI:
+ Collaboration diagram for ilSAHSPresentationGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 view ()
 
 infoScreen ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 setInfoTabs (string $a_active)
 
 outputInfoScreen ()
 info screen More...
 

Protected Attributes

ilGlobalPageTemplate $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilObjSCORMLearningModuleGUI $slm_gui
 
int $refId
 

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 Class ilSAHSPresentationGUI

GUI class for scorm learning module presentation

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilSAHSPresentationGUI: ilSCORMPresentationGUI @ilCtrl_Calls ilSAHSPresentationGUI: ilInfoScreenGUI, ilSCORM13PlayerGUI @ilCtrl_Calls ilSAHSPresentationGUI: ilLearningProgressGUI @ilCtrl_Calls ilSAHSPresentationGUI: ilObjSCORMLearningModuleGUI, ilObjSCORM2004LearningModuleGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilSAHSPresentationGUI::__construct ( )
Exceptions
ilCtrlException

Definition at line 47 of file class.ilSAHSPresentationGUI.php.

48 {
49 global $DIC;
50 $this->tpl = $DIC['tpl'];
51 $this->lng = $DIC->language();
52 $this->ctrl = $DIC->ctrl();
53 $this->ctrl->saveParameter($this, "ref_id");
54 $this->refId = $DIC->http()->wrapper()->query()->retrieve('ref_id', $DIC->refinery()->kindlyTo()->int());
55 }
global $DIC
Definition: feed.php:28

References $DIC, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilSAHSPresentationGUI::executeCommand ( )
Exceptions
ilCtrlException

Definition at line 60 of file class.ilSAHSPresentationGUI.php.

60 : void
61 {
62 global $DIC;
63 $lng = $DIC->language();
64 $ilAccess = $DIC->access();
65 $ilNavigationHistory = $DIC['ilNavigationHistory'];
66 $ilCtrl = $DIC->ctrl();
67 $ilLocator = $DIC['ilLocator'];
68 $ilObjDataCache = $DIC['ilObjDataCache'];
69
70 $lng->loadLanguageModule("content");
71 $obj_id = ilObject::_lookupObjectId($this->refId);
72
73 // add entry to navigation history
74 if ($ilAccess->checkAccess("read", "", $this->refId)) {
75 $ilNavigationHistory->addItem(
76 $this->refId,
77 "ilias.php?cmd=infoScreen&baseClass=ilSAHSPresentationGUI&ref_id=" . $this->refId,
78 "lm"
79 );
80 }
81
82 $next_class = $this->ctrl->getNextClass($this);
83 $cmd = $this->ctrl->getCmd();
84
86
87 if ($cmd === "downloadCertificate") {
88 $scorm_gui = new ilSCORMPresentationGUI();
89 $ret = $this->ctrl->forwardCommand($scorm_gui);
90 }
91
92 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $this->refId, true, false);
93
94 if ($next_class !== "ilinfoscreengui" &&
95 $cmd !== "infoScreen" &&
96 $next_class !== "ilobjscorm2004learningmodulegui" &&
97 $next_class !== "ilobjscormlearningmodulegui" &&
98 $next_class !== "illearningprogressgui") {
99 switch ($type) {
100 case "scorm2004":
101 $this->ctrl->setCmdClass("ilscorm13playergui");
102 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $this->refId, true, false);
103 break;
104
105 case "scorm":
106 $this->ctrl->setCmdClass("ilscormpresentationgui");
107 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $this->refId, true, false);
108 break;
109 }
110 $next_class = $this->ctrl->getNextClass($this);
111 }
112
113 switch ($next_class) {
114 case "ilinfoscreengui":
115 $this->outputInfoScreen();
116 break;
117
118 case "ilscorm13playergui":
119 $scorm_gui = new ilSCORM13PlayerGUI();
120 $ret = $this->ctrl->forwardCommand($scorm_gui);
121 break;
122
123 case "ilscormpresentationgui":
124 $scorm_gui = new ilSCORMPresentationGUI();
125 $ret = $this->ctrl->forwardCommand($scorm_gui);
126 break;
127
128 case "illearningprogressgui":
129 $this->setInfoTabs("learning_progress");
131 $this->ctrl->forwardCommand($new_gui);
132 $this->tpl->printToStdout();
133 break;
134
135 case "ilobjscorm2004learningmodulegui":
136 $new_gui = new ilObjSCORM2004LearningModuleGUI([], $this->refId, true, false);
137 $this->ctrl->forwardCommand($new_gui);
138 $this->setInfoTabs("cont_tracking_data");
139 $this->tpl->printToStdout();
140 break;
141
142 case "ilobjscormlearningmodulegui":
143 $new_gui = new ilObjSCORMLearningModuleGUI("", $this->refId, true, false);
144 $this->ctrl->forwardCommand($new_gui);
145 $this->setInfoTabs("cont_tracking_data");
146 $this->tpl->printToStdout();
147 break;
148
149 default:
150 $this->$cmd();
151 }
152 }
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupSubType(int $a_obj_id)
lookup subtype id (scorm, )
Class ilObjSCORMLearningModuleGUI.
static _lookupObjectId(int $ref_id)
@noinspection ForgottenDebugOutputInspection
Class ilSCORMPresentationGUI.
$type

References $DIC, $lng, $type, ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ILIAS\Repository\ctrl(), ilLanguage\loadLanguageModule(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, outputInfoScreen(), and setInfoTabs().

+ Here is the call graph for this function:

◆ infoScreen()

ilSAHSPresentationGUI::infoScreen ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Exceptions
ilCtrlException

Definition at line 173 of file class.ilSAHSPresentationGUI.php.

173 : void
174 {
175 $this->ctrl->setCmd("showSummary");
176 $this->ctrl->setCmdClass("ilinfoscreengui");
177 $this->outputInfoScreen();
178 }

References ILIAS\Repository\ctrl(), and outputInfoScreen().

+ Here is the call graph for this function:

◆ outputInfoScreen()

ilSAHSPresentationGUI::outputInfoScreen ( )

info screen

Exceptions
ilCtrlException

Definition at line 246 of file class.ilSAHSPresentationGUI.php.

246 : void
247 {
248 global $DIC;
249 $ilAccess = $DIC->access();
250 $refId = $this->refId;//$this->slm_gui->object->getRefId();
251
252 //$this->tpl->setHeaderPageTitle("PAGETITLE", " - ".$this->lm->getTitle());
253
254 // set style sheets
255 // $this->tpl->setStyleSheetLocation(ilUtil::getStyleSheetLocation());
256
257 $this->setInfoTabs("info_short");
258
259 $this->lng->loadLanguageModule("meta");
260
261 $info = new ilInfoScreenGUI($this->slm_gui);
262 $info->enablePrivateNotes();
263 //$info->enableLearningProgress();
264
265 $info->enableNews();
266 if ($ilAccess->checkAccess("write", "", $refId)) {
267 $info->enableNewsEditing();
268 $news_set = new ilSetting("news");
269 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
270 if ($enable_internal_rss) {
271 $info->setBlockProperty("news", "settings", "");
272 }
273 }
274
275 // add read / back button
276 if ($ilAccess->checkAccess("read", "", $refId)) {
277 $ilToolbar = $GLOBALS['DIC']->toolbar();
278 $ilToolbar->addButtonInstance($this->slm_gui->getObject()->getViewButton());
279 }
280
281 // show standard meta data section
282 $info->addMetaDataSections(
283 $this->slm_gui->getObject()->getId(),
284 0,
285 $this->slm_gui->getObject()->getType()
286 );
287
288 // forward the command
289 $this->ctrl->forwardCommand($info);
290 $this->tpl->printToStdout();
291 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Class ilInfoScreenGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $DIC, $GLOBALS, $refId, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and setInfoTabs().

Referenced by executeCommand(), and infoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setInfoTabs()

ilSAHSPresentationGUI::setInfoTabs ( string  $a_active)
Exceptions
ilCtrlException

Definition at line 183 of file class.ilSAHSPresentationGUI.php.

183 : void
184 {
185 global $DIC;
186
188
189 if (
190 !$DIC->access()->checkAccess('visible', '', $refId) &&
191 !$DIC->access()->checkAccess('read', '', $refId)
192 ) {
193 $DIC['ilErr']->raiseError($this->lng->txt('msg_no_perm_read'), $DIC['ilErr']->MESSAGE); //todo
194 }
196 $DIC->tabs()->addTab(
197 "info_short",
198 $this->lng->txt("info_short"),
199 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
200 );
201
202 $DIC->tabs()->addTab(
203 "learning_progress",
204 $this->lng->txt("learning_progress"),
205 $this->ctrl->getLinkTargetByClass('illearningprogressgui', '')
206 );
207 }
208 if ($DIC->access()->checkAccess("edit_learning_progress", "", $refId) || $DIC->access()->checkAccess("read_learning_progress", "", $refId)) {
210 if ($privacy->enabledSahsProtocolData()) {
213 if ($type === "scorm2004") {
214 $DIC->tabs()->addTab(
215 "cont_tracking_data",
216 $this->lng->txt("cont_tracking_data"),
217 $this->ctrl->getLinkTargetByClass('ilobjscorm2004learningmodulegui', 'showTrackingItems')
218 );
219 } elseif ($type === "scorm") {
220 $DIC->tabs()->addTab(
221 "cont_tracking_data",
222 $this->lng->txt("cont_tracking_data"),
223 $this->ctrl->getLinkTargetByClass('ilobjscormlearningmodulegui', 'showTrackingItems')
224 );
225 }
226 }
227 }
228 $DIC->tabs()->activateTab($a_active);
229 $this->tpl->loadStandardTemplate();
230 $this->tpl->setTitle($this->slm_gui->getObject()->getTitle());
231 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
232 $DIC['ilLocator']->addRepositoryItems();
233 $DIC['ilLocator']->addItem(
234 $this->slm_gui->getObject()->getTitle(),
235 $this->ctrl->getLinkTarget($this, "infoScreen"),
236 "",
237 $refId
238 );
239 $this->tpl->setLocator();
240 }
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References $DIC, $refId, $type, ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilLearningProgressAccess\checkAccess(), ilUtil\getImagePath(), ilPrivacySettings\getInstance(), and ILIAS\Repository\lng().

Referenced by executeCommand(), and outputInfoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ilSAHSPresentationGUI::view ( )

Definition at line 155 of file class.ilSAHSPresentationGUI.php.

155 : void
156 {
157 $sc_gui_object = ilSCORMObjectGUI::getInstance($this->refId);
158
159 if (is_object($sc_gui_object)) {
160 $sc_gui_object->view();
161 }
162
163 $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
164 $this->tpl->printToStdout();
165 }
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user

References ilSCORMObjectGUI\getInstance(), and ilUtil\getStyleSheetLocation().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilSAHSPresentationGUI::$ctrl
protected

Definition at line 40 of file class.ilSAHSPresentationGUI.php.

◆ $lng

ilLanguage ilSAHSPresentationGUI::$lng
protected

Definition at line 39 of file class.ilSAHSPresentationGUI.php.

Referenced by executeCommand().

◆ $refId

int ilSAHSPresentationGUI::$refId
protected

Definition at line 42 of file class.ilSAHSPresentationGUI.php.

Referenced by outputInfoScreen(), and setInfoTabs().

◆ $slm_gui

ilObjSCORMLearningModuleGUI ilSAHSPresentationGUI::$slm_gui
protected

Definition at line 41 of file class.ilSAHSPresentationGUI.php.

◆ $tpl

ilGlobalPageTemplate ilSAHSPresentationGUI::$tpl
protected

Definition at line 38 of file class.ilSAHSPresentationGUI.php.


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