From ffa245f188c2e8ed87c71a53560cadf2aa25b26d Mon Sep 17 00:00:00 2001 From: Artem Andreev Date: Fri, 17 Sep 2010 18:17:10 +0400 Subject: [PATCH] Fixed bug with first after login access to attendance --- locallib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/locallib.php b/locallib.php index 8e1dd22..bcd67bd 100644 --- a/locallib.php +++ b/locallib.php @@ -434,11 +434,12 @@ function print_filter_controls($url, $id, $sort=NULL, $printselector=WITHOUT_SEL $group = optional_param('group', -2, PARAM_INT); if ($group > -2) { - if (!array_key_exists('attsessiontype', $SESSION)) { - $SESSION->attsessiontype = array(); - } $SESSION->attsessiontype[$cm->course] = $group; + } elseif (!array_key_exists('attsessiontype', $SESSION)) { + $SESSION->attsessiontype = array(); + $SESSION->attsessiontype[$cm->course] = -1; } + if ($group == -1) { $currentgroup = $group; unset($SESSION->activegroup[$cm->course][VISIBLEGROUPS][$cm->groupingid]);