diff --git a/backup/moodle2/restore_learningmap_activity_task.class.php b/backup/moodle2/restore_learningmap_activity_task.class.php index 2b8ee585..fa5a82b1 100644 --- a/backup/moodle2/restore_learningmap_activity_task.class.php +++ b/backup/moodle2/restore_learningmap_activity_task.class.php @@ -15,6 +15,7 @@ // along with Moodle. If not, see . use mod_learningmap\migrationhelper; +use mod_learningmap\cachemanager; defined('MOODLE_INTERNAL') || die(); global $CFG; @@ -24,7 +25,7 @@ * Restore class for mod_learningmap * * @package mod_learningmap - * @copyright 2021-2024, ISB Bayern + * @copyright 2021-2026, ISB Bayern * @author Stefan Hanauska * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -127,5 +128,9 @@ public function after_restore(): void { $item->placestore = json_encode($placestore); $item->course = $courseid; $DB->update_record('learningmap', $item); + + // Reset backlink cache for the course as there might be activities included + // in this learning map that need to show a new link. + cachemanager::reset_backlink_cache($courseid); } }