Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

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: 437 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

report_loglive_table_log:: (15 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()
  get_until()


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.


get_until()   X-Ref
Returns the latest timestamp of the records in the table.

return: int