--- loncom/interface/slotrequest.pm 2006/06/22 14:53:15 1.67 +++ loncom/interface/slotrequest.pm 2006/06/30 04:28:18 1.68 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for requesting to have slots added to a students record # -# $Id: slotrequest.pm,v 1.67 2006/06/22 14:53:15 albertel Exp $ +# $Id: slotrequest.pm,v 1.68 2006/06/30 04:28:18 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -675,6 +675,16 @@ sub allowed_slot { split(',',$slot->{'allowedsections'}))) { $userallowed=1; } + if (defined($env{'request.course.groups'})) { + my @groups = split(/:/,$env{'request.course.groups'}); + my @allowed_sec = split(',',$slot->{'allowedsections'}); + foreach my $group (@groups) { + if (grep {$_ eq $group} (@allowed_sec)) { + $userallowed=1; + last; + } + } + } } &Apache::lonxml::debug("$slot_name sections is $userallowed");