Permalink
Browse files

Merge branch 'MDL-39947_23' of https://github.com/aolley/moodle into …

…MOODLE_23_STABLE
  • Loading branch information...
2 parents 61603bb + 8d148dd commit bb059c31adde2e797ecd171ef8fa86341a2843a5 @danpoltawski danpoltawski committed Jun 10, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/forum/lib.php
View
@@ -6717,7 +6717,11 @@ function forum_tp_count_forum_unread_posts($cm, $course) {
$modinfo->groups = groups_get_user_groups($course->id, $USER->id);
}
- $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
if (empty($mygroups)) {

0 comments on commit bb059c3

Please sign in to comment.