mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-49187 mod_lti: Fix tool config lookup
Changed code to look for a tool ID before then matching on the URL.
This commit is contained in:
parent
dba564c7db
commit
64ca282207
1 changed files with 3 additions and 2 deletions
|
@ -65,8 +65,9 @@ if ($l) { // Two ways to specify the module.
|
||||||
|
|
||||||
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
|
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
|
||||||
|
|
||||||
$tool = lti_get_tool_by_url_match($lti->toolurl);
|
if (!empty($lti->typeid)) {
|
||||||
if ($tool) {
|
$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);
|
$toolconfig = lti_get_type_config($tool->id);
|
||||||
} else {
|
} else {
|
||||||
$toolconfig = array();
|
$toolconfig = array();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue