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 39 and 402] [Versions 400 and 402] [Versions 401 and 402] [Versions 402 and 403]

Table log for displaying logs.

Copyright: 2014 Rajesh Taneja <rajesh.taneja@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 585 lines (22 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: report_log_table_log  - X-Ref

Table log class for displaying logs.

__construct($uniqueid, $filterparams = null)   X-Ref
Sets up the table_log parameters.

param: string $uniqueid unique id of form.
param: stdClass $filterparams (optional) filter params.

col_course($event)   X-Ref
Generate the course column.


get_user_fullname($userid)   X-Ref
Gets the user full name.

This function is useful because, in the unlikely case that the user is
not already loaded in $this->userfullnames it will fetch it from db.

param: int $userid
return: string|false

col_time($event)   X-Ref
Generate the time column.

param: stdClass $event event data.
return: string HTML for the time column

col_fullnameuser($event)   X-Ref
Generate the username column.

param: stdClass $event event data.
return: string HTML for the username column

col_relatedfullnameuser($event)   X-Ref
Generate the related username column.

param: stdClass $event event data.
return: string HTML for the related username column

col_context($event)   X-Ref
Generate the context column.

param: stdClass $event event data.
return: string HTML for the context column

col_component($event)   X-Ref
Generate the component column.

param: stdClass $event event data.
return: string HTML for the component column

col_eventname($event)   X-Ref
Generate the event name column.

param: stdClass $event event data.
return: string HTML for the event name column

col_description($event)   X-Ref
Generate the description column.

param: stdClass $event event data.
return: string HTML for the description column

col_origin($event)   X-Ref
Generate the origin column.

param: stdClass $event event data.
return: string HTML for the origin column

col_ip($event)   X-Ref
Generate the ip column.

param: stdClass $event event data.
return: string HTML for the ip column

action_link(moodle_url $url, $text, $name = 'popup')   X-Ref
Method to create a link with popup action.

param: moodle_url $url The url to open.
param: string $text Anchor text for the link.
param: string $name Name of the popup window.
return: string html to use.

get_legacy_crud_action($crud)   X-Ref
Helper function to get legacy crud action.

param: string $crud crud action
return: string legacy action.

get_action_sql()   X-Ref
Helper function which is used by build logs to get action sql and param.

return: array sql and param for action.

get_cm_sql()   X-Ref
Helper function which is used by build logs to get course module sql and param.

return: array sql and param for action.

query_db($pagesize, $useinitialsbar = true)   X-Ref
Query the reader. Store results in the object for use by build_table.

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

update_users_and_courses_used()   X-Ref
Helper function to create list of course shortname and user fullname shown in log report.

This will update $this->userfullnames and $this->courseshortnames array with userfullname and courseshortname (with link),
which will be used to render logs in table.


update_users_used()   X-Ref
Helper function to create list of user fullnames shown in log report.

This will update $this->userfullnames array with userfullname,
which will be used to render logs in table.

return: void