mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-18322: Fix debug warning on course view page when forum has grouping set
This commit is contained in:
parent
8f0632f097
commit
3ae8d0dd80
1 changed files with 5 additions and 1 deletions
|
@ -2348,7 +2348,11 @@ function forum_count_discussions($forum, $cm, $course) {
|
||||||
if (empty($CFG->enablegroupings)) {
|
if (empty($CFG->enablegroupings)) {
|
||||||
$mygroups = $modinfo->groups[0];
|
$mygroups = $modinfo->groups[0];
|
||||||
} else {
|
} else {
|
||||||
$mygroups = $modinfo->groups[$cm->groupingid];
|
if (array_key_exists($cm->groupingid, $modinfo->groups)) {
|
||||||
|
$mygroups = $modinfo->groups[$cm->groupingid];
|
||||||
|
} else {
|
||||||
|
$mygroups = false; // Will be set below
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add all groups posts
|
// add all groups posts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue