MDL-18177 availability: Excluding group members availability info
If setting was not enabled when backing up, exclude the availability information of group members.
This commit is contained in:
@@ -158,6 +158,13 @@ class condition extends \core_availability\condition {
|
||||
}
|
||||
}
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
public function update_after_restore($restoreid, $courseid, \base_logger $logger, $name) {
|
||||
global $DB;
|
||||
if (!$this->groupingid) {
|
||||
|
||||
Reference in New Issue
Block a user