ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSAHSPresentationGUI Class Reference

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

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: shib_login.php:26

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 !== "ilscorm13playergui" &&
99 $next_class !== "ilscormpresentationgui" &&
100 $next_class !== "illearningprogressgui") {
101 switch ($type) {
102 case "scorm2004":
103
104 $this->ctrl->saveParameterByClass(ilSCORM13PlayerGUI::class, "ref_id");
105 $this->ctrl->redirectByClass(ilSCORM13PlayerGUI::class, $this->ctrl->getCmd());
106
107 # AXH: Verwendung unklar!
108 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $this->refId, true, false);
109 break;
110
111 case "scorm":
112
113 $this->ctrl->saveParameterByClass(ilSCORMPresentationGUI::class, "ref_id");
114 $this->ctrl->redirectByClass(ilSCORMPresentationGUI::class, $this->ctrl->getCmd());
115
116 # AXH: Verwendung unklar!
117 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $this->refId, true, false);
118 break;
119 }
120 # AXH: Verwendung unklar!
121 $next_class = $this->ctrl->getNextClass($this);
122 }
123
124 switch ($next_class) {
125 case "ilinfoscreengui":
126 $this->outputInfoScreen();
127 break;
128
129 case "ilscorm13playergui":
130 $scorm_gui = new ilSCORM13PlayerGUI();
131 $ret = $this->ctrl->forwardCommand($scorm_gui);
132 break;
133
134 case "ilscormpresentationgui":
135 $scorm_gui = new ilSCORMPresentationGUI();
136 $ret = $this->ctrl->forwardCommand($scorm_gui);
137 break;
138
139 case "illearningprogressgui":
140 $this->setInfoTabs("learning_progress");
142 $this->ctrl->forwardCommand($new_gui);
143 $this->tpl->printToStdout();
144 break;
145
146 case "ilobjscorm2004learningmodulegui":
147 $new_gui = new ilObjSCORM2004LearningModuleGUI([], $this->refId, true, false);
148 $this->ctrl->forwardCommand($new_gui);
149 $this->setInfoTabs("cont_tracking_data");
150 $this->tpl->printToStdout();
151 break;
152
153 case "ilobjscormlearningmodulegui":
154 $new_gui = new ilObjSCORMLearningModuleGUI("", $this->refId, true, false);
155 $this->ctrl->forwardCommand($new_gui);
156 $this->setInfoTabs("cont_tracking_data");
157 $this->tpl->printToStdout();
158 break;
159
160 default:
161 $this->$cmd();
162 }
163 }
loadLanguageModule(string $a_module)
Load language module.
Class ilObjUserTrackingGUI.
static _lookupSubType(int $a_obj_id)
lookup subtype id (scorm, )
Class ilObjSCORMLearningModuleGUI.
static _lookupObjectId(int $ref_id)
Class ilSCORMPresentationGUI.

References $DIC, $lng, 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 184 of file class.ilSAHSPresentationGUI.php.

184 : void
185 {
186 if (strtolower($this->ctrl->getCmd() ?? '') === 'infoscreen') {
187 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, 'showSummary');
188 }
189
190 $this->outputInfoScreen();
191 }

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

+ Here is the call graph for this function:

◆ outputInfoScreen()

ilSAHSPresentationGUI::outputInfoScreen ( )

info screen

Exceptions
ilCtrlException

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

259 : void
260 {
261 global $DIC;
262 $ilAccess = $DIC->access();
264
265 $this->setInfoTabs("info_short");
266
267 $this->lng->loadLanguageModule("meta");
268
269 $info = new ilInfoScreenGUI($this->slm_gui);
270 $info->enablePrivateNotes();
271
272 $info->enableNews();
273 if ($ilAccess->checkAccess("write", "", $refId)) {
274 $info->enableNewsEditing();
275 $news_set = new ilSetting("news");
276 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
277 if ($enable_internal_rss) {
278 $info->setBlockProperty("news", "settings", "");
279 }
280 }
281
282 // add read / back button
283 if ($ilAccess->checkAccess("read", "", $refId)) {
284 $ilToolbar = $GLOBALS['DIC']->toolbar();
285 $ilToolbar->addButtonInstance($this->slm_gui->getObject()->getViewButton());
286 }
287
288 // show standard meta data section
289 $info->addMetaDataSections(
290 $this->slm_gui->getObject()->getId(),
291 0,
292 $this->slm_gui->getObject()->getType()
293 );
294
295 $this->ctrl->forwardCommand($info);
296 $this->tpl->printToStdout();
297 }
Class ilInfoScreenGUI.
ILIAS Setting Class.
$info
Definition: entry_point.php:21
$GLOBALS["DIC"]
Definition: wac.php:54

References $DIC, $GLOBALS, $info, $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 196 of file class.ilSAHSPresentationGUI.php.

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

References $DIC, $refId, 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 166 of file class.ilSAHSPresentationGUI.php.

166 : void
167 {
168 $sc_gui_object = ilSCORMObjectGUI::getInstance($this->refId);
169
170 if (is_object($sc_gui_object)) {
171 $sc_gui_object->view();
172 }
173
174 $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
175 $this->tpl->printToStdout();
176 }
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
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: