19 declare(strict_types=1);
35 $this->
ctrl = $DIC->ctrl();
37 $this->
lng = $DIC->language();
38 $this->
tabs = $DIC->tabs();
39 $this->main_tpl = $DIC->ui()->mainTemplate();
51 $cmd = $ctrl->
getCmd(
'show');
54 switch ($next_class) {
55 case strtolower(ilLearningHistoryGUI::class):
56 $main_tpl->
setTitle($lng->
txt(
'lhist_learning_history'));
60 $this->main_tpl->printToStdout();
63 case strtolower(ilLPPersonalGUI::class):
65 $main_tpl->
setTitle($lng->
txt(
"personal_learning_progress_view_title"));
67 $main_tpl->
setDescription($lng->
txt(
"personal_learning_progress_view_description"));
70 $this->main_tpl->printToStdout();
73 case strtolower(ilPersonalSkillsGUI::class):
78 $this->main_tpl->printToStdout();
81 case strtolower(ilBadgeProfileGUI::class):
86 $this->main_tpl->printToStdout();
89 case strtolower(ilUserCertificateGUI::class):
94 $this->main_tpl->printToStdout();
101 $this->main_tpl->printToStdout();
106 protected function show(): void
111 $first_service = current($this->achievements->getActiveServices());
112 if ($first_service) {
113 $ctrl->
redirectByClass([ilDashboardGUI::class, ilAchievementsGUI::class, $gui_classes[$first_service]]);
117 protected function setTabs(
string $activate): void
122 foreach ($this->achievements->getActiveServices() as $s) {
123 $tabs->
addTab(
'achieve_' . $s, $links[$s][
'txt'], $links[$s][
'link']);
141 'txt' => $lng->
txt(
'lhist_learning_history')
144 'txt' => $lng->
txt(
'skills')
147 'txt' => $lng->
txt(
'learning_progress')
150 'txt' => $lng->
txt(
'obj_bdga')
153 'txt' => $lng->
txt(
'obj_cert')
157 foreach ($links as $k => $v) {
158 $links[$k][
'link'] = $ctrl->
getLinkTargetByClass([ilDashboardGUI::class, ilAchievementsGUI::class, $gui_classes[$k]]);
ilUserCertificateGUI: ilAchievementsGUI
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getCmd(?string $fallback_command=null)
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
loadLanguageModule(string $a_module)
Load language module.
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
forwardCommand(object $a_gui_object)
Personal skills GUI class.
ilGlobalTemplateInterface $main_tpl
getNextClass($a_gui_class=null)
setTabs(string $activate)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
const SERV_LEARNING_HISTORY
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
const SERV_LEARNING_PROGRESS
activateTab(string $a_id)
setDescription(string $a_descr)
Sets description below title in standard template.
ilAchievements $achievements
addTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
Add a Tab.
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)