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) {