Skip to content

Commit

Permalink
Course: fix init of course objective entries in list on sorting tab (…
Browse files Browse the repository at this point in the history
…39351)
  • Loading branch information
schmitz-ilias committed Apr 25, 2024
1 parent 9858e6f commit 3a09ef8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function showObjectives(bool $a_is_order = false): void
$acc->setBehaviour(\ilAccordionGUI::FIRST_OPEN);
$acc->setId("crsobjtv_" . $this->container->getId());
} else {
// $this->renderer->addCustomBlock('lobj', $lng->txt('crs_objectives'));
$this->renderer->addCustomBlock('lobj', $lng->txt('crs_objectives'));
}

$lur_data = $this->parseLOUserResults();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,19 @@ public function getObjectiveListItemHTML(
true,
"components/ILIAS/Container"
);
$this->initItem($a_ref_id, $a_obj_id, ilObject::_lookupType($a_obj_id), $a_title, $a_description);

/*
* Previously, ilObjectListGUI::initItem was called here, but changes were made
* to that method with the assumption that only repository objects would be referenced,
* breaking it here for objectives.
* Currently, we have to initialize what we need manually, and cross
* our fingers that no changes are made to e.g. ilObjectListGUI::insertDescription
* or ilObjectListGUI::insertIconsAndCheckboxes that break things again.
*/
$this->ref_id = $a_ref_id;
$this->obj_id = $a_obj_id;
$this->setTitle($a_title);
$this->setDescription($a_description);

$this->insertIconsAndCheckboxes();
$this->insertTitle();
Expand Down

0 comments on commit 3a09ef8

Please sign in to comment.