MDL-60579 user: Move defines into library

Entry page user/index.php was defining constants that were used by the renderer.
This means the renderer was tied to user/index.php.
This commit is contained in:
Damyon Wiese 2017-11-09 11:02:14 +08:00
parent 7cf4331a6f
commit bb869f05e8
2 changed files with 7 additions and 6 deletions

View File

@ -32,12 +32,6 @@ require_once($CFG->dirroot.'/enrol/locallib.php');
define('DEFAULT_PAGE_SIZE', 20);
define('SHOW_ALL_PAGE_SIZE', 5000);
define('USER_FILTER_ENROLMENT', 1);
define('USER_FILTER_GROUP', 2);
define('USER_FILTER_LAST_ACCESS', 3);
define('USER_FILTER_ROLE', 4);
define('USER_FILTER_STATUS', 5);
define('USER_FILTER_STRING', 6);
$page = optional_param('page', 0, PARAM_INT); // Which page to show.
$perpage = optional_param('perpage', DEFAULT_PAGE_SIZE, PARAM_INT); // How many per page.

View File

@ -22,6 +22,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('USER_FILTER_ENROLMENT', 1);
define('USER_FILTER_GROUP', 2);
define('USER_FILTER_LAST_ACCESS', 3);
define('USER_FILTER_ROLE', 4);
define('USER_FILTER_STATUS', 5);
define('USER_FILTER_STRING', 6);
/**
* Creates a user
*