MDL-53974 backup: Add option to backup course competencies

This commit is contained in:
Jun Pataleta 2016-04-29 18:32:06 +08:00 committed by Andrew Nicols
parent 11ee4f71a4
commit 45b9207d7e
7 changed files with 91 additions and 4 deletions

View file

@ -1585,6 +1585,21 @@ class backup_course_competencies_structure_step extends backup_structure_step {
return $wrapper;
}
/**
* Execute conditions.
*
* @return bool
*/
protected function execute_condition() {
// Do not execute if competencies are not included.
if (!$this->get_setting_value('competencies')) {
return false;
}
return true;
}
}
/**
@ -1612,6 +1627,21 @@ class backup_activity_competencies_structure_step extends backup_structure_step
return $wrapper;
}
/**
* Execute conditions.
*
* @return bool
*/
protected function execute_condition() {
// Do not execute if competencies are not included.
if (!$this->get_setting_value('competencies')) {
return false;
}
return true;
}
}
/**