--- loncom/interface/Attic/lonspreadsheet.pm 2002/04/09 18:41:11 1.82
+++ loncom/interface/Attic/lonspreadsheet.pm 2002/04/10 15:30:13 1.83
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.82 2002/04/09 18:41:11 matthew Exp $
+# $Id: lonspreadsheet.pm,v 1.83 2002/04/10 15:30:13 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -774,7 +774,7 @@ sub outrowassess {
'n','o','p','q','r','s','t','u','v','w','x','y','z') {
my $fm=$f{$_.$n};
$fm=~s/[\'\"]/\&\#34;/g;
- $cols[$#cols+1]="'$_$n','$fm'".'___eq___'.$v{$_.$n};
+ push(@cols,"'$_$n','$fm'".'___eq___'.$v{$_.$n});
}
return @cols;
}
@@ -1189,7 +1189,7 @@ sub readsheet {
my $cdom=&getcdom($safeeval);
my $chome=&getchome($safeeval);
- if (! defined($fn) || $fn eq '') {
+ if (! defined($fn)) {
# There is no filename. Look for defaults in course and global, cache
unless ($fn=$defaultsheets{$cnum.'_'.$cdom.'_'.$stype}) {
my %tmphash = &Apache::lonnet::get('environment',
@@ -1203,19 +1203,6 @@ sub readsheet {
}
$defaultsheets{$cnum.'_'.$cdom.'_'.$stype}=$fn;
}
- } else {
- # We do have a filename, do a get on it.
- my %tmphash = &Apache::lonnet::get('environment',
- [$fn],
- $cdom,$cnum);
- my ($tmp) = keys(%tmphash);
- if ($tmp =~ /^(con_lost|error|no_such_host)/i) {
- # On error, grab the default filename
- $fn = 'default_'.$stype;
- } else {
- $fn = $tmphash{$fn};
- }
- $defaultsheets{$cnum.'_'.$cdom.'_'.$stype}=$fn;
}
# ---------------------------------------------------------- fn now has a value
@@ -1242,26 +1229,21 @@ sub readsheet {
} else {
$sheetxml='
$sheetxml"; + if ($sheetxml == -1) { $sheetxml='
"; + foreach (sort( keys(%f))) { + print "$_ = $f{$_}\n"; + } + print ""; } else { my $sheet=''; my %tmphash = &Apache::lonnet::dump($fn,$cdom,$cnum);