Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 401] [Versions 400 and 402] [Versions 400 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: 434 lines (16 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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

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

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.