From e37cdf881ebfb5795a1af4f5df31e0d74d0e7a86 Mon Sep 17 00:00:00 2001 From: Mark Johnson Date: Thu, 9 Jul 2020 10:11:17 +0100 Subject: [PATCH] MDL-67671 backup: Fix modname display on backup form --- backup/util/ui/base_moodleform.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backup/util/ui/base_moodleform.class.php b/backup/util/ui/base_moodleform.class.php index 520825890e2..b37aff296c6 100644 --- a/backup/util/ui/base_moodleform.class.php +++ b/backup/util/ui/base_moodleform.class.php @@ -402,7 +402,8 @@ abstract class base_moodleform extends moodleform { // Get list of module types on course. $modinfo = get_fast_modinfo($COURSE); - $modnames = $modinfo->get_used_module_names(true); + $modnames = array_map('strval', $modinfo->get_used_module_names(true)); + core_collator::asort($modnames); $PAGE->requires->yui_module('moodle-backup-backupselectall', 'M.core_backup.backupselectall', array($modnames)); $PAGE->requires->strings_for_js(array('select', 'all', 'none'), 'moodle');