Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Functions | Variables
statslib.php File Reference

@subpackage stats More...

Functions

 stats_check_uptodate ($courseid=0)
 
 stats_clean_old ()
 Remove old stats data.
 
 stats_compare_times ($a, $b)
 
 stats_cron_daily ($maxdays=1)
 Execute daily statistics gathering. More...
 
 stats_cron_monthly ()
 Execute monthly statistics gathering. More...
 
 stats_cron_weekly ()
 Execute weekly statistics gathering. More...
 
 stats_fix_zeros ($stats, $timeafter, $timestr, $line2=true, $line3=false)
 Fix missing entries in the statistics. More...
 
 stats_get_action_names ($str)
 
 stats_get_base_daily ($time=0)
 Start of day. More...
 
 stats_get_base_monthly ($time=0)
 Start of month. More...
 
 stats_get_base_weekly ($time=0)
 Start of week. More...
 
 stats_get_next_day_start ($time)
 Start of next day. More...
 
 stats_get_next_month_start ($time)
 Start of next month. More...
 
 stats_get_next_week_start ($time)
 Start of next week. More...
 
 stats_get_parameters ($time, $report, $courseid, $mode, $roleid=0)
 
 stats_get_post_actions ()
 
 stats_get_report_options ($courseid, $mode)
 
 stats_get_start_from ($str)
 Return starting date of stats processing. More...
 
 stats_get_time_options ($now, $lastweekend, $lastmonthend, $earliestday, $earliestweek, $earliestmonth)
 
 stats_get_view_actions ()
 
 stats_progress ($ident)
 Print daily cron progress. More...
 
 stats_run_query ($sql, $parameters=array())
 Execute individual daily statistics queries. More...
 
 stats_temp_table_clean ()
 Deletes summary logs table for stats calculation. More...
 
 stats_temp_table_create ()
 Create temporary tables to speed up log generation.
 
 stats_temp_table_drop ()
 Deletes summary logs table for stats calculation.
 
 stats_temp_table_fill ($timestart, $timeend)
 Fills the temporary stats tables with new data. More...
 
 stats_temp_table_setup ()
 Fills the temporary stats tables with new data. More...
 

Variables

const STATS_MODE_DETAILED 2
 
const STATS_MODE_GENERAL 1
 
const STATS_MODE_RANKED 3
 
const STATS_PLACEHOLDER_OUTPUT '.'
 
const STATS_REPORT_ACTIVE_COURSES 11
 
const STATS_REPORT_ACTIVE_COURSES_WEIGHTED 12
 
const STATS_REPORT_ACTIVITY 4
 
const STATS_REPORT_ACTIVITYBYROLE 5
 
const STATS_REPORT_LOGINS 1
 THESE CONSTANTS ARE USED FOR THE REPORTING PAGE.
 
const STATS_REPORT_PARTICIPATORY_COURSES 13
 
const STATS_REPORT_PARTICIPATORY_COURSES_RW 14
 
const STATS_REPORT_READS 2
 
const STATS_REPORT_USER_ACTIVITY 7
 
const STATS_REPORT_USER_ALLACTIVITY 8
 
const STATS_REPORT_USER_LOGINS 9
 
const STATS_REPORT_USER_VIEW 10
 
const STATS_REPORT_WRITES 3
 
const STATS_TIME_LAST10MONTHS 30
 
const STATS_TIME_LAST11MONTHS 31
 
const STATS_TIME_LAST2MONTHS 12
 
const STATS_TIME_LAST2WEEKS 2
 
const STATS_TIME_LAST3MONTHS 13
 
const STATS_TIME_LAST3WEEKS 3
 
const STATS_TIME_LAST4MONTHS 14
 
const STATS_TIME_LAST4WEEKS 4
 
const STATS_TIME_LAST5MONTHS 15
 
const STATS_TIME_LAST6MONTHS 16
 
const STATS_TIME_LAST7MONTHS 27
 
const STATS_TIME_LAST8MONTHS 28
 
const STATS_TIME_LAST9MONTHS 29
 
const STATS_TIME_LASTWEEK 1
 
const STATS_TIME_LASTYEAR 32
 

Detailed Description

@subpackage stats

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