From f88a774a5cdfc4de809c82d8f9ed2a98d6ed1f11 Mon Sep 17 00:00:00 2001 From: Laurent David Date: Tue, 16 Apr 2024 14:22:03 +0200 Subject: [PATCH] MDL-81564 mod_data: Remove duplicate error messages * When a field is missing the error is duplicated for all field subsequently added to the database --- mod/data/field.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/data/field.php b/mod/data/field.php index 171e4aa055b..d8c66abc2f1 100644 --- a/mod/data/field.php +++ b/mod/data/field.php @@ -417,9 +417,9 @@ if (($mode == 'new') && (!empty($newtype))) { // Adding a new field. $OUTPUT->render_from_template('core/action_menu', $actionmenutemplate) ]; - if (!empty($missingfieldtypes)) { - echo $OUTPUT->notification(get_string('missingfieldtypes', 'data') . html_writer::alist($missingfieldtypes)); - } + } + if (!empty($missingfieldtypes)) { + echo $OUTPUT->notification(get_string('missingfieldtypes', 'data') . html_writer::alist($missingfieldtypes)); } echo html_writer::table($table);