Search moodle.org's
Developer Documentation

See Release Notes

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

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

Infected file report

Author: Nathan Nguyen <nathannguyen@catalyst-au.net>
Copyright: Catalyst IT
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 264 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

infectedfiles_table:: (10 methods):
  __construct()
  define_table_columns()
  define_table_configs()
  get_sql_and_params()
  query_db()
  col_author()
  col_reason()
  col_actions()
  col_timecreated()
  display()


Class: infectedfiles_table  - X-Ref

Infected file report

__construct($uniqueid, \moodle_url $url, $page = 0, $perpage = 30)   X-Ref
Table constructor

param: int $uniqueid table id
param: \moodle_url $url page url
param: int $page current page
param: int $perpage number or record per page

define_table_columns()   X-Ref
Table columns and corresponding headers


define_table_configs(\moodle_url $url)   X-Ref
Define table configuration

param: \moodle_url $url

get_sql_and_params($count = false)   X-Ref
Builds the SQL query.

param: bool $count When true, return the count SQL.
return: array containing sql to use and an array of params.

query_db($pagesize, $useinitialsbar = true)   X-Ref
Get data.

param: int $pagesize number of records to fetch
param: bool $useinitialsbar initial bar

col_author($row)   X-Ref
Column to display the authors fullname from userid.

param: \stdClass $row the row from sql.
return: string the authors name.

col_reason($row)   X-Ref
Column to display the failure reason.

param: \stdClass $row the row from sql.
return: string the formatted reason.

col_actions($row)   X-Ref
Custom actions column

param: \stdClass $row an incident record.
return: string content of action column.

col_timecreated($row)   X-Ref
Custom time column.

param: \stdClass $row an incident record.
return: string time created in user-friendly format.

display($pagesize, $useinitialsbar, $downloadhelpbutton='')   X-Ref
Display table with download all and delete all buttons

param: int $pagesize number or records perpage
param: bool $useinitialsbar use the bar or not
param: string $downloadhelpbutton help button
return: void