Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | Protected Attributes | List of all members
report_log_renderable Class Reference

Report log renderable class. More...

Inheritance diagram for report_log_renderable:
renderable

Public Member Functions

 __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='')
 Constructor. More...
 
 download ()
 Download logs in specified format.
 
 get_actions ()
 Return list of actions for log reader. More...
 
 get_activities_list ()
 Helper function to return list of activities to show in selection filter. More...
 
 get_course_list ()
 Return list of courses to show in selector. More...
 
 get_date_options ()
 Return list of date options. More...
 
 get_edulevel_options ()
 Return list of edulevel. More...
 
 get_group_list ()
 Return list of groups. More...
 
 get_origin_options ()
 Return list of components to show in selector. More...
 
 get_readers ($nameonly=false)
 Get a list of enabled sql_reader objects/name. More...
 
 get_selected_group ()
 Helper function to get selected group. More...
 
 get_selected_user_fullname ()
 Return selected user fullname. More...
 
 get_user_list ()
 Return list of users. More...
 
 setup_table ()
 Setup table log.
 

Public Attributes

string $action
 selected action filter
 
stdClass $course
 course record
 
int $date
 selected date from which records should be displayed
 
int $edulevel
 educational level
 
int $groupid
 group id
 
string $logformat
 selected log format
 
int $modid
 selected moduleid
 
string $order
 order to sort
 
string $origin
 origin to filter event origin
 
int $page
 page number
 
int $perpage
 perpage records to show
 
string $selectedlogreader = null
 selected log reader pluginname
 
bool $showcourses
 show courses
 
bool $showreport
 show report
 
bool $showselectorform
 show selector form
 
bool $showusers
 show users
 
table_log $tablelog
 table log which will be used for rendering logs
 
moodle_url $url
 url of report page
 
int $userid
 selected user id for which logs are displayed
 

Protected Attributes

manager $logmanager
 log manager
 

Detailed Description

Report log renderable class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

report_log_renderable::__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 = '' 
)

Constructor.

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

Member Function Documentation

◆ get_actions()

report_log_renderable::get_actions ( )

Return list of actions for log reader.

Todo:
MDL-44528 Get list from log_store.
Return values
arraylist of action options.

◆ get_activities_list()

report_log_renderable::get_activities_list ( )

Helper function to return list of activities to show in selection filter.

Return values
arraylist of activities.

◆ get_course_list()

report_log_renderable::get_course_list ( )

Return list of courses to show in selector.

Return values
arraylist of courses.

◆ get_date_options()

report_log_renderable::get_date_options ( )

Return list of date options.

Return values
arraydate options.

◆ get_edulevel_options()

report_log_renderable::get_edulevel_options ( )

Return list of edulevel.

Todo:
MDL-44528 Get list from log_store.
Return values
arraylist of edulevels.

◆ get_group_list()

report_log_renderable::get_group_list ( )

Return list of groups.

Return values
arraylist of groups.

◆ get_origin_options()

report_log_renderable::get_origin_options ( )

Return list of components to show in selector.

Return values
arraylist of origins.

◆ get_readers()

report_log_renderable::get_readers (   $nameonly = false)

Get a list of enabled sql_reader objects/name.

Parameters
bool$nameonlyif true only reader names will be returned.
Return values
arraycore\log\sql_reader object or name.

◆ get_selected_group()

report_log_renderable::get_selected_group ( )

Helper function to get selected group.

Return values
intselected group.

◆ get_selected_user_fullname()

report_log_renderable::get_selected_user_fullname ( )

Return selected user fullname.

Return values
stringuser fullname.

◆ get_user_list()

report_log_renderable::get_user_list ( )

Return list of users.

Return values
arraylist of users.

The documentation for this class was generated from the following file: