[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet lonspreadsheet.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Mon, 19 May 2003 14:06:19 -0000
matthew Mon May 19 10:06:19 2003 EDT
Modified files:
/loncom/interface/spreadsheet lonspreadsheet.pm
Log:
Access to assessment level spreadsheets requires 'mgr' (modify grades)
privileges.
Index: loncom/interface/spreadsheet/lonspreadsheet.pm
diff -u loncom/interface/spreadsheet/lonspreadsheet.pm:1.1 loncom/interface/spreadsheet/lonspreadsheet.pm:1.2
--- loncom/interface/spreadsheet/lonspreadsheet.pm:1.1 Fri May 16 16:55:11 2003
+++ loncom/interface/spreadsheet/lonspreadsheet.pm Mon May 19 10:06:18 2003
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.1 2003/05/16 20:55:11 matthew Exp $
+# $Id: lonspreadsheet.pm,v 1.2 2003/05/19 14:06:18 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -237,10 +237,15 @@
$spreadsheet = Apache::classcalc->new($name,$domain,$filename,undef);
} elsif ($sheettype eq 'studentcalc') {
$spreadsheet = Apache::studentcalc->new($name,$domain,$filename,undef);
- } elsif ($sheettype eq 'assesscalc' && defined($symb)) {
+ } elsif ($sheettype eq 'assesscalc' &&
+ defined($symb) &&
+ $editing_is_allowed) {
$spreadsheet = Apache::assesscalc->new($name,$domain,$filename,$symb);
} else {
- &Apache::lonnet::logthis('Unable to determine spreadsheet type');
+ return HTTP_NOT_ACCEPTABLE;
+ }
+ if (! defined($spreadsheet)) {
+ # error error - run in circles, scream and shout
return;
}
##