--- loncom/interface/spreadsheet/lonspreadsheet.pm 2003/08/17 18:50:12 1.20 +++ loncom/interface/spreadsheet/lonspreadsheet.pm 2003/09/16 15:41:16 1.24 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.20 2003/08/17 18:50:12 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.24 2003/09/16 15:41:16 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -54,6 +54,8 @@ built-in functions. package Apache::lonspreadsheet; use strict; +use warnings FATAL=>'all'; +no warnings 'uninitialized'; use Apache::classcalc(); use Apache::studentcalc(); use Apache::assesscalc(); @@ -103,9 +105,8 @@ sub file_dialogs { if ($save_status ne 'ok') { $message .= "An error occurred while saving the spreadsheet". "There error is:".$save_status; - return $result; } else { - $message .= "Spreadsheet saved as ".$ENV{'form.savefilename'}; + $message .= "Spreadsheet saved as ".$spreadsheet->filename(); } } elsif (exists($ENV{'form.newformula'}) && exists($ENV{'form.cell'}) && @@ -165,9 +166,13 @@ END } $load_dialog .= '>'.$sheetfilename."\n"; } - $load_dialog .= " \n\n"; + $load_dialog .= "\n \n\n"; # $result .=< + File Dialogs + --> @@ -180,6 +185,9 @@ END
+ END return ($result,$message); } @@ -451,18 +459,18 @@ END $r->print(''. ''); } -# if ($allowed_to_view) { -# $r->print(''. -# &Apache::loncommon::help_open_topic("Spreadsheet_About", -# 'Spreadsheet Help'). -# ''); -# } -# if ($allowed_to_edit) { -# $r->print(''. -# &Apache::loncommon::help_open_topic("Spreadsheet_Editing", -# 'Editing Help'). -# ''); -# } + if ($allowed_to_view) { + $r->print(''. + &Apache::loncommon::help_open_topic("Spreadsheet_About", + 'Spreadsheet Help'). + ''); + } + if ($allowed_to_edit) { + $r->print(''. + &Apache::loncommon::help_open_topic("Spreadsheet_Editing", + 'Editing Help'). + ''); + } $r->print(''); # # Keep track of the filename