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
This commit is contained in:
Laurent David 2024-04-16 14:22:03 +02:00 committed by Huong Nguyen
parent 7b9a4eeca5
commit 029db9dd4c
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A

View File

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