mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-14270 fixed regressions - fatal error in forum code; merged from MOODLE_19_STABLE
This commit is contained in:
parent
debd3d62b3
commit
948091f460
@ -2080,7 +2080,7 @@ function forum_count_discussions($forum, $cm, $course) {
|
||||
return $cache[$course->id][$forum->id];
|
||||
}
|
||||
|
||||
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_MODULE, $cm))) {
|
||||
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_MODULE, $cm->id))) {
|
||||
return $cache[$course->id][$forum->id];
|
||||
}
|
||||
|
||||
@ -5806,7 +5806,7 @@ function forum_tp_count_forum_unread_posts($cm, $course) {
|
||||
return $readcache[$course->id][$forumid];
|
||||
}
|
||||
|
||||
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_MODULE, $cm))) {
|
||||
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_MODULE, $cm->id))) {
|
||||
return $readcache[$course->id][$forumid];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user