mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-68612 user: Unified filter deprecations - renderer and renderable
This commit is contained in:
parent
2396e3156f
commit
03cb6064ea
3 changed files with 22 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
/**
|
||||
* Class containing the filter options data for rendering the unified filter autocomplete element for the course participants page.
|
||||
*
|
||||
* @deprecated since Moodle 3.9 MDL-68612 - Please use \core_user\table\participants_search::class and table filtersets instead.
|
||||
* @package core_user
|
||||
* @copyright 2017 Jun Pataleta
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
|
@ -34,8 +35,10 @@ defined('MOODLE_INTERNAL') || die();
|
|||
/**
|
||||
* Class containing the filter options data for rendering the unified filter autocomplete element for the course participants page.
|
||||
*
|
||||
* @deprecated since Moodle 3.9 MDL-68612 - Please use \core_user\table\participants_search::class and table filtersets instead.
|
||||
* @copyright 2017 Jun Pataleta
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*
|
||||
*/
|
||||
class unified_filter implements renderable, templatable {
|
||||
|
||||
|
@ -56,6 +59,10 @@ class unified_filter implements renderable, templatable {
|
|||
* @param string|moodle_url $baseurl The url with params needed to call up this page.
|
||||
*/
|
||||
public function __construct($filteroptions, $selectedoptions, $baseurl = null) {
|
||||
$deprecatedtext = __CLASS__ . ' class is deprecated. Please use \core\table\participants_search::class' .
|
||||
' with table filtersets instead.';
|
||||
debugging($deprecatedtext, DEBUG_DEVELOPER);
|
||||
|
||||
$this->filteroptions = $filteroptions;
|
||||
$this->selectedoptions = $selectedoptions;
|
||||
if (!empty($baseurl)) {
|
||||
|
|
|
@ -110,6 +110,7 @@ class core_user_renderer extends plugin_renderer_base {
|
|||
|
||||
/**
|
||||
* Renders the unified filter element for the course participants page.
|
||||
* @deprecated since Moodle 3.9 MDL-68612 - Please use participants_filter() instead.
|
||||
*
|
||||
* @param stdClass $course The course object.
|
||||
* @param context $context The context object.
|
||||
|
@ -120,6 +121,8 @@ class core_user_renderer extends plugin_renderer_base {
|
|||
public function unified_filter($course, $context, $filtersapplied, $baseurl = null) {
|
||||
global $CFG, $DB, $USER;
|
||||
|
||||
debugging('core_user_renderer->unified_filter() is deprecated. Please use participants_filter() instead.', DEBUG_DEVELOPER);
|
||||
|
||||
require_once($CFG->dirroot . '/enrol/locallib.php');
|
||||
require_once($CFG->dirroot . '/lib/grouplib.php');
|
||||
$manager = new course_enrolment_manager($this->page, $course);
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
This files describes API changes for code that uses the user API.
|
||||
|
||||
=== 3.9 ===
|
||||
|
||||
* The unified filter has been replaced by the participants filter. The following have therefore been deprecated:
|
||||
* Library functions:
|
||||
* user_get_participants_sql
|
||||
* user_get_total_participants
|
||||
* user_get_participants
|
||||
* Unified filter renderer (core_user_renderer::unified_filter)
|
||||
* Unified filter renderable (\core_user\output\unified_filter)
|
||||
* Unified filter JavaScript (core_user/unified_filter.js and core_user/unified_filter_datasource.js)
|
||||
* Unified filter template (unified_filter.mustache)
|
||||
|
||||
=== 3.6 ===
|
||||
|
||||
* The following functions have been finally deprecated and can not be used anymore:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue