[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Source view] [Print] [Project Stats]
Utility helper for automated backups run through cron.
Copyright: | 2010 Sam Hemelryk |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 662 lines (29 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
run_automated_backup($rundirective = self::RUN_ON_SCHEDULE) X-Ref |
Runs the automated backups if required |
get_backup_status_array() X-Ref |
Gets the results from the last automated backup that was run based upon the statuses of the courses that were looked at. return: array |
calculate_next_automated_backup($timezone, $now) X-Ref |
Works out the next time the automated backup should be run. param: mixed $timezone user timezone param: int $now timestamp, should not be in the past, most likely time() return: int timestamp of the next execution at server time |
launch_automated_backup($course, $starttime, $userid) X-Ref |
Launches a automated backup routine for the given course param: stdClass $course param: int $starttime param: int $userid return: bool |
outcome_from_results($results) X-Ref |
Returns the backup outcome by analysing its results. param: array $results returned by a backup return: int {@link self::BACKUP_STATUS_OK} and other constants |
remove_deleted_courses_from_schedule() X-Ref |
Removes deleted courses fromn the backup_courses table so that we don't waste time backing them up. return: int |
get_automated_backup_state($rundirective = self::RUN_ON_SCHEDULE) X-Ref |
Gets the state of the automated backup system. return: int One of self::STATE_* |
set_state_running($running = true) X-Ref |
Sets the state of the automated backup system. param: bool $running return: bool |
remove_excess_backups($course) X-Ref |
Removes excess backups from the external system and the local file system. The number of backups keep comes from $config->backup_auto_keep. param: stdClass $course object return: bool |
is_course_modified($courseid, $since) X-Ref |
Check logs to find out if a course was modified since the given time. param: int $courseid course id to check param: int $since timestamp, from which to check return: bool true if the course was modified, false otherwise. This also returns false if no readers are enabled. This is |
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |