MDL-18177 backup: adding PHPdocs blocks

This commit is contained in:
Tim Price 2015-01-09 11:37:58 +11:00
parent d7891c83dd
commit e1de40f7f7
5 changed files with 32 additions and 6 deletions

View File

@ -127,10 +127,20 @@ class condition extends \core_availability\condition {
return $this->groupid ? '#' . $this->groupid : 'any';
}
/**
* Include this condition only if we are including groups in restore, or
* if it's a generic 'same activity' one.
*
* @param int $restoreid The restore Id.
* @param int $courseid The ID of the course.
* @param base_logger $logger The logger being used.
* @param string $name Name of item being restored.
* @param base_task $task The task being performed.
*
* @return Integer groupid
*/
public function include_after_restore($restoreid, $courseid, \base_logger $logger,
$name, \base_task $task) {
// Include this condition only if we are including groups in restore, or
// if it's a generic 'any group' one.
return !$this->groupid || $task->get_setting_value('groups');
}

View File

@ -158,10 +158,20 @@ class condition extends \core_availability\condition {
}
}
/**
* Include this condition only if we are including groups in restore, or
* if it's a generic 'same activity' one.
*
* @param int $restoreid The restore Id.
* @param int $courseid The ID of the course.
* @param base_logger $logger The logger being used.
* @param string $name Name of item being restored.
* @param base_task $task The task being performed.
*
* @return Integer groupid
*/
public function include_after_restore($restoreid, $courseid, \base_logger $logger,
$name, \base_task $task) {
// Include this condition only if we are including groups in restore, or
// if it's a generic 'same activity' one.
return !$this->groupingid || $task->get_setting_value('groups');
}

View File

@ -68,6 +68,8 @@ class backup_users_setting extends backup_generic_setting {}
/**
* root setting to control if backup will include group information
* depends on @backup_users_setting
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_groups_setting extends backup_generic_setting {
}

View File

@ -46,6 +46,8 @@ class restore_users_setting extends restore_generic_setting {}
/**
* root setting to control if restore will create groups/grouping information.
* depends on @restore_users_setting
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class restore_groups_setting extends restore_generic_setting {
}

View File

@ -33,8 +33,10 @@ defined('MOODLE_INTERNAL') || die();
*/
class restore_assign_activity_structure_step extends restore_activity_structure_step {
// Store whether submission details should be included. Details may not be included if the
// this is a team submission, but groups/grouping information was not included in the backup.
/**
* Store whether submission details should be included. Details may not be included if the
* this is a team submission, but groups/grouping information was not included in the backup.
*/
protected $includesubmission = true;
/**