Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 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: 435 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.

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.