[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Sat Nov 10 20:48:34 EST 2012
raeburn Sun Nov 11 01:48:34 2012 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- Fix check for editability of group bulletin boards in &can_edit_resource().
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1196 loncom/lonnet/perl/lonnet.pm:1.1197
--- loncom/lonnet/perl/lonnet.pm:1.1196 Sat Nov 10 13:58:31 2012
+++ loncom/lonnet/perl/lonnet.pm Sun Nov 11 01:48:33 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1196 2012/11/10 13:58:31 raeburn Exp $
+# $Id: lonnet.pm,v 1.1197 2012/11/11 01:48:33 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2692,15 +2692,15 @@
if ($group ne '') {
# if this is a group homepage or group bulletin board, check group privs
my $allowed = 0;
- if ($resurl =~ m{^/adm/$cdom/$cnum/$group/smppg$}) {
- if ((&Apache::lonnet::allowed('mdg',$env{'request.course.id'}.
+ if ($resurl =~ m{^/?adm/$cdom/$cnum/$group/smppg$}) {
+ if ((&allowed('mdg',$env{'request.course.id'}.
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) ||
(&allowed('mgh',$env{'request.course.id'}.'/'.$group)) || $crsedit) {
$allowed = 1;
}
- } elsif ($resurl =~ m{^/adm/$cdom/$cnum/\d+/bulletinboard$}) {
- unless ((&allowed(&Apache::lonnet::allowed('mdg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')))) ||
- (&allowed('cgb',$env{'request.course.id'}.$group)) || $crsedit) {
+ } elsif ($resurl =~ m{^/?adm/$cdom/$cnum/\d+/bulletinboard$}) {
+ if ((&allowed('mdg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) ||
+ (&allowed('cgb',$env{'request.course.id'}.'/'.$group)) || $crsedit) {
$allowed = 1;
}
}
More information about the LON-CAPA-cvs
mailing list