Merge branch 'MDL-78673-400-fix' of https://github.com/sarjona/moodle into MOODLE_400_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2023-07-12 19:03:31 +02:00
+3 -1
View File
@@ -58,7 +58,9 @@ class behat_grades extends behat_base {
);
// This plugin is not in the list of plugins. Check the pluginname string.
$names = array_map(fn($name) => strtolower(get_string('pluginname', "gradereport_{$name}")), $plugins);
$names = array_map(function($name) {
return strtolower(get_string('pluginname', "gradereport_{$name}"));
}, $plugins);
$result = array_search($pluginname, $names);
if ($result === false) {
throw new \coding_exception("Unknown plugin '{$pluginname}'");