From 64ca282207aba3d817b22cc02b6ddce469fe7a2a Mon Sep 17 00:00:00 2001 From: spvickers Date: Tue, 3 Mar 2015 18:49:58 -0700 Subject: [PATCH] MDL-49187 mod_lti: Fix tool config lookup Changed code to look for a tool ID before then matching on the URL. --- mod/lti/view.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/lti/view.php b/mod/lti/view.php index 4d0b8c41385..bfb9b1005d2 100644 --- a/mod/lti/view.php +++ b/mod/lti/view.php @@ -65,8 +65,9 @@ if ($l) { // Two ways to specify the module. $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST); -$tool = lti_get_tool_by_url_match($lti->toolurl); -if ($tool) { +if (!empty($lti->typeid)) { + $toolconfig = lti_get_type_config($lti->typeid); +} else if ($tool = lti_get_tool_by_url_match($lti->toolurl)) { $toolconfig = lti_get_type_config($tool->id); } else { $toolconfig = array();