3 declare(strict_types=1);
39 $this->tpl = $DIC[
'tpl'];
40 $this->rbacsystem = $DIC[
'rbacsystem'];
41 $this->setting = $DIC[
'ilSetting'];
42 $this->
access = $DIC[
'ilAccess'];
43 $this->request_wrapper = $DIC->http()->wrapper()->query();
46 $ui_factory = $DIC[
'ui.factory'];
47 $ui_renderer = $DIC[
'ui.renderer'];
48 $this->alert_icon = $ui_renderer->render(
49 $ui_factory->symbol()->icon()
70 return parent::getHTML();
75 parent::fillTemplate($tpl);
78 $tpl->
setVariable(
"ACTIVE_HEAD",
"il_PrgAccordionHeadActive");
105 $tpl->
setVariable(
"ACCORDION_HIDE_CONTENT",
"ilAccHideContent");
108 $this->tpl->addOnloadCode(
"il.Accordion.add(" . json_encode($this->
getAccordionOptions(), JSON_THROW_ON_ERROR) .
");");
116 if (!$programme->hasLPChildren()) {
127 $child_progresses = $this->progress->getSubnodes();
135 return $gui->getHTML();
136 }, $child_progresses));
144 $can_read = $this->
access->checkAccess(
"read",
"", $prg->getRefId(),
"prg", $prg->getId());
166 foreach ($prg->getLPChildren() as $il_obj_crs_ref) {
174 $preloader->addItem($course->getId(), $course->getType(), $course->getRefId());
177 $preloader->preload();
179 return implode(
"\n", array_map(
function (
ilObjCourse $course) {
183 return $item_gui->getListItemHTML(
216 "orientation" =>
"horizontal",
218 "int_id" =>
"prg_progress_" . $this->progress->getId(),
219 "initial_opened" => null,
220 "behaviour" =>
"AllClosed",
221 "toggle_class" =>
'il_PrgAccordionToggle',
222 "toggle_act_class" =>
'foo',
223 "content_class" =>
'il_PrgAccordionContent',
225 "active_head_class" =>
"il_PrgAccordionHeadActive",
229 "show_all_element" => null,
230 "hide_all_element" => null,
231 "reset_width" =>
true,
237 return "prg_progress_" . $this->progress->getId() .
"_" . $this->
getIndent();
257 $prg_progress_id = $this->request_wrapper->retrieve(
"prg_progress_id", $this->
refinery->kindlyTo()->int());
258 return $prg_progress_id === $this->progress->getId();
266 if ($this->js_added) {
271 $this->tpl->addJavaScript(
"./Services/Accordion/js/accordion.js",
true, 3);
272 $this->js_added =
true;
280 if ($this->css_added) {
284 $this->tpl->addCSS(
"Modules/StudyProgramme/templates/css/ilStudyProgramme.css");
285 $this->css_added =
true;
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
getTitleAndIconTarget(ilPRGProgress $progress)
enableCommands(bool $status, bool $std_only=false)
configureItemGUI(ilStudyProgrammeCourseListGUI $item_gui)
shouldShowSubProgress(ilPRGProgress $progress)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
enableDelete(bool $status)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS HTTP Wrapper RequestWrapper $request_wrapper
enableSubscribe(bool $status)
enableInfoScreen(bool $info_screen)
enablePreconditions(bool $status)
enableProperties(bool $status)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:u...
touchBlock(string $block)
enableNoticeProperties(bool $status)
const SETTING_VISIBLE_ON_PD_READ
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
setVariable($variable, $value='')
Sets a variable value.
enableComments(bool $value, bool $enable_comments_settings=true)
const CONTEXT_PERSONAL_DESKTOP
fillTemplate(ilTemplate $tpl)
__construct(ilPRGProgress $progress)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
enableProgressInfo(bool $status)
static initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
newSubItem(ilPRGProgress $progress)
ILIAS Refinery Factory $refinery
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByObjId(int $obj_id)
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
getAccordionContentHTML()
__construct(Container $dic, ilPlugin $plugin)
enableCheckbox(bool $status)
getAccordionContentProgressesHTML()
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...
enableDescription(bool $status)
static _lookupDeletedDate(int $ref_id)
getAccordionContentCoursesHTML()