19 declare(strict_types=1);
43 $this->
lng = $language;
51 $items = $this->ls_items->getItems();
52 foreach ($items as $item) {
55 $action = $this->url_builder->getHref($this->goto_command, $item->getRefId());
58 $steps[] = $this->ui_factory->listing()->workflow()->step(
60 $item->getDescription(),
63 ->withAvailability($item->getAvailability())
66 $item->getLearningProgressStatus()
71 $workflow = $this->ui_factory->listing()->workflow()->linear(
72 $this->
lng->txt(
'curriculum'),
77 $current_position = max(0, $this->ls_items->getCurrentItemPosition());
78 if ($items[$current_position]->getAvailability() === Step::AVAILABLE) {
79 $workflow = $workflow->withActive($current_position);
101 switch ($il_lp_status) {
102 case \ilLPStatus::LP_STATUS_IN_PROGRESS_NUM:
103 return Step::IN_PROGRESS;
104 case \ilLPStatus::LP_STATUS_COMPLETED_NUM:
105 return Step::SUCCESSFULLY;
106 case \ilLPStatus::LP_STATUS_FAILED_NUM:
107 return Step::UNSUCCESSFULLY;
108 case \ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM:
110 return Step::NOT_STARTED;
LSUrlBuilder $url_builder
Interface Observer Contains several chained tasks and infos about them.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ILIAS UI Factory $ui_factory
This combines calls to ProgressDB and StateDB to handle learner-items in the context of a specific LS...
__construct(ilLSLearnerItemsQueries $ls_items, ILIAS\UI\Factory $ui_factory, ilLanguage $language, string $goto_command, ?LSUrlBuilder $url_builder=null)
ilLSLearnerItemsQueries $ls_items
getLearnerCurriculum(bool $with_action=false)
translateLPStatus(int $il_lp_status)
Builds the overview (curriculum) of a LearningSequence.