Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
|
Non instantiable helper class providing DB support to the @backup_plan class. More...
Static Public Member Functions | |
static | get_blockids_from_courseid ($courseid) |
Given one course id, return one array with all the block intances that belong to it. | |
static | get_blockids_from_moduleid ($moduleid) |
Given one course module id, return one array with all the block intances that belong to it. | |
static | get_courseformat_from_courseid ($courseid) |
Given one course id, return its format in DB. | |
static | get_default_backup_filename ($format, $type, $id, $users, $anonymised, $useidonly=false, $files=true) |
Returns the default backup filename, based in passed params. | |
static | get_mnet_localhost_wwwroot () |
Return the wwwroot of the $CFG->mnet_localhost_id host caching it along the request. | |
static | get_modules_from_sectionid ($sectionid) |
Given one section id, return one array with all the course modules that belong to it. | |
static | get_sections_from_courseid ($courseid) |
Given one course id, return one array with all the course_sections belonging to it. | |
static | get_theme_from_courseid ($courseid) |
Given a course id, returns its theme. | |
static | require_gradebook_backup ($courseid, $backupid) |
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. | |
Non instantiable helper class providing DB support to the @backup_plan class.
This class contains various static methods available for all the DB operations performed by the @backup_plan (and builder) classes
TODO: Finish phpdocs
|
static |
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)
string | $format | One of backup\FORMAT_ |
string | $type | One of backup\TYPE_ |
int | $courseid,/$sectionid/$cmid | |
bool | $users | Should be true is users were included in the backup |
bool | $anonymised | Should be true is user information was anonymized. |
bool | $useidonly | only use the ID in the file name |
string | The filename to use |
|
static |
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
int | $courseid |
string | Name of course theme |