[LON-CAPA-cvs] cvs: loncom /interface slotrequest.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 30 Jun 2006 04:28:18 -0000
albertel Fri Jun 30 00:28:18 2006 EDT
Modified files:
/loncom/interface slotrequest.pm
Log:
- BUG#4892 slots restricted ato a group weren't working
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.67 loncom/interface/slotrequest.pm:1.68
--- loncom/interface/slotrequest.pm:1.67 Thu Jun 22 10:53:15 2006
+++ loncom/interface/slotrequest.pm Fri Jun 30 00:28:18 2006
@@ -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 @@
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");