From 40287f73a63fb13d2e6e717416736530d9e2468d Mon Sep 17 00:00:00 2001 From: Michael Milette Date: Fri, 6 Sep 2024 22:45:40 -0400 Subject: [PATCH] External LTI only available in Moodle 4.3+. --- classes/text_filter.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/text_filter.php b/classes/text_filter.php index 6e20c71..cee4f56 100644 --- a/classes/text_filter.php +++ b/classes/text_filter.php @@ -942,7 +942,10 @@ private function generatortags(&$text) { $menu .= '-{getstring:filter_filtercodes}unenrolme{/getstring}|{courseunenrolurl}' . PHP_EOL; } if ($this->hasminarchetype('editingteacher')) { - $menu .= '-{getstring:mod_lti}courseexternaltools{/getstring}|/mod/lti/coursetools.php?id={courseid}' . PHP_EOL; + if ($CFG->branch >= 403) { + $menu .= '-{getstring:mod_lti}courseexternaltools{/getstring}|/mod/lti/coursetools.php?id={courseid}' + . PHP_EOL; + } if ($CFG->branch >= 311) { $pluginame = '{getstring:tool_brickfield}pluginname{/getstring}'; $menu .= '-' . $pluginame . '|/admin/tool/brickfield/index.php?courseid={courseid}' . PHP_EOL;