[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/ -> statslib.php (summary)

(no description)

Copyright: 1999 onwards Martin Dougiamas {@link http://moodle.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 1850 lines (70 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 27 functions

  stats_progress()
  stats_run_query()
  stats_cron_daily()
  stats_cron_weekly()
  stats_cron_monthly()
  stats_get_start_from()
  stats_get_base_daily()
  stats_get_base_weekly()
  stats_get_base_monthly()
  stats_get_next_day_start()
  stats_get_next_week_start()
  stats_get_next_month_start()
  stats_clean_old()
  stats_get_parameters()
  stats_get_view_actions()
  stats_get_post_actions()
  stats_get_action_names()
  stats_get_time_options()
  stats_get_report_options()
  stats_fix_zeros()
  stats_compare_times()
  stats_check_uptodate()
  stats_temp_table_create()
  stats_temp_table_drop()
  stats_temp_table_setup()
  stats_temp_table_fill()
  stats_temp_table_clean()

Functions
Functions that are not part of a class:

stats_progress($ident)   X-Ref
Print daily cron progress

param: string $ident

stats_run_query($sql, $parameters = array()   X-Ref
Execute individual daily statistics queries

param: string $sql The query to run
return: boolean success

stats_cron_daily($maxdays=1)   X-Ref
Execute daily statistics gathering

param: int $maxdays maximum number of days to be processed
return: boolean success

stats_cron_weekly()   X-Ref
Execute weekly statistics gathering

return: boolean success

stats_cron_monthly()   X-Ref
Execute monthly statistics gathering

return: boolean success

stats_get_start_from($str)   X-Ref
Return starting date of stats processing

param: string $str name of table - daily, weekly or monthly
return: int timestamp

stats_get_base_daily($time=0)   X-Ref
Start of day

param: int $time timestamp
return: int start of day

stats_get_base_weekly($time=0)   X-Ref
Start of week

param: int $time timestamp
return: int start of week

stats_get_base_monthly($time=0)   X-Ref
Start of month

param: int $time timestamp
return: int start of month

stats_get_next_day_start($time)   X-Ref
Start of next day

param: int $time timestamp
return: start of next day

stats_get_next_week_start($time)   X-Ref
Start of next week

param: int $time timestamp
return: start of next week

stats_get_next_month_start($time)   X-Ref
Start of next month

param: int $time timestamp
return: start of next month

stats_clean_old()   X-Ref
Remove old stats data


stats_get_parameters($time,$report,$courseid,$mode,$roleid=0)   X-Ref
No description

stats_get_view_actions()   X-Ref
No description

stats_get_post_actions()   X-Ref
No description

stats_get_action_names($str)   X-Ref
No description

stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$earliestweek,$earliestmonth)   X-Ref
No description

stats_get_report_options($courseid,$mode)   X-Ref
No description

stats_fix_zeros($stats,$timeafter,$timestr,$line2=true,$line3=false)   X-Ref
Fix missing entries in the statistics.

This creates a dummy stat when nothing happened during a day/week/month.

param: array $stats array of statistics.
param: int $timeafter unused.
param: string $timestr type of statistics to generate (dayly, weekly, monthly).
param: boolean $line2
param: boolean $line3
return: array of fixed statistics.

stats_compare_times($a,$b)   X-Ref
No description

stats_check_uptodate($courseid=0)   X-Ref
No description

stats_temp_table_create()   X-Ref
Create temporary tables to speed up log generation


stats_temp_table_drop()   X-Ref
Deletes summary logs table for stats calculation


stats_temp_table_setup()   X-Ref
Fills the temporary stats tables with new data

This function is meant to be called once at the start of stats generation

param: int timestart timestamp of the start time of logs view
param: int timeend timestamp of the end time of logs view
return: bool success (true) or failure(false)

stats_temp_table_fill($timestart, $timeend)   X-Ref
Fills the temporary stats tables with new data

This function is meant to be called to get a new day of data

param: int timestamp of the start time of logs view
param: int timestamp of the end time of logs view
return: bool success (true) or failure(false)

stats_temp_table_clean()   X-Ref
Deletes summary logs table for stats calculation

return: bool success (true) or failure(false)



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1