Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403] [Versions 402 and 403]

Contains the class used for the displaying the data requests table.

Copyright: 2018 Jun Pataleta <jun@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 453 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: data_requests_table  - X-Ref

The class for displaying the data requests table.

__construct($userid = 0, $statuses = [], $types = [], $creationmethods = [], $manage = false)   X-Ref
data_requests_table constructor.

param: int $userid The user ID
param: int[] $statuses
param: int[] $types
param: int[] $creationmethods
param: bool $manage

col_select($data)   X-Ref
The select column.

param: stdClass $data The row data.
return: string

col_type($data)   X-Ref
The type column.

param: stdClass $data The row data.
return: string

col_userid($data)   X-Ref
The user column.

param: stdClass $data The row data.
return: mixed

col_timecreated($data)   X-Ref
The context information column.

param: stdClass $data The row data.
return: string

col_requestedby($data)   X-Ref
The requesting user's column.

param: stdClass $data The row data.
return: mixed

col_status($data)   X-Ref
The status column.

param: stdClass $data The row data.
return: mixed

col_comments($data)   X-Ref
The comments column.

param: stdClass $data The row data.
return: string

col_actions($data)   X-Ref
The actions column.

param: stdClass $data The row data.
return: string

query_db($pagesize, $useinitialsbar = true)   X-Ref
Query the database for results to display in the table.

param: int $pagesize size of page for paginated displayed table.
param: bool $useinitialsbar do you want to use the initials bar.

print_nothing_to_display()   X-Ref
Override default implementation to display a more meaningful information to the user.


show_hide_link($column, $index)   X-Ref
Override the table's show_hide_link method to prevent the show/hide links from rendering.

param: string $column the column name, index into various names.
param: int $index numerical index of the column.
return: string HTML fragment.

wrap_html_finish()   X-Ref
Override the table's wrap_html_finish method in order to render the bulk actions and
records per page options.


set_requests_per_page(int $perpage)   X-Ref
Set the number of data request records to be displayed per page.

param: int $perpage The number of data request records.

get_requests_per_page()   X-Ref
Get the number of data request records to be displayed per page.

return: int The number of data request records.

set_requests_per_page_options(array $perpageoptions)   X-Ref
Set the available options for the number of data request to be displayed per page.

param: array $perpageoptions The available options for the number of data request to be displayed per page.

get_requests_per_page_options()   X-Ref
Get the available options for the number of data request to be displayed per page.

return: array The available options for the number of data request to be displayed per page.