Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/statslib.php File Reference

Go to the source code of this file.

Namespaces

namespace  core

Enumerations

enum  STATS_REPORT_LOGINS
enum  STATS_REPORT_READS
enum  STATS_REPORT_WRITES
enum  STATS_REPORT_ACTIVITY
enum  STATS_REPORT_ACTIVITYBYROLE
enum  STATS_REPORT_USER_ACTIVITY
enum  STATS_REPORT_USER_ALLACTIVITY
enum  STATS_REPORT_USER_LOGINS
enum  STATS_REPORT_USER_VIEW
enum  STATS_REPORT_ACTIVE_COURSES
enum  STATS_REPORT_ACTIVE_COURSES_WEIGHTED
enum  STATS_REPORT_PARTICIPATORY_COURSES
enum  STATS_REPORT_PARTICIPATORY_COURSES_RW
enum  STATS_TIME_LASTWEEK
enum  STATS_TIME_LAST2WEEKS
enum  STATS_TIME_LAST3WEEKS
enum  STATS_TIME_LAST4WEEKS
enum  STATS_TIME_LAST2MONTHS
enum  STATS_TIME_LAST3MONTHS
enum  STATS_TIME_LAST4MONTHS
enum  STATS_TIME_LAST5MONTHS
enum  STATS_TIME_LAST6MONTHS
enum  STATS_TIME_LAST7MONTHS
enum  STATS_TIME_LAST8MONTHS
enum  STATS_TIME_LAST9MONTHS
enum  STATS_TIME_LAST10MONTHS
enum  STATS_TIME_LAST11MONTHS
enum  STATS_TIME_LASTYEAR
enum  STATS_MODE_GENERAL
enum  STATS_MODE_DETAILED
enum  STATS_MODE_RANKED

Functions

 stats_daily_progress ($ident)
 stats_cron_daily ($maxdays=1)
 stats_cron_weekly ()
 stats_cron_monthly ()
 stats_get_start_from ($str)
 stats_get_base_daily ($time=0)
 stats_get_base_weekly ($time=0)
 stats_get_base_monthly ($time=0)
 stats_get_next_day_start ($time)
 stats_get_next_week_start ($time)
 stats_get_next_month_start ($time)
 stats_clean_old ()
 stats_get_parameters ($time, $report, $courseid, $mode, $roleid=0)
 stats_get_view_actions ()
 stats_get_post_actions ()
 stats_get_action_names ($str)
 stats_get_time_options ($now, $lastweekend, $lastmonthend, $earliestday, $earliestweek, $earliestmonth)
 stats_get_report_options ($courseid, $mode)
 stats_fix_zeros ($stats, $timeafter, $timestr, $line2=true, $line3=false)
 stats_compare_times ($a, $b)
 stats_check_uptodate ($courseid=0)

Enumeration Type Documentation

Definition at line 71 of file statslib.php.

Definition at line 70 of file statslib.php.

Definition at line 72 of file statslib.php.

Definition at line 42 of file statslib.php.

Definition at line 43 of file statslib.php.

Definition at line 32 of file statslib.php.

Definition at line 33 of file statslib.php.

THESE CONSTANTS ARE USED FOR THE REPORTING PAGE.

Definition at line 29 of file statslib.php.

Definition at line 44 of file statslib.php.

Definition at line 45 of file statslib.php.

Definition at line 30 of file statslib.php.

Definition at line 36 of file statslib.php.

Definition at line 37 of file statslib.php.

Definition at line 38 of file statslib.php.

Definition at line 39 of file statslib.php.

Definition at line 31 of file statslib.php.

Definition at line 65 of file statslib.php.

Definition at line 66 of file statslib.php.

Definition at line 54 of file statslib.php.

Definition at line 49 of file statslib.php.

Definition at line 56 of file statslib.php.

Definition at line 50 of file statslib.php.

Definition at line 57 of file statslib.php.

Definition at line 51 of file statslib.php.

Definition at line 58 of file statslib.php.

Definition at line 59 of file statslib.php.

Definition at line 62 of file statslib.php.

Definition at line 63 of file statslib.php.

Definition at line 64 of file statslib.php.

Definition at line 48 of file statslib.php.

Definition at line 67 of file statslib.php.


Function Documentation

stats_check_uptodate ( courseid = 0)

Definition at line 1439 of file statslib.php.

Here is the call graph for this function:

Remove old stats data

Definition at line 1000 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

stats_compare_times ( a,
b 
)

Definition at line 1432 of file statslib.php.

stats_cron_daily ( maxdays = 1)

Execute daily statistics gathering

Parameters:
int$maxdaysmaximum number of days to be processed
Returns:
boolean success

Grab this execution as last one

find out if any logs available for this day

process login info first

now get course total enrolments (roleid==0) - except frontpage

frontapge(==site) enrolments total

Default frontpage role enrolments are all site users (not deleted)

individual user stats (including not-logged-in) in each course, this is slow - reuse this data if possible

how many view/post actions in each course total

how many view actions for each course+role - excluding guests and frontpage

how many view actions from guests only in each course - excluding frontpage normal users may enter course with temporary guest access too

how many view actions for each role on frontpage - excluding guests, not-logged-in and default frontpage role

how many view actions for default frontpage role on frontpage only

how many view actions for guests or not-logged-in on frontpage

Definition at line 102 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Execute monthly statistics gathering

Returns:
boolean success

process login info first

now enrolments averages

activity read/write averages

user read/write averages

Definition at line 722 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Execute weekly statistics gathering

Returns:
boolean success

process login info first

now enrolments averages

activity read/write averages

user read/write averages

Definition at line 594 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

stats_daily_progress ( ident)

Print daily cron progress

Parameters:
string$ident

Definition at line 78 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

stats_fix_zeros ( stats,
timeafter,
timestr,
line2 = true,
line3 = false 
)

Definition at line 1371 of file statslib.php.

Here is the call graph for this function:

Definition at line 1231 of file statslib.php.

Here is the caller graph for this function:

stats_get_base_daily ( time = 0)

Start of day

Parameters:
int$timetimestamp
Returns:
start of day

Definition at line 881 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

stats_get_base_monthly ( time = 0)

Start of month

Parameters:
int$timetimestamp
Returns:
start of month

Definition at line 928 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

stats_get_base_weekly ( time = 0)

Start of week

Parameters:
int$timetimestamp
Returns:
start of week

Definition at line 903 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Start of next day

Parameters:
int$timetimestamp
Returns:
start of next day

Definition at line 954 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Start of next month

Parameters:
int$timetimestamp
Returns:
start of next month

Definition at line 986 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Start of next week

Parameters:
int$timetimestamp
Returns:
start of next week

Definition at line 970 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

stats_get_parameters ( time,
report,
courseid,
mode,
roleid = 0 
)

Definition at line 1020 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1227 of file statslib.php.

stats_get_report_options ( courseid,
mode 
)

Definition at line 1327 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Return starting date of stats processing

Parameters:
string$strname of table - daily, weekly or monthly
Returns:
int timestamp

Definition at line 853 of file statslib.php.

Here is the caller graph for this function:

stats_get_time_options ( now,
lastweekend,
lastmonthend,
earliestday,
earliestweek,
earliestmonth 
)

Definition at line 1262 of file statslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1223 of file statslib.php.

 All Data Structures Namespaces Files Functions Variables Enumerations