From 2b937e35d6551e83c834fc0bf8fa63d8a6738520 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 15 Aug 2019 08:29:59 +0800 Subject: [PATCH] MDL-66378 gradereport_singleview: Add missing label for dropdown --- .../report/singleview/classes/local/ui/dropdown_attribute.php | 3 ++- grade/report/singleview/templates/dropdown_attribute.mustache | 1 + grade/report/singleview/tests/behat/singleview.feature | 2 +- .../gradereport_singleview/dropdown_attribute.mustache | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/grade/report/singleview/classes/local/ui/dropdown_attribute.php b/grade/report/singleview/classes/local/ui/dropdown_attribute.php index 50f1ce99667..06b37e1aa67 100644 --- a/grade/report/singleview/classes/local/ui/dropdown_attribute.php +++ b/grade/report/singleview/classes/local/ui/dropdown_attribute.php @@ -93,7 +93,8 @@ class dropdown_attribute extends element { 'value' => $option, 'selected' => $selected == $option ]; - }, array_keys($options)) + }, array_keys($options)), + 'label' => get_string('gradefor', 'gradereport_singleview', $this->label), ); return $OUTPUT->render_from_template('gradereport_singleview/dropdown_attribute', $context); diff --git a/grade/report/singleview/templates/dropdown_attribute.mustache b/grade/report/singleview/templates/dropdown_attribute.mustache index e6388ca809e..adecdd8891f 100644 --- a/grade/report/singleview/templates/dropdown_attribute.mustache +++ b/grade/report/singleview/templates/dropdown_attribute.mustache @@ -17,6 +17,7 @@ {{! Dropdown attribute. }} + {{#options}}