When the course reset is made post are deleted from mdl_forum_posts table (which is ok) but they are not deleted from mdl_forum_discussions. As a result the number of posts in the forum is such as if poste where still there. This number of post is displayed when user is entering the forum, which is very misleading.
We suggest the following fix:
in mod/forum/lib.php, in function forum_delete_userdata(...) the sql query should be:
$sql = 'DELETE FROM '.$CFG->prefix.'forum_posts, '.$CFG->prefix.'forum_discussions
USING '.$CFG->prefix.'forum_discussions ,
'.$CFG->prefix.'forum_posts ,
'.$CFG->prefix.'forum
WHERE '.$CFG->prefix.'forum_posts.discussion = '.$CFG->prefix.'forum_discussions.id AND '.$CFG->prefix.'forum.course='.$data->courseid.' AND '.$CFG->prefix.'forum.id = '.$CFG->prefix.'forum_discussions.forum';
- will be (partly) resolved by
-
MDL-7028 Course Reset fixing - meta
-
- Closed
-