mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-46696 backup: Handle older backups not containing grade history
This commit is contained in:
parent
eb80a145c8
commit
f1272bbecd
@ -3035,6 +3035,18 @@ class restore_activity_grades_structure_step extends restore_structure_step {
|
||||
*/
|
||||
class restore_activity_grade_history_structure_step extends restore_structure_step {
|
||||
|
||||
/**
|
||||
* This step is executed only if the grade history file is present.
|
||||
*/
|
||||
protected function execute_condition() {
|
||||
$fullpath = $this->task->get_taskbasepath();
|
||||
$fullpath = rtrim($fullpath, '/') . '/' . $this->filename;
|
||||
if (!file_exists($fullpath)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function define_structure() {
|
||||
$paths = array();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user