From 37a00d0eaed074b638dd69e5be6f7f64ac94128b 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 52f5b0f4931..0b75efebf6e 100644 --- a/mod/lti/view.php +++ b/mod/lti/view.php @@ -64,8 +64,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();