diff --git a/grade/report/singleview/renderer.php b/grade/report/singleview/renderer.php index 70b7998e1cc..8663e2b7106 100644 --- a/grade/report/singleview/renderer.php +++ b/grade/report/singleview/renderer.php @@ -61,7 +61,7 @@ class gradereport_singleview_renderer extends plugin_renderer_base { } $this->page->requires->js_call_amd('gradereport_singleview/user', 'init'); - return $this->render_from_template('gradereport_singleview/user_selector', $data); + return $this->render_from_template('core_grades/user_selector', $data); } /** diff --git a/grade/report/singleview/templates/user_selector.mustache b/grade/report/singleview/templates/user_selector.mustache deleted file mode 100644 index c3dfb9471e5..00000000000 --- a/grade/report/singleview/templates/user_selector.mustache +++ /dev/null @@ -1,76 +0,0 @@ -{{! - This file is part of Moodle - http://moodle.org/ - - Moodle is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Moodle is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Moodle. If not, see . -}} -{{! - @template gradereport_singleview/user_selector - - The user selector trigger element. - - Context variables required for this template: - * courseid - The course ID. - * groupid - The group ID. - * selectedoption - (optional) Object containing information about the selected option. - * image - The image corresponding to the selected option. - * text - The text of the selected option. - * additionaltext - (optional) Additional text displayed below the selected option (e.g. the user email) - - Example context (json): - { - "courseid": "2", - "groupid": "2", - "selectedoption": { - "image": "\"\"", - "text": "John Doe", - "additionaltext": "johndoe@example.com" - } - } -}} - diff --git a/grade/report/user/renderer.php b/grade/report/user/renderer.php index cb009288639..c8d82de2dc6 100644 --- a/grade/report/user/renderer.php +++ b/grade/report/user/renderer.php @@ -127,7 +127,7 @@ class gradereport_user_renderer extends plugin_renderer_base { } $this->page->requires->js_call_amd('gradereport_user/user', 'init'); - return $this->render_from_template('gradereport_user/user_selector', $data); + return $this->render_from_template('core_grades/user_selector', $data); } /** diff --git a/grade/report/user/templates/user_selector.mustache b/grade/templates/user_selector.mustache similarity index 98% rename from grade/report/user/templates/user_selector.mustache rename to grade/templates/user_selector.mustache index 2616f27f96b..b77d2f5e24a 100644 --- a/grade/report/user/templates/user_selector.mustache +++ b/grade/templates/user_selector.mustache @@ -15,7 +15,7 @@ along with Moodle. If not, see . }} {{! - @template gradereport_user/user_selector + @template core_grades/user_selector The user selector trigger element.