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 39 and 311]

Log report renderer.

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

Defines 1 class


Class: report_log_renderable  - X-Ref

Report log renderable class.

__construct($logreader = "", $course = 0, $userid = 0, $modid = 0, $action = "", $groupid = 0, $edulevel = -1,$showcourses = false, $showusers = false, $showreport = true, $showselectorform = true, $url = "", $date = 0,$logformat='showashtml', $page = 0, $perpage = 100, $order = "timecreated ASC", $origin ='')   X-Ref
Constructor.

param: string $logreader (optional)reader pluginname from which logs will be fetched.
param: stdClass|int $course (optional) course record or id
param: int $userid (optional) id of user to filter records for.
param: int|string $modid (optional) module id or site_errors for filtering errors.
param: string $action (optional) action name to filter.
param: int $groupid (optional) groupid of user.
param: int $edulevel (optional) educational level.
param: bool $showcourses (optional) show courses.
param: bool $showusers (optional) show users.
param: bool $showreport (optional) show report.
param: bool $showselectorform (optional) show selector form.
param: moodle_url|string $url (optional) page url.
param: int $date date (optional) timestamp of start of the day for which logs will be displayed.
param: string $logformat log format.
param: int $page (optional) page number.
param: int $perpage (optional) number of records to show per page.
param: string $order (optional) sortorder of fetched records

get_readers($nameonly = false)   X-Ref
Get a list of enabled sql_reader objects/name

param: bool $nameonly if true only reader names will be returned.
return: array core\log\sql_reader object or name.

get_activities_list()   X-Ref
Helper function to return list of activities to show in selection filter.

return: array list of activities.

get_selected_group()   X-Ref
Helper function to get selected group.

return: int selected group.

get_actions()   X-Ref
Return list of actions for log reader.

return: array list of action options.

get_selected_user_fullname()   X-Ref
Return selected user fullname.

return: string user fullname.

get_course_list()   X-Ref
Return list of courses to show in selector.

return: array list of courses.

get_group_list()   X-Ref
Return list of groups that are used in this course. This is done when groups are used in the course
and the user is allowed to see all groups or groups are visible anyway. If groups are used but the
mode is separate groups and the user is not allowed to see all groups, the list contains the groups
only, where the user is member.
If the course uses no groups, the list is empty.

return: array list of groups.

get_user_list()   X-Ref
Return list of users.

return: array list of users.

get_date_options()   X-Ref
Return list of date options.

return: array date options.

get_origin_options()   X-Ref
Return list of components to show in selector.

return: array list of origins.

get_edulevel_options()   X-Ref
Return list of edulevel.

return: array list of edulevels.

setup_table()   X-Ref
Setup table log.


download()   X-Ref
Download logs in specified format.