--- loncom/interface/Attic/lonspreadsheet.pm 2002/09/10 21:11:23 1.100.2.2
+++ loncom/interface/Attic/lonspreadsheet.pm 2002/09/27 20:41:25 1.100.4.2
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.100.2.2 2002/09/10 21:11:23 matthew Exp $
+# $Id: lonspreadsheet.pm,v 1.100.4.2 2002/09/27 20:41:25 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -822,7 +822,7 @@ sub sett {
# Deal with the normal cells
foreach (keys(%f)) {
- if (($f{$_}) && ($_!~/template\_/)) {
+ if (exists($f{$_}) && ($_!~/template\_/)) {
my $matches=($_=~/^$pattern(\d+)/);
if (($matches) && ($1)) {
unless ($f{$_}=~/^\!/) {
@@ -1187,9 +1187,14 @@ sub rown {
if ($vl eq '') {
$vl='#';
}
- $rowdata.=
- '
'.$vl.
- ' | ';
+ $rowdata.='';
+ if ($ENV{'request.role'} =~ /^st\./) {
+ $rowdata.=$vl;
+ } else {
+ $rowdata.=''.
+ $vl.'';
+ }
+ $rowdata.=' | ';
} else {
$rowdata.=' '.$vl.' | ';
}
@@ -2461,6 +2466,11 @@ sub handler {
return OK;
}
+ if ($ENV{'request.role'} =~ /^st\./) {
+ delete $ENV{'form.unewfield'} if (exists($ENV{'form.unewfield'}));
+ delete $ENV{'form.unewformula'} if (exists($ENV{'form.unewformula'}));
+ }
+
# ---------------------------------------------------- Global directory configs
$includedir=$r->dir_config('lonIncludes');
@@ -2506,7 +2516,8 @@ $tmpdir=$r->dir_config('lonDaemons').'/t
# --------------------------------------------------------------- Screen output
$r->print('LON-CAPA Spreadsheet');
- $r->print(<print(<
function celledit(cn,cf) {
@@ -2532,6 +2543,7 @@ $tmpdir=$r->dir_config('lonDaemons').'/t
ENDSCRIPT
+ }
$r->print(''.
'
'.
'LON-CAPA Spreadsheet
'.