-
Bug
-
Resolution: Fixed
-
Blocker
-
4.3
-
MOODLE_403_STABLE
-
MOODLE_403_STABLE
-
MDL-79384-master -
This is a regression caused by MDL-78324, where these were changed, but not tested.
To replicate in LTI:
- Go to "Site admin > Plugins > Activities > External tool > Manage tools"
- Enter 'https://robotest.theedtech.dev/register' into the "Tool URL..." input and press "Add LTI Advantage"
- Proceed to add the tool so that you end up back on the "Manage tools" page
- Click the "Tool configuration details" icon inside the tool card
Expected: It works and you see a modal containing all the platform endpoints etc, which buttons to cancel and email
Actual: Nothing happens
There seem to be a few issues here:
- The code passes the wrong number of args to Modal.create(). It takes 1, not 2. - the same problem is in analytics code.
- There is no click handler to actually create this modal (which used to be done via the trigger param, which no longer exists)
- Fixing the above 2 reveals there is a problem with the way the footer is being set, when passed in as a promise, specifically when the modal is set to display immediately. We didn't see this before, perhaps because the modal was created a different way in the LTI code. Essentially, in modal.configure(), setFooter() is called before show(), as in this code:
https://github.com/moodle/moodle/blob/a54ba682a4b73af116b0e01e56568d02ff1d590f/lib/amd/src/modal.js#L259-L266
but the footer promise can resolve after show() is called. Importantly, the logic controlling the visibility of the footer lives inside show() and will have already run at this point. This results in the modal hiding the footer since it thinks it's empty, then the promise resolves and the footer html is set, but it's too late as the show/hide footer logic has already run.
- Discovered while testing
-
MDLQA-18395 CLONE - An administrator can manually create a tool-platform registration needed to share activities using LTI
-
- Passed
-
- is a regression caused by
-
MDL-78324 Move modal factory instantiation to modal::create
-
- Closed
-