Skip to content

Commit

Permalink
LearningModule: class.iLMPresentationGUI: moved addAdditionalData out…
Browse files Browse the repository at this point in the history
…side constructor
  • Loading branch information
skullbox305 authored and mbunkus committed Jan 22, 2024
1 parent 7028f5d commit f189144
Showing 1 changed file with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ public function __construct(
$DIC->globalScreen()->tool()->context()->claim()->repository();
}

/*
if (!$ilCtrl->isAsynch()) {
// moved this into the if due to #0027200
if (!$embed_mode) {
Expand All @@ -256,7 +257,7 @@ public function __construct(
}
}
$DIC->globalScreen()->tool()->context()->current()->addAdditionalData(ilLMGSToolProvider::SHOW_LINK_SLATES, true);
}
} */

if ($embed_mode) {
$ilCtrl->setParameter($this, "embed_mode", 1);
Expand All @@ -265,7 +266,7 @@ public function __construct(
"ref_id" => $this->lm->getRefId(),
"frame" => ""
];
$DIC->globalScreen()->tool()->context()->current()->addAdditionalData(\ilLMGSToolProvider::LM_QUERY_PARAMS, $params);
//$DIC->globalScreen()->tool()->context()->current()->addAdditionalData(\ilLMGSToolProvider::LM_QUERY_PARAMS, $params);
}
}

Expand Down Expand Up @@ -3124,6 +3125,21 @@ function ($additional_content) {
*/
public function getHTML($pars)
{
/** @var ILIAS\DI\Container $DIC */
global $DIC;

if (!$this->ctrl->isAsynch()) {
// moved this into the if due to #0027200
if (!$this->embed_mode) {
$DIC->globalScreen()->tool()->context()->current()->addAdditionalData(ilLMGSToolProvider::SHOW_TOC_TOOL, true);
}
$DIC->globalScreen()->tool()->context()->current()->addAdditionalData(ilLMGSToolProvider::SHOW_LINK_SLATES, true);
}

if ($this->embed_mode) {
$DIC->globalScreen()->tool()->context()->current()->addAdditionalData(\ilLMGSToolProvider::LM_QUERY_PARAMS, $params);
}

$this->addResourceFiles();
switch ($pars["cmd"]) {
case "layout":
Expand Down

0 comments on commit f189144

Please sign in to comment.