diff --git a/backup/restorelib.php b/backup/restorelib.php index a7470fe824d..734bc07f5d9 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -4139,6 +4139,8 @@ define('RESTORE_GROUPS_GROUPINGS', 3); $status = false; } } + /// Finally, calculate modinfo cache. + rebuild_course_cache($restore->course_id); } @@ -7517,6 +7519,8 @@ define('RESTORE_GROUPS_GROUPINGS', 3); } //Now, if all is OK, adjust the instance field in course_modules !! + //this also calculates the final modinfo information so, after this, + //code needing it can be used (like role_assignments. MDL-13740) if ($status) { if (!defined('RESTORE_SILENTLY')) { echo "