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

Table log for displaying logs.

Copyright: 2014 onwards Ankit Agarwal <ankit.agrr@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 405 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

report_loglive_table_log:: (14 methods):
  __construct()
  col_course()
  col_time()
  col_fullnameuser()
  col_relatedfullnameuser()
  col_context()
  col_component()
  col_eventname()
  col_description()
  col_origin()
  col_ip()
  action_link()
  query_db()
  update_users_and_courses_used()


Class: report_loglive_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.

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

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.

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.