[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /interface lonblockingmenu.pm lonmenu.pm
raeburn
raeburn at source.lon-capa.org
Wed Dec 28 17:41:16 EST 2011
raeburn Wed Dec 28 22:41:16 2011 EDT
Modified files:
/loncom/interface lonblockingmenu.pm lonmenu.pm
/loncom loncapa_apache.conf
Log:
- Permissions checking
- logic was backwards
- custom handler for 406 error
- include role switcher check for dcm priv
Index: loncom/interface/lonblockingmenu.pm
diff -u loncom/interface/lonblockingmenu.pm:1.2 loncom/interface/lonblockingmenu.pm:1.3
--- loncom/interface/lonblockingmenu.pm:1.2 Wed Dec 28 22:09:44 2011
+++ loncom/interface/lonblockingmenu.pm Wed Dec 28 22:41:02 2011
@@ -2,7 +2,7 @@
# Routines for configuring blocking to collaborative functions, and specific
# resources during an exam
#
-# $Id: lonblockingmenu.pm,v 1.2 2011/12/28 22:09:44 raeburn Exp $
+# $Id: lonblockingmenu.pm,v 1.3 2011/12/28 22:41:02 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -98,9 +98,11 @@
# ----------------------------------------------------------- Permissions check
- unless ((!&Apache::lonnet::allowed('dcm',$env{'request.course.id'})) ||
- (!&Apache::lonnet::allowed('dcm',$env{'request.course.id'}.
+ unless ((&Apache::lonnet::allowed('dcm',$env{'request.course.id'})) ||
+ (&Apache::lonnet::allowed('dcm',$env{'request.course.id'}.
'/'.$env{'request.course.sec'}))) {
+ $env{'user.error.msg'}=
+ "/adm/setblock:dcm:0:0:Cannot set blocking of communications in a course";
return HTTP_NOT_ACCEPTABLE;
}
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.365 loncom/interface/lonmenu.pm:1.366
--- loncom/interface/lonmenu.pm:1.365 Fri Dec 9 01:04:27 2011
+++ loncom/interface/lonmenu.pm Wed Dec 28 22:41:02 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.365 2011/12/09 01:04:27 www Exp $
+# $Id: lonmenu.pm,v 1.366 2011/12/28 22:41:02 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1656,6 +1656,7 @@
'/adm/populate' => 'cst',
'/adm/trackstudent' => 'vsa',
'/adm/statistics' => 'vgr',
+ '/adm/setblock' => 'dcm',
};
unless ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'spreadsheet') {
$privs->{'/adm/classcalc'} = 'vgr',
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.208 loncom/loncapa_apache.conf:1.209
--- loncom/loncapa_apache.conf:1.208 Wed Dec 28 21:49:41 2011
+++ loncom/loncapa_apache.conf Wed Dec 28 22:41:16 2011
@@ -1,7 +1,7 @@
##
## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
##
-## $Id: loncapa_apache.conf,v 1.208 2011/12/28 21:49:41 raeburn Exp $
+## $Id: loncapa_apache.conf,v 1.209 2011/12/28 22:41:16 raeburn Exp $
##
#
@@ -1253,6 +1253,7 @@
SetHandler perl-script
PerlHandler Apache::lonblockingmenu
ErrorDocument 403 /adm/login
+ErrorDocument 406 /adm/roles
ErrorDocument 500 /adm/errorhandler
</Location>
More information about the LON-CAPA-cvs
mailing list