MDL-77174 mod_quiz: Remove usage of moodle-core-nofification-alert

This commit is contained in:
Andrew Nicols
2023-07-31 10:56:21 +08:00
parent 43575489e9
commit d20b272df7
4 changed files with 17 additions and 17 deletions
@@ -484,12 +484,12 @@ Y.extend(RESOURCETOOLBOX, TOOLBOX, {
var problemsection = this.find_sections_that_would_become_empty();
if (typeof problemsection !== 'undefined') {
var alert = new M.core.alert({
title: M.util.get_string('cannotremoveslots', 'quiz'),
message: M.util.get_string('cannotremoveallsectionslots', 'quiz', problemsection)
require(['core/notification'], function(Notification) {
Notification.alert(
M.util.get_string('cannotremoveslots', 'quiz'),
M.util.get_string('cannotremoveallsectionslots', 'quiz', problemsection)
);
});
alert.show();
} else {
this.delete_multiple_with_confirmation(ev);
}
File diff suppressed because one or more lines are too long
@@ -484,12 +484,12 @@ Y.extend(RESOURCETOOLBOX, TOOLBOX, {
var problemsection = this.find_sections_that_would_become_empty();
if (typeof problemsection !== 'undefined') {
var alert = new M.core.alert({
title: M.util.get_string('cannotremoveslots', 'quiz'),
message: M.util.get_string('cannotremoveallsectionslots', 'quiz', problemsection)
require(['core/notification'], function(Notification) {
Notification.alert(
M.util.get_string('cannotremoveslots', 'quiz'),
M.util.get_string('cannotremoveallsectionslots', 'quiz', problemsection)
);
});
alert.show();
} else {
this.delete_multiple_with_confirmation(ev);
}
+5 -5
View File
@@ -251,12 +251,12 @@ Y.extend(RESOURCETOOLBOX, TOOLBOX, {
var problemsection = this.find_sections_that_would_become_empty();
if (typeof problemsection !== 'undefined') {
var alert = new M.core.alert({
title: M.util.get_string('cannotremoveslots', 'quiz'),
message: M.util.get_string('cannotremoveallsectionslots', 'quiz', problemsection)
require(['core/notification'], function(Notification) {
Notification.alert(
M.util.get_string('cannotremoveslots', 'quiz'),
M.util.get_string('cannotremoveallsectionslots', 'quiz', problemsection)
);
});
alert.show();
} else {
this.delete_multiple_with_confirmation(ev);
}