Skip to content

Commit

Permalink
Prepare backup creation routine for Moodle 4.6 and above. Remove ques…
Browse files Browse the repository at this point in the history
…tionbank backup OP from Moodle 406 onwards
  • Loading branch information
ngandrass committed Jan 13, 2025
1 parent 3f2f208 commit c49975f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Version X.X.X (YYYYMMDDXX)

- Fix opening job details modal for quizzes with single quotes in their names
- Prepare backup creation routine for Moodle 4.6 and above
- Add hint about font rendering problems to the documentation


Expand Down
6 changes: 5 additions & 1 deletion classes/BackupManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class BackupManager {
'userscompletion' => true,
'logs' => true,
'grade_histories' => true,
'questionbank' => true,
'groups' => true,
'contentbankcontent' => true,
'legacyfiles' => true,
Expand Down Expand Up @@ -207,6 +206,11 @@ protected static function initiate_backup(string $type, int $id, int $userid): o
foreach (self::BACKUP_SETTINGS as $name => $value) {
$task->get_setting($name)->set_value($value);
}

// Questions are not automatically included in Moodle 4.5 and below.
if ($CFG->branch <= 405) {
$task->get_setting('questionbank')->set_value(true);
}
}
}

Expand Down

0 comments on commit c49975f

Please sign in to comment.