mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 11:26:41 +02:00
MDL-80917 core_backup: Clear restored course cache
This commit is contained in:
parent
328b48ebc5
commit
34492bec74
1 changed files with 4 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
||||||
namespace core\task;
|
namespace core\task;
|
||||||
|
|
||||||
use async_helper;
|
use async_helper;
|
||||||
|
use cache_helper;
|
||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die();
|
defined('MOODLE_INTERNAL') || die();
|
||||||
|
|
||||||
|
@ -207,6 +208,9 @@ class asynchronous_copy_task extends adhoc_task {
|
||||||
fulldelete($backupbasepath);
|
fulldelete($backupbasepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rebuild_course_cache($restorerecord->itemid, true);
|
||||||
|
cache_helper::purge_by_event('changesincourse');
|
||||||
|
|
||||||
$duration = time() - $started;
|
$duration = time() - $started;
|
||||||
mtrace('Course copy: Copy completed in: ' . $duration . ' seconds');
|
mtrace('Course copy: Copy completed in: ' . $duration . ' seconds');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue