diff --git a/lib/table/tests/external/dynamic/fetch_test.php b/lib/table/tests/external/dynamic/fetch_test.php index 123b0eceb4e..3d1435f5037 100644 --- a/lib/table/tests/external/dynamic/fetch_test.php +++ b/lib/table/tests/external/dynamic/fetch_test.php @@ -81,7 +81,7 @@ class fetch_test extends advanced_testcase { $this->expectExceptionMessage("Invalid parameter value detected (filters => Invalid parameter value detected " . "(Missing required key in single structure: name): Missing required key in single structure: name"); - fetch::execute("core_user\participants_table", + fetch::execute("\\core_user\\table\\participants", "user-index-participants-{$course->id}", "firstname", "4", $filter, (string)filter::JOINTYPE_ANY); } @@ -108,7 +108,7 @@ class fetch_test extends advanced_testcase { ] ]; - $participantstable = fetch::execute("core_user\participants_table", + $participantstable = fetch::execute("\\core_user\\table\\participants", "user-index-participants-{$course->id}", "firstname", "4", $filter, (string)filter::JOINTYPE_ANY); $html = $participantstable['html']; diff --git a/user/classes/participants_table.php b/user/classes/table/participants.php similarity index 99% rename from user/classes/participants_table.php rename to user/classes/table/participants.php index ab465983895..2f9c5ca3c82 100644 --- a/user/classes/participants_table.php +++ b/user/classes/table/participants.php @@ -21,8 +21,9 @@ * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +declare(strict_types=1); -namespace core_user; +namespace core_user\table; use DateTime; use context; @@ -45,7 +46,7 @@ require_once($CFG->dirroot . '/user/lib.php'); * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class participants_table extends \table_sql implements dynamic_table { +class participants extends \table_sql implements dynamic_table { /** * @var int $courseid The course id diff --git a/user/index.php b/user/index.php index ce1889313c6..1082bbc1783 100644 --- a/user/index.php +++ b/user/index.php @@ -33,7 +33,6 @@ require_once($CFG->dirroot.'/enrol/locallib.php'); use core_table\local\filter\filter; use core_table\local\filter\integer_filter; use core_table\local\filter\string_filter; -use core_user\participants_table; define('DEFAULT_PAGE_SIZE', 20); define('SHOW_ALL_PAGE_SIZE', 5000); @@ -276,7 +275,7 @@ if (count($keywordfilter)) { $filterset->add_filter($keywordfilter); } -$participanttable = new participants_table(participants_table::get_unique_id_from_argument($course->id)); +$participanttable = new \core_user\table\participants(\core_user\table\participants::get_unique_id_from_argument($course->id)); $participanttable->set_selectall($selectall); $participanttable->set_filterset($filterset); $participanttable->define_baseurl($baseurl);