{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template mod_lti/registration_upgrade_choice_page.mustache This template provides the layout to display the upgrade choices available when registering a tool for which there exists at least one other tool with the same domain. Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * startregurlenc: the URL provided by the tool to start the registration, url encoded * tools: the list of tools matching the domain Example context (json): { "startregurlenc":"https%3A%2F%2Fmytool.example%2Fregister", "tools": [ { "id": 222, "name": "This is My LTI 1.1 tool", "baseurl": "https://mytool.example", "version": "LTI-1p0", "sesskey": "785t9302" } ] } }}

{{#str}}dynreg_update_text, mod_lti {{/str}}

{{#tools}} {{/tools}}
{{#str}}dynreg_update_name, mod_lti {{/str}} {{#str}}dynreg_update_url, mod_lti {{/str}} {{#str}}dynreg_update_version, mod_lti {{/str}}
{{name}} {{baseurl}} {{ltiversion}}
{{^tools}} {{#str}}dynreg_update_notools, mod_lti {{/str}} {{/tools}}
{{#js}} disableAndGo = e => { document.querySelectorAll("button").forEach(e=>e.setAttribute("disabled", true)); e.target.querySelector("span.btn-loader").style.display="inline"; let form = document.getElementById("startregform"); form.action = e.target.getAttribute("data-href"); form.submit(); }; document.querySelectorAll("button").forEach(b=>b.onclick=disableAndGo); {{/js}}