--- loncom/interface/Attic/lonspreadsheet.pm 2003/01/30 21:35:13 1.167 +++ loncom/interface/Attic/lonspreadsheet.pm 2003/02/13 22:22:01 1.170 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.167 2003/01/30 21:35:13 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.170 2003/02/13 22:22:01 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -262,7 +262,6 @@ ENDSCRIPT # Global directory configs # $sheet->includedir($r->dir_config('lonIncludes')); - $sheet->tmpdir($r->dir_config('lonDaemons').'/tmp/'); # # Check user permissions if (($sheet->{'type'} eq 'classcalc' ) || @@ -524,18 +523,12 @@ my %numbertimes; # Directories # my $includedir; -my $tmpdir; sub includedir { my $self = shift; $includedir = shift; } -sub tmpdir { - my $self = shift; - $tmpdir = shift; -} - my %spreadsheets; #my %loadedcaches; my %courserdatas; @@ -1744,6 +1737,7 @@ sub calcsheet { $self->sett(); my $result = $self->{'safe'}->reval('&calc();'); %{$self->{'values'}} = %{$self->{'safe'}->varglob('sheet_values')}; +# $self->logthis($self->get_errorlog()); return $result; } @@ -2540,6 +2534,7 @@ sub export_sheet_as_excel { } next if ($row_is_empty); } + $worksheet->write($rows_output,$cols_output++,$rownum); $worksheet->write($rows_output,$cols_output++,$label); if (ref($label)) { $cols_output = (scalar(@$label)); @@ -2776,7 +2771,7 @@ sub tmpwrite { $ENV{'user.domain'}.'_spreadsheet_'.$self->{'usymb'}.'_'. $self->{'filename'}; $fn=~s/\W/\_/g; - $fn=$tmpdir.$fn.'.tmp'; + $fn=$Apache::lonnet::tmpdir.$fn.'.tmp'; my $fh; if ($fh=Apache::File->new('>'.$fn)) { my %f = $self->formulas(); @@ -2795,7 +2790,7 @@ sub tmpread { $ENV{'user.domain'}.'_spreadsheet_'.$self->{'usymb'}.'_'. $self->{'filename'}; $fn=~s/\W/\_/g; - $fn=$tmpdir.$fn.'.tmp'; + $fn=$Apache::lonnet::tmpdir.$fn.'.tmp'; my $fh; my %fo=(); my $countrows=0;