Skip to content

Commit

Permalink
MDL-77249 mod_lti: only process custom props when not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Feb 1, 2024
1 parent 580c009 commit dcf962b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/lti/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ function content_item_to_form(object $tool, object $typeconfig, object $item) :
if (!empty($subreview->url)) {
$config->lineitemsubreviewurl = $subreview->url;
}
if (isset($subreview->custom)) {
if (!empty($subreview->custom)) {
$config->lineitemsubreviewparams = params_to_string($subreview->custom);
}
}
Expand All @@ -1512,7 +1512,7 @@ function content_item_to_form(object $tool, object $typeconfig, object $item) :
// Since 4.3, the launch container is dictated by the value set in tool configuration and isn't controllable by content items.
$config->launchcontainer = LTI_LAUNCH_CONTAINER_DEFAULT;

if (isset($item->custom)) {
if (!empty($item->custom)) {
$config->instructorcustomparameters = params_to_string($item->custom);
}

Expand Down

0 comments on commit dcf962b

Please sign in to comment.