MDL-28180 backup - set excluded activities for any non-course operation

This commit is contained in:
Eloy Lafuente (stronk7)
2011-12-12 00:30:58 +01:00
parent f89a83b87b
commit 184acafab6
3 changed files with 17 additions and 0 deletions
@@ -293,6 +293,14 @@ class backup_controller extends backup implements loggable {
// Basic/initial prevention against time/memory limits
set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
raise_memory_limit(MEMORY_EXTRA);
// If this is not a course backup, inform the plan we are not
// including all the activities for sure. This will affect any
// task/step executed conditionally to stop including information
// for section and activity backup. MDL-28180.
if ($this->get_type() !== backup::TYPE_1COURSE) {
$this->log('notifying plan about excluded activities by type', backup::LOG_DEBUG);
$this->plan->set_excluding_activities();
}
return $this->plan->execute();
}