Moodle  2.2.1
http://www.collinsharper.com
backup_plan_dbops Class Reference
Inheritance diagram for backup_plan_dbops:
Collaboration diagram for backup_plan_dbops:

Static Public Member Functions

static get_blockids_from_moduleid ($moduleid)
static get_blockids_from_courseid ($courseid)
static get_modules_from_sectionid ($sectionid)
static get_sections_from_courseid ($courseid)
static get_courseformat_from_courseid ($courseid)
static get_theme_from_courseid ($courseid)
static get_mnet_localhost_wwwroot ()
static get_default_backup_filename ($format, $type, $id, $users, $anonymised, $useidasname=false)
static require_gradebook_backup ($courseid, $backupid)

Detailed Description

Non instantiable helper class providing DB support to the class

This class contains various static methods available for all the DB operations performed by the (and builder) classes

TODO: Finish phpdocs

Definition at line 33 of file backup_plan_dbops.class.php.


Member Function Documentation

static get_blockids_from_courseid ( courseid) [static]

Given one course id, return one array with all the block intances that belong to it

Definition at line 56 of file backup_plan_dbops.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static get_blockids_from_moduleid ( moduleid) [static]

Given one course module id, return one array with all the block intances that belong to it

Definition at line 38 of file backup_plan_dbops.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static get_courseformat_from_courseid ( courseid) [static]

Given one course id, return its format in DB

Definition at line 125 of file backup_plan_dbops.class.php.

Here is the caller graph for this function:

static get_default_backup_filename ( format,
type,
id,
users,
anonymised,
useidasname = false 
) [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)

Parameters:
string$formatOne of backup::FORMAT_
string$typeOne of backup::TYPE_
int$courseid,/$sectionid/$cmid
bool$usersShould be true is users were included in the backup
bool$anonymisedShould be true is user information was anonymized.
bool$useidasnametrue to use id, false to use strings (default)
Returns:
string The filename to use

Definition at line 203 of file backup_plan_dbops.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static get_mnet_localhost_wwwroot ( ) [static]

Return the wwwroot of the $CFG->mnet_localhost_id host caching it along the request

Definition at line 174 of file backup_plan_dbops.class.php.

Here is the caller graph for this function:

static get_modules_from_sectionid ( sectionid) [static]

Given one section id, return one array with all the course modules that belong to it

Definition at line 74 of file backup_plan_dbops.class.php.

Here is the caller graph for this function:

static get_sections_from_courseid ( courseid) [static]

Given one course id, return one array with all the course_sections belonging to it

Definition at line 110 of file backup_plan_dbops.class.php.

Here is the caller graph for this function:

static get_theme_from_courseid ( courseid) [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

Parameters:
int$courseid
Returns:
string Name of course theme
See also:
moodle_page::resolve_theme()

Definition at line 142 of file backup_plan_dbops.class.php.

Here is the caller graph for this function:

static require_gradebook_backup ( courseid,
backupid 
) [static]

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

Definition at line 257 of file backup_plan_dbops.class.php.

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations