diff --git a/availability/condition/group/classes/condition.php b/availability/condition/group/classes/condition.php index 3057a110260..46e3934f7b0 100644 --- a/availability/condition/group/classes/condition.php +++ b/availability/condition/group/classes/condition.php @@ -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'); } diff --git a/availability/condition/grouping/classes/condition.php b/availability/condition/grouping/classes/condition.php index fa3b31fa0fb..1fdd928c117 100644 --- a/availability/condition/grouping/classes/condition.php +++ b/availability/condition/grouping/classes/condition.php @@ -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'); } diff --git a/backup/moodle2/backup_settingslib.php b/backup/moodle2/backup_settingslib.php index 9bdc3927e71..82e2f2d0813 100644 --- a/backup/moodle2/backup_settingslib.php +++ b/backup/moodle2/backup_settingslib.php @@ -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 { } diff --git a/backup/moodle2/restore_settingslib.php b/backup/moodle2/restore_settingslib.php index 9ef784db877..bc8d616f55c 100644 --- a/backup/moodle2/restore_settingslib.php +++ b/backup/moodle2/restore_settingslib.php @@ -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 { } diff --git a/mod/assign/backup/moodle2/restore_assign_stepslib.php b/mod/assign/backup/moodle2/restore_assign_stepslib.php index 1a6bba36672..74c8bacd314 100644 --- a/mod/assign/backup/moodle2/restore_assign_stepslib.php +++ b/mod/assign/backup/moodle2/restore_assign_stepslib.php @@ -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; /**