mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-14060 fixed cm caching in forum cron; merged from MOODLE_19_STABLE
This commit is contained in:
parent
741478495e
commit
9db5d080f4
@ -316,6 +316,13 @@ function forum_cron() {
|
||||
$userto->canpost = array();
|
||||
$userto->tracking = array();
|
||||
|
||||
// reset the caches
|
||||
foreach ($coursemodules as $forumid=>$unused) {
|
||||
$coursemodules[$forumid]->cache = new object();
|
||||
$coursemodules[$forumid]->cache->caps = array();
|
||||
unset($coursemodules[$forumid]->uservisible);
|
||||
}
|
||||
|
||||
foreach ($posts as $pid => $post) {
|
||||
|
||||
// Set up the environment for the post, discussion, forum, course
|
||||
|
Loading…
x
Reference in New Issue
Block a user