MDL-14060 fixed cm caching in forum cron; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2008-03-27 08:49:25 +00:00
parent 741478495e
commit 9db5d080f4

View File

@ -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