From 7e7715fb6b183842ee2a282a231b9f8edf35ecd7 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Wed, 29 Oct 2014 13:52:29 +0800 Subject: [PATCH] MDL-47796 mod_data: Fix display of group records. When viewing entries as a teacher in separate group mode, changing the group would result in random entries being shown. --- mod/data/view.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/data/view.php b/mod/data/view.php index 41dfb1fd87a..5f2071ccb6e 100644 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -331,8 +331,9 @@ echo $OUTPUT->header(); -/// Check to see if groups are being used here - $currentgroup = groups_get_activity_group($cm); + // Check to see if groups are being used here. + // We need the most up to date current group value. Make sure it is updated at this point. + $currentgroup = groups_get_activity_group($cm, true); $groupmode = groups_get_activity_groupmode($cm); $canmanageentries = has_capability('mod/data:manageentries', $context); // If a student is not part of a group and seperate groups is enabled, we don't