| [ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
class block_recent_activity
| Copyright: | 1999 onwards Martin Dougiamas {@link http://moodle.com} |
| License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| File Size: | 309 lines (12 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
block_recent_activity:: (9 methods):
init()
get_content()
get_timestart()
get_recent_enrolments()
get_structural_changes()
get_modules_recent_activity()
applicable_formats()
cron()
migrate_logs()
Class: block_recent_activity - X-Ref
class block_recent_activity| init() X-Ref |
| Initialises the block |
| get_content() X-Ref |
| Returns the content object return: stdObject |
| get_timestart() X-Ref |
| Returns the time since when we want to show recent activity For guest users it is 2 days, for registered users it is the time of last access to the course return: int |
| get_recent_enrolments() X-Ref |
| Returns all recent enrolments. This function previously used get_recent_enrolments located in lib/deprecatedlib.php which would return an empty array which was identified in MDL-36993. The use of this function outside the deprecated lib was removed in MDL-40649. return: array array of entries from {user} table |
| get_structural_changes() X-Ref |
| Returns list of recent changes in course structure It includes adding, editing or deleting of the resources or activities Excludes changes on modules without a view link (i.e. labels), and also if activity was both added and deleted return: array array of changes. Each element is an array containing attributes: |
| get_modules_recent_activity() X-Ref |
| Returns list of recent activity within modules For each used module type executes callback MODULE_print_recent_activity() return: array array of pairs moduletype => content |
| applicable_formats() X-Ref |
| Which page types this block may appear on. return: array page-type prefix => true/false. |
| cron() X-Ref |
| Remove old entries from table block_recent_activity |
| migrate_logs($course) X-Ref |
| Migrates entries from table {log} into {block_recent_activity} We only migrate logs for the courses that actually have recent activity block and that are being viewed within COURSE_MAX_RECENT_PERIOD time after the upgrade. The presence of entry in {block_recent_activity} with the cmid=0 indicates that the course needs log migration. Those entries were installed in db/upgrade.php when the table block_recent_activity was created. param: stdClass $course |
| Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |