MDL-68341 core_user: move and rename participants_table class

This commit is contained in:
Simey Lameze
2020-04-09 07:08:44 +08:00
parent f7b84afe15
commit bc6f5f23ea
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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'];
@@ -21,8 +21,9 @@
* @copyright 2017 Mark Nelson <markn@moodle.com>
* @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 <markn@moodle.com>
* @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
+1 -2
View File
@@ -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);