Skip to content

Commit

Permalink
MBS-9329: Fix restore
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-csg committed Aug 30, 2024
1 parent de2d0da commit b31b788
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions backup/moodle2/restore_floatingbutton_block_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,8 @@ public function after_restore() {
if ($moduleid) {
$config->cmid[$key] = 'cmid=' . $moduleid->newitemid;
} else {
try {
$modinfo->get_cm($config->cmid);
} catch (Exception $e) {
$modinfo->cmid = null;
if (!isset($modinfo->cms[$id])) {
$config->cmid[$key] = null;
}
}
}
Expand Down

0 comments on commit b31b788

Please sign in to comment.