diff --git a/mod/lti/locallib.php b/mod/lti/locallib.php index 89ee9991c6c54..641284f936e05 100644 --- a/mod/lti/locallib.php +++ b/mod/lti/locallib.php @@ -103,7 +103,12 @@ function lti_get_launch_data($instance) { if ($tool) { $typeid = $tool->id; } else { - $typeid = null; + $tool = lti_get_tool_by_url_match($instance->securetoolurl, $instance->course); + if ($tool) { + $typeid = $tool->id; + } else { + $typeid = null; + } } } else { $typeid = $instance->typeid;