See Release Notes
Long Term Support Release
(no description)
Copyright: | 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 288 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
backup_plan_dbops:: (9 methods):
get_blockids_from_moduleid()
get_blockids_from_courseid()
get_modules_from_sectionid()
get_sections_from_courseid()
get_courseformat_from_courseid()
get_theme_from_courseid()
get_mnet_localhost_wwwroot()
get_default_backup_filename()
require_gradebook_backup()
Class: backup_plan_dbops - X-Ref
Non instantiable helper class providing DB support to the @backup_plan classget_blockids_from_moduleid($moduleid) X-Ref |
Given one course module id, return one array with all the block intances that belong to it |
get_blockids_from_courseid($courseid) X-Ref |
Given one course id, return one array with all the block intances that belong to it |
get_modules_from_sectionid($sectionid) X-Ref |
Given one section id, return one array with all the course modules that belong to it |
get_sections_from_courseid($courseid) X-Ref |
Given one course id, return one array with all the course_sections belonging to it |
get_courseformat_from_courseid($courseid) X-Ref |
Given one course id, return its format in DB |
get_theme_from_courseid($courseid) X-Ref |
Given a course id, returns its theme. This can either be the course theme or (if not specified in course) the category, site theme. User, session, and inherited-from-mnet themes cannot have backed-up per course data. This is course-related data so it must be in a course theme specified as part of the course structure param: int $courseid return: string Name of course theme |
get_mnet_localhost_wwwroot() X-Ref |
Return the wwwroot of the $CFG->mnet_localhost_id host caching it along the request |
get_default_backup_filename($format, $type, $id, $users, $anonymised,$useidonly = false, $files = true) X-Ref |
Returns the default backup filename, based in passed params. Default format is (see MDL-22145) backup word - format - type - name - date - info . mbz where name is variable (course shortname, section name/id, activity modulename + cmid) and info can be (nu = no user info, an = anonymized). The last param $useidasname, defaulting to false, allows to replace the course shortname by the course id (used by automated backups, to avoid non-ascii chars in OS filesystem) param: string $format One of backup::FORMAT_ param: string $type One of backup::TYPE_ param: int $courseid/$sectionid/$cmid param: bool $users Should be true is users were included in the backup param: bool $anonymised Should be true is user information was anonymized. param: bool $useidonly only use the ID in the file name return: string The filename to use |
require_gradebook_backup($courseid, $backupid) X-Ref |
Returns a flag indicating the need to backup gradebook elements like calculated grade items and category visibility If all activity related grade items are being backed up we can also backup calculated grade items and categories |