Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Files | Functions | Variables
report

Files

file  install.php
 Post installation and migration code.
 
file  install.php
 Post installation and migration code.
 
file  install.php
 Post installation and migration code.
 
file  install.php
 Post installation and migration code.
 
file  install.php
 Post installation and migration code.
 
file  lib.php
 This file contains functions used by the log reports.
 
file  lib.php
 This file contains functions used by the progress report.
 
file  lib.php
 This file contains functions used by the participation report.
 
file  lib.php
 This file contains public API of outline report.
 
file  lib.php
 Version details.
 
file  locallib.php
 Reports implementation.
 
file  locallib.php
 Lib functions.
 
file  locallib.php
 This file contains functions used by the outline reports.
 
file  settings.php
 Version info.
 
file  settings.php
 Settings and links.
 
file  settings.php
 Settings and links.
 
file  settings.php
 Report settings.
 
file  settings.php
 Report settings.
 
file  settings.php
 Settings for the backups report.
 
file  version.php
 Version info.
 
file  version.php
 Version info.
 
file  version.php
 Version info.
 
file  version.php
 Version details.
 
file  version.php
 Version info.
 
file  version.php
 Version info.
 
file  version.php
 Version info.
 
file  version.php
 Version details.
 
file  version.php
 Version details.
 
file  version.php
 Version details.
 

Functions

 report_completion_extend_navigation_course ($navigation, $course, $context)
 This function extends the navigation with the report items. More...
 
 report_completion_extend_navigation_user ($navigation, $user, $course)
 This function extends the course navigation with the report items. More...
 
 report_completion_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types. More...
 
 report_outline_extend_navigation_course ($navigation, $course, $context)
 This function extends the course navigation with the report items. More...
 
 report_outline_extend_navigation_user ($navigation, $user, $course)
 This function extends the course navigation with the report items. More...
 
 report_outline_get_common_log_variables ()
 Returns an array of the commonly used log variables by the outline report. More...
 
 report_outline_myprofile_navigation (core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course)
 Add nodes to myprofile page. More...
 
 report_outline_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types. More...
 
 report_outline_print_row ($mod, $instance, $result)
 
 report_outline_supports_logstore ($instance)
 Callback to verify if the given instance of store is supported by this report or not. More...
 
 report_outline_user_complete ($userid, $cmid, $module, $instanceid)
 Display the most commonly used user complete information. More...
 
 report_outline_user_outline ($userid, $cmid, $module, $instanceid)
 Return the most commonly used user outline information. More...
 
 report_participation_extend_navigation_course ($navigation, $course, $context)
 This function extends the navigation with the report items. More...
 
 report_participation_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types. More...
 
 report_participation_supports_logstore ($instance)
 Callback to verify if the given instance of store is supported by this report or not. More...
 
 report_progress_extend_navigation_course ($navigation, $course, $context)
 This function extends the navigation with the report items. More...
 
 report_progress_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types. More...
 
 report_security_check_configrw ($detailed=false)
 Verifies config.php is not writable anymore after installation, config files were changed on several outdated server. More...
 
 report_security_check_cookiesecure ($detailed=false)
 Verifies if https enabled only secure cookies allowed, this prevents redirections and sending of cookies to unsecure port. More...
 
 report_security_check_crawlers ($detailed=false)
 Verifies web crawler (search engine) access not combined with disabled guest access because attackers might gain guest access by modifying browser signature. More...
 
 report_security_check_defaultuserrole ($detailed=false)
 Verifies sanity of default user role. More...
 
 report_security_check_displayerrors ($detailed=false)
 Verifies displaying of errors - problem for lib files and 3rd party code because we can not disable debugging in these scripts (they do not include config.php) More...
 
 report_security_check_emailchangeconfirmation ($detailed=false)
 Verifies email confirmation - spammers were changing mails very often. More...
 
 report_security_check_embed ($detailed=false)
 Verifies sloppy embedding - this should have been removed long ago!! More...
 
 report_security_check_frontpagerole ($detailed=false)
 Verifies sanity of frontpage role. More...
 
 report_security_check_guestrole ($detailed=false)
 Verifies sanity of guest role. More...
 
 report_security_check_mediafilterswf ($detailed=false)
 Verifies sloppy swf embedding - this should have been removed long ago!! More...
 
 report_security_check_noauth ($detailed=false)
 ============================================= More...
 
 report_security_check_nodemodules ($detailed=false)
 Check the presence of the node_modules directory. More...
 
 report_security_check_openprofiles ($detailed=false)
 Verifies open profiles - originally open by default, not anymore because spammer abused it a lot. More...
 
 report_security_check_passwordpolicy ($detailed=false)
 Verifies if password policy set. More...
 
 report_security_check_preventexecpath ($detailed=false)
 Verifies the status of preventexecpath. More...
 
 report_security_check_riskadmin ($detailed=false)
 Lists all admins. More...
 
 report_security_check_riskbackup ($detailed=false)
 Lists all roles that have the ability to backup user data, as well as users. More...
 
 report_security_check_riskxss ($detailed=false)
 Lists all users with XSS risk, it would be great to combine this with risk trusts in user table, unfortunately nobody implemented user trust UI yet :-(. More...
 
 report_security_check_unsecuredataroot ($detailed=false)
 Verifies fatal misconfiguration of dataroot. More...
 
 report_security_check_vendordir ($detailed=false)
 Check the presence of the vendor directory. More...
 
 report_security_check_webcron ($detailed=false)
 Verifies the status of web cron. More...
 
 report_security_doc_link ($issue, $name)
 
 report_security_get_issue_list ()
 
 report_security_hide_timearning ()
 
 report_stats_extend_navigation_course ($navigation, $course, $context)
 This function extends the navigation with the report items. More...
 
 report_stats_extend_navigation_user ($navigation, $user, $course)
 This function extends the course navigation with the report items. More...
 
 report_stats_mode_menu ($course, $mode, $time, $url)
 
 report_stats_myprofile_navigation (core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course)
 Add nodes to myprofile page. More...
 
 report_stats_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types. More...
 
 report_stats_print_chart ($courseid, $report, $time, $mode, $userid=0, $roleid=0)
 Fetch statistics data and generate a line chart. More...
 
 report_stats_report ($course, $report, $mode, $user, $roleid, $time)
 
 report_stats_supports_logstore ($instance)
 Callback to verify if the given instance of store is supported by this report or not. More...
 
 report_stats_timeoptions ($mode)
 
 xmldb_report_completion_install ()
 
 xmldb_report_outline_install ()
 
 xmldb_report_participation_install ()
 
 xmldb_report_progress_install ()
 
 xmldb_report_stats_install ()
 

Variables

 $settings = null
 
 $settings = null
 
 $settings = null
 
 $settings = null
 
 $settings = null
 
 $settings = null
 
$plugin component = 'report_backups'
 
$plugin component = 'report_completion'
 
$plugin component = 'report_configlog'
 
$plugin component = 'report_courseoverview'
 
$plugin component = 'report_outline'
 
$plugin component = 'report_participation'
 
$plugin component = 'report_progress'
 
$plugin component = 'report_questioninstances'
 
$plugin component = 'report_security'
 
$plugin component = 'report_stats'
 
const REPORT_SECURITY_CRITICAL 'critical'
 
const REPORT_SECURITY_INFO 'info'
 
const REPORT_SECURITY_OK 'ok'
 
const REPORT_SECURITY_SERIOUS 'serious'
 
const REPORT_SECURITY_WARNING 'warning'
 
$plugin requires = 2019111200
 
$plugin requires = 2019111200
 
$plugin requires = 2019111200
 
$plugin requires = 2019111200
 
$plugin requires = 2019111200
 
$plugin requires = 2019111200
 
$plugin requires = 2019111200
 
$plugin requires = 2019111200
 
$plugin requires = 2019111200
 
$plugin requires = 2019111200
 
$plugin version = 2019111800
 
$plugin version = 2019111800
 
$plugin version = 2019111800
 
$plugin version = 2019111800
 
$plugin version = 2019111800
 
$plugin version = 2019111800
 
$plugin version = 2019111800
 
$plugin version = 2019111800
 
$plugin version = 2019111800
 
$plugin version = 2019111800
 

Detailed Description

Function Documentation

◆ report_completion_extend_navigation_course()

report_completion_extend_navigation_course (   $navigation,
  $course,
  $context 
)

This function extends the navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$courseThe course to object for the report
stdClass$contextThe context of the course

◆ report_completion_extend_navigation_user()

report_completion_extend_navigation_user (   $navigation,
  $user,
  $course 
)

This function extends the course navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$user
stdClass$courseThe course to object for the report

◆ report_completion_page_type_list()

report_completion_page_type_list (   $pagetype,
  $parentcontext,
  $currentcontext 
)

Return a list of page types.

Parameters
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block
Return values
array

◆ report_outline_extend_navigation_course()

report_outline_extend_navigation_course (   $navigation,
  $course,
  $context 
)

This function extends the course navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$courseThe course to object for the report
stdClass$contextThe context of the course

◆ report_outline_extend_navigation_user()

report_outline_extend_navigation_user (   $navigation,
  $user,
  $course 
)

This function extends the course navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$user
stdClass$courseThe course to object for the report

◆ report_outline_get_common_log_variables()

report_outline_get_common_log_variables ( )

Returns an array of the commonly used log variables by the outline report.

Return values
arraythe array of variables used

◆ report_outline_myprofile_navigation()

report_outline_myprofile_navigation ( core_user\output\myprofile\tree  $tree,
  $user,
  $iscurrentuser,
  $course 
)

Add nodes to myprofile page.

Parameters
core_user\output\myprofile\tree$treeTree object
stdClass$useruser object
bool$iscurrentuser
stdClass$courseCourse object
Return values
bool

◆ report_outline_page_type_list()

report_outline_page_type_list (   $pagetype,
  $parentcontext,
  $currentcontext 
)

Return a list of page types.

Parameters
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block
Return values
array

◆ report_outline_supports_logstore()

report_outline_supports_logstore (   $instance)

Callback to verify if the given instance of store is supported by this report or not.

Parameters
string$instancestore instance.
Return values
boolreturns true if the store is supported by the report, false otherwise.

◆ report_outline_user_complete()

report_outline_user_complete (   $userid,
  $cmid,
  $module,
  $instanceid 
)

Display the most commonly used user complete information.

Parameters
int$useridthe id of the user
int$cmidthe course module id
string$modulethe name of the module (eg. 'book')
int$instanceid(eg. the 'id' in the 'book' table)
Return values
string

◆ report_outline_user_outline()

report_outline_user_outline (   $userid,
  $cmid,
  $module,
  $instanceid 
)

Return the most commonly used user outline information.

Parameters
int$useridthe id of the user
int$cmidthe course module id
string$modulethe name of the module (eg. 'book')
int$instanceid(eg. the 'id' in the 'book' table)
Return values
stdClass|nullif any information is found then a stdClass containing this info is returned, else null is.

◆ report_participation_extend_navigation_course()

report_participation_extend_navigation_course (   $navigation,
  $course,
  $context 
)

This function extends the navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$courseThe course to object for the report
stdClass$contextThe context of the course

◆ report_participation_page_type_list()

report_participation_page_type_list (   $pagetype,
  $parentcontext,
  $currentcontext 
)

Return a list of page types.

Parameters
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block
Return values
array

◆ report_participation_supports_logstore()

report_participation_supports_logstore (   $instance)

Callback to verify if the given instance of store is supported by this report or not.

Parameters
string$instancestore instance.
Return values
boolreturns true if the store is supported by the report, false otherwise.

◆ report_progress_extend_navigation_course()

report_progress_extend_navigation_course (   $navigation,
  $course,
  $context 
)

This function extends the navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$courseThe course to object for the report
stdClass$contextThe context of the course

◆ report_progress_page_type_list()

report_progress_page_type_list (   $pagetype,
  $parentcontext,
  $currentcontext 
)

Return a list of page types.

Parameters
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block
Return values
array

◆ report_security_check_configrw()

report_security_check_configrw (   $detailed = false)

Verifies config.php is not writable anymore after installation, config files were changed on several outdated server.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_cookiesecure()

report_security_check_cookiesecure (   $detailed = false)

Verifies if https enabled only secure cookies allowed, this prevents redirections and sending of cookies to unsecure port.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_crawlers()

report_security_check_crawlers (   $detailed = false)

Verifies web crawler (search engine) access not combined with disabled guest access because attackers might gain guest access by modifying browser signature.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_defaultuserrole()

report_security_check_defaultuserrole (   $detailed = false)

Verifies sanity of default user role.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_displayerrors()

report_security_check_displayerrors (   $detailed = false)

Verifies displaying of errors - problem for lib files and 3rd party code because we can not disable debugging in these scripts (they do not include config.php)

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_emailchangeconfirmation()

report_security_check_emailchangeconfirmation (   $detailed = false)

Verifies email confirmation - spammers were changing mails very often.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_embed()

report_security_check_embed (   $detailed = false)

Verifies sloppy embedding - this should have been removed long ago!!

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_frontpagerole()

report_security_check_frontpagerole (   $detailed = false)

Verifies sanity of frontpage role.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_guestrole()

report_security_check_guestrole (   $detailed = false)

Verifies sanity of guest role.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_mediafilterswf()

report_security_check_mediafilterswf (   $detailed = false)

Verifies sloppy swf embedding - this should have been removed long ago!!

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_noauth()

report_security_check_noauth (   $detailed = false)

=============================================

Issue checks

Verifies unsupported noauth setting

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_nodemodules()

report_security_check_nodemodules (   $detailed = false)

Check the presence of the node_modules directory.

Parameters
bool$detailedReturn detailed info.
Return values
objectResult data.

◆ report_security_check_openprofiles()

report_security_check_openprofiles (   $detailed = false)

Verifies open profiles - originally open by default, not anymore because spammer abused it a lot.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_passwordpolicy()

report_security_check_passwordpolicy (   $detailed = false)

Verifies if password policy set.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_preventexecpath()

report_security_check_preventexecpath (   $detailed = false)

Verifies the status of preventexecpath.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_riskadmin()

report_security_check_riskadmin (   $detailed = false)

Lists all admins.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_riskbackup()

report_security_check_riskbackup (   $detailed = false)

Lists all roles that have the ability to backup user data, as well as users.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_riskxss()

report_security_check_riskxss (   $detailed = false)

Lists all users with XSS risk, it would be great to combine this with risk trusts in user table, unfortunately nobody implemented user trust UI yet :-(.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_unsecuredataroot()

report_security_check_unsecuredataroot (   $detailed = false)

Verifies fatal misconfiguration of dataroot.

Parameters
bool$detailed
Return values
objectresult

◆ report_security_check_vendordir()

report_security_check_vendordir (   $detailed = false)

Check the presence of the vendor directory.

Parameters
bool$detailedReturn detailed info.
Return values
objectResult data.

◆ report_security_check_webcron()

report_security_check_webcron (   $detailed = false)

Verifies the status of web cron.

Parameters
bool$detailed
Return values
objectresult

◆ report_stats_extend_navigation_course()

report_stats_extend_navigation_course (   $navigation,
  $course,
  $context 
)

This function extends the navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$courseThe course to object for the report
stdClass$contextThe context of the course

◆ report_stats_extend_navigation_user()

report_stats_extend_navigation_user (   $navigation,
  $user,
  $course 
)

This function extends the course navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$user
stdClass$courseThe course to object for the report

◆ report_stats_myprofile_navigation()

report_stats_myprofile_navigation ( core_user\output\myprofile\tree  $tree,
  $user,
  $iscurrentuser,
  $course 
)

Add nodes to myprofile page.

Parameters
core_user\output\myprofile\tree$treeTree object
stdClass$useruser object
bool$iscurrentuser
stdClass$courseCourse object
Return values
bool

◆ report_stats_page_type_list()

report_stats_page_type_list (   $pagetype,
  $parentcontext,
  $currentcontext 
)

Return a list of page types.

Parameters
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block
Return values
array

◆ report_stats_print_chart()

report_stats_print_chart (   $courseid,
  $report,
  $time,
  $mode,
  $userid = 0,
  $roleid = 0 
)

Fetch statistics data and generate a line chart.

The statistic chart can be view, posts separated by roles and dates.

Parameters
int$courseidcourse id.
int$reportthe report type constant eg. STATS_REPORT_LOGINS as defined on statslib.
int$timetimestamp of the selected time period.
int$modethe report mode, eg. STATS_MODE_DETAILED as defined on statslib.
int$useridselected user id.
int$roleidselected role id.

◆ report_stats_supports_logstore()

report_stats_supports_logstore (   $instance)

Callback to verify if the given instance of store is supported by this report or not.

Parameters
string$instancestore instance.
Return values
boolreturns true if the store is supported by the report, false otherwise.