From e1db69e95770794f6ab9034d652b8c46aeaea8a3 Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Mon, 4 Aug 2014 15:51:40 +0800 Subject: [PATCH] MDL-46569 gradereport_history: Move class gradereport_history_filter_form to proper namespaced location Part of MDL-46191 --- grade/report/history/classes/filter_form.php | 8 +++++--- grade/report/history/index.php | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/grade/report/history/classes/filter_form.php b/grade/report/history/classes/filter_form.php index 52e77507ca2..f3b394a0a36 100644 --- a/grade/report/history/classes/filter_form.php +++ b/grade/report/history/classes/filter_form.php @@ -23,6 +23,8 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +namespace gradereport_history; + defined('MOODLE_INTERNAL') || die; require_once($CFG->libdir.'/formslib.php'); @@ -36,7 +38,7 @@ require_once($CFG->libdir.'/formslib.php'); * @author Adam Olley * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class gradereport_history_filter_form extends moodleform { +class filter_form extends \moodleform { /** * Definition of the Mform for filters displayed in the report. @@ -48,7 +50,7 @@ class gradereport_history_filter_form extends moodleform { $itemids = $this->_customdata['itemids']; $graders = $this->_customdata['graders']; $userbutton = $this->_customdata['userbutton']; - $names = html_writer::span('', 'selectednames'); + $names = \html_writer::span('', 'selectednames'); $mform->addElement('static', 'userselect', get_string('selectuser', 'gradereport_history'), $userbutton); $mform->addElement('static', 'selectednames', get_string('selectedusers', 'gradereport_history'), $names); @@ -89,7 +91,7 @@ class gradereport_history_filter_form extends moodleform { $mform =& $this->_form; if ($userfullnames = $mform->getElementValue('userfullnames')) { - $mform->getElement('selectednames')->setValue(html_writer::span($userfullnames, 'selectednames')); + $mform->getElement('selectednames')->setValue(\html_writer::span($userfullnames, 'selectednames')); } } diff --git a/grade/report/history/index.php b/grade/report/history/index.php index f97be104ac1..025c04a2e7c 100644 --- a/grade/report/history/index.php +++ b/grade/report/history/index.php @@ -73,7 +73,7 @@ $output = $PAGE->get_renderer('gradereport_history'); $button = grade_report_history::get_user_select_button($course->id); $params = array('course' => $course, 'itemids' => $itemids, 'graders' => $graders, 'userbutton' => null); -$mform = new gradereport_history_filter_form(null, $params); +$mform = new \gradereport_history\filter_form(null, $params); $filters = array(); if ($data = $mform->get_data()) { $filters = (array)$data; @@ -110,7 +110,7 @@ $filters['userfullnames'] = implode(',', $names); $button = grade_report_history::get_user_select_button($course->id, $names); $userbutton = $output->render($button); $params = array('course' => $course, 'itemids' => $itemids, 'graders' => $graders, 'userbutton' => $userbutton); -$mform = new gradereport_history_filter_form(null, $params); +$mform = new \gradereport_history\filter_form(null, $params); $mform->set_data($filters); if ($export) {