Skip to content

Commit

Permalink
Bug fix: nested user-interface-wrappers gave JavaScript errors when c…
Browse files Browse the repository at this point in the history
…trl-alt-M was used to disable then restart all UIs.
  • Loading branch information
trampgeek committed Jul 4, 2024
1 parent 75c9711 commit 155aa78
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion amd/build/userinterfacewrapper.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/userinterfacewrapper.min.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion amd/src/userinterfacewrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,13 @@ define(['jquery', 'core/templates', 'core/notification'], function($, Templates,
if (t.uiInstance !== null || t.loadFailed) {
t.stop();
} else {
t.restart(); // Reactivate
// If the wrapper still exists (which won't be the case for
// userinterfacewrappers embedded within another userinterface wrapper)
// restart the UI within the wrapper.
const wrapper = document.getElementById(`${t.taId}_wrapper`);
if (wrapper) {
t.restart(); // Reactivate
}
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024031500;
$plugin->version = 2024070500;
$plugin->requires = 2022041900;
$plugin->cron = 0;
$plugin->component = 'qtype_coderunner';
Expand Down

0 comments on commit 155aa78

Please sign in to comment.