|
Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Files | |
| file | access.php |
| Capabilities. | |
| file | install.php |
| Post installation and migration code. | |
| file | lib.php |
| Public API of the log report. | |
| file | locallib.php |
| This file contains functions used by the log reports. | |
| file | provider.php |
| Privacy Subsystem implementation for report_log. | |
| file | renderable.php |
| Log report renderer. | |
| file | renderer.php |
| Log report renderer. | |
| file | report_viewed.php |
| The report_log report viewed event. | |
| file | settings.php |
| Links and settings. | |
| file | table_log.php |
| Table log for displaying logs. | |
| file | user_report_viewed.php |
| The report_log user report viewed event. | |
| file | version.php |
| Version info. | |
Namespaces | |
| report_log\event | |
| | |
| report_log\privacy | |
| | |
Classes | |
| class | report_log\event\report_viewed |
| class | report_log\event\user_report_viewed |
| class | report_log\privacy\provider |
| Privacy Subsystem for report_log implementing null_provider. More... | |
| class | report_log_renderable |
| Report log renderable class. More... | |
| class | report_log_renderer |
| Report log renderer's for printing reports. More... | |
| class | report_log_table_log |
| Table log class for displaying logs. More... | |
Functions | |
| report_log_extend_navigation_course ($navigation, $course, $context) | |
| This function extends the navigation with the report items. More... | |
| report_log_extend_navigation_module ($navigation, $cm) | |
| This function extends the module navigation with the report items. More... | |
| report_log_extend_navigation_user ($navigation, $user, $course) | |
| This function extends the course navigation with the report items. More... | |
| report_log_myprofile_navigation (core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course) | |
| Add nodes to myprofile page. More... | |
| report_log_page_type_list ($pagetype, $parentcontext, $currentcontext) | |
| Return a list of page types. More... | |
| stdClass | report_log_print_graph ($course, $user, $typeormode, $date=0, $logreader='') |
| This function is used to generate and display the log activity graph. More... | |
| stdClass | report_log_print_mnet_selector_form ($hostid, $course, $selecteduser=0, $selecteddate='today', $modname="", $modid=0, $modaction='', $selectedgroup=-1, $showcourses=0, $showusers=0, $logformat='showashtml') |
| This function is used to generate and display Mnet selector form. More... | |
| report_log_supports_logstore ($instance) | |
| Callback to verify if the given instance of store is supported by this report or not. More... | |
| report_log_userall_data ($course, $user, $logreader) | |
| Fetch logs since the start of the courses and structure in series and labels to be sent to Chart API. More... | |
| report_log_usercourse ($userid, $courseid, $coursestart, $logreader='') | |
| Select all log records for a given course and user. More... | |
| report_log_userday ($userid, $courseid, $daystart, $logreader='') | |
| Select all log records for a given course, user, and day. More... | |
| report_log_usertoday_data ($course, $user, $date, $logreader) | |
| Fetch logs of the current day and structure in series and labels to be sent to Chart API. More... | |
| moodle_database | xmldb_report_log_install () |
| Contains codes to be run during installation of report/logs. More... | |
Variables | |
| $capabilities | |
| $settings = null | |
| $plugin | component = 'report_log' |
| if (!defined( 'REPORT_LOG_MAX_DISPLAY')) | |
| $plugin | requires = 2019111200 |
| $plugin | version = 2019111800 |
| report_log_extend_navigation_course | ( | $navigation, | |
| $course, | |||
| $context | |||
| ) |
This function extends the navigation with the report items.
| navigation_node | $navigation | The navigation node to extend |
| stdClass | $course | The course to object for the report |
| stdClass | $context | The context of the course |
| report_log_extend_navigation_module | ( | $navigation, | |
| $cm | |||
| ) |
This function extends the module navigation with the report items.
| navigation_node | $navigation | The navigation node to extend |
| stdClass | $cm |
| report_log_extend_navigation_user | ( | $navigation, | |
| $user, | |||
| $course | |||
| ) |
This function extends the course navigation with the report items.
| navigation_node | $navigation | The navigation node to extend |
| stdClass | $user | |
| stdClass | $course | The course to object for the report |
| report_log_myprofile_navigation | ( | core_user\output\myprofile\tree | $tree, |
| $user, | |||
| $iscurrentuser, | |||
| $course | |||
| ) |
Add nodes to myprofile page.
| core_user\output\myprofile\tree | $tree | Tree object |
| stdClass | $user | user object |
| bool | $iscurrentuser | |
| stdClass | $course | Course object |
| bool |
| report_log_page_type_list | ( | $pagetype, | |
| $parentcontext, | |||
| $currentcontext | |||
| ) |
Return a list of page types.
| string | $pagetype | current page type |
| stdClass | $parentcontext | Block's parent context |
| stdClass | $currentcontext | Current context of block |
| array | a list of page types |
| stdClass report_log_print_graph | ( | $course, | |
| $user, | |||
| $typeormode, | |||
$date = 0, |
|||
$logreader = '' |
|||
| ) |
This function is used to generate and display the log activity graph.
$CFG
| stdClass | $course | course instance |
| int | stdClass | $user | id/object of the user whose logs are needed |
| string | $typeormode | type of logs graph needed (usercourse.png/userday.png) or the mode (today, all). |
| int | $date | timestamp in GMT (seconds since epoch) |
| string | $logreader | Log reader. |
| void |
| stdClass report_log_print_mnet_selector_form | ( | $hostid, | |
| $course, | |||
$selecteduser = 0, |
|||
$selecteddate = 'today', |
|||
$modname = "", |
|||
$modid = 0, |
|||
$modaction = '', |
|||
$selectedgroup = -1, |
|||
$showcourses = 0, |
|||
$showusers = 0, |
|||
$logformat = 'showashtml' |
|||
| ) |
This function is used to generate and display Mnet selector form.
$USER @global stdClass $CFG @global stdClass $SITE @global moodle_database $DB @global core_renderer $OUTPUT @global stdClass $SESSION @uses CONTEXT_SYSTEM @uses COURSE_MAX_COURSES_PER_DROPDOWN @uses CONTEXT_COURSE @uses SEPARATEGROUPS
| int | $hostid | host id |
| stdClass | $course | course instance |
| int | $selecteduser | id of the selected user |
| string | $selecteddate | Date selected |
| string | $modname | course_module->id |
| string | $modid | number or 'site_errors' |
| string | $modaction | an action as recorded in the logs |
| int | $selectedgroup | Group to display |
| int | $showcourses | whether to show courses if we're over our limit. |
| int | $showusers | whether to show users if we're over our limit. |
| string | $logformat | Format of the logs (downloadascsv, showashtml, downloadasods, downloadasexcel) |
| void |
| report_log_supports_logstore | ( | $instance | ) |
Callback to verify if the given instance of store is supported by this report or not.
| string | $instance | store instance. |
| bool | returns true if the store is supported by the report, false otherwise. |
| report_log_userall_data | ( | $course, | |
| $user, | |||
| $logreader | |||
| ) |
Fetch logs since the start of the courses and structure in series and labels to be sent to Chart API.
| stdClass | $course | the course object |
| stdClass | $user | user object |
| string | $logreader | the log reader where the logs are. |
| array | structured array to be sent to chart API, split in two indexes (series and labels). |
| report_log_usercourse | ( | $userid, | |
| $courseid, | |||
| $coursestart, | |||
$logreader = '' |
|||
| ) |
Select all log records for a given course and user.
| int | $userid | The id of the user as found in the 'user' table. |
| int | $courseid | The id of the course as found in the 'course' table. |
| string | $coursestart | unix timestamp representing course start date and time. |
| string | $logreader | log reader to use. |
| array |
| report_log_userday | ( | $userid, | |
| $courseid, | |||
| $daystart, | |||
$logreader = '' |
|||
| ) |
Select all log records for a given course, user, and day.
| int | $userid | The id of the user as found in the 'user' table. |
| int | $courseid | The id of the course as found in the 'course' table. |
| string | $daystart | unix timestamp of the start of the day for which the logs needs to be retrived |
| string | $logreader | log reader to use. |
| array |
| report_log_usertoday_data | ( | $course, | |
| $user, | |||
| $date, | |||
| $logreader | |||
| ) |
Fetch logs of the current day and structure in series and labels to be sent to Chart API.
| stdClass | $course | the course object |
| stdClass | $user | user object |
| int | $date | A time of a day (in GMT). |
| string | $logreader | the log reader where the logs are. |
| array::$logs | structured array to be sent to chart API, split in two indexes (series and labels). |
| moodle_database xmldb_report_log_install | ( | ) |
Contains codes to be run during installation of report/logs.
$DB
| void |
| $capabilities |