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

This commit is contained in:
Andrew Nicols 2023-02-08 13:29:32 +08:00
parent 43575489e9
commit d20b272df7
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14
4 changed files with 17 additions and 17 deletions

View File

@ -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

View File

@ -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);
}

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);
}