version 1.23, 2003/09/05 01:06:45
|
version 1.26, 2003/09/30 15:40:09
|
Line 62 use Apache::assesscalc();
|
Line 62 use Apache::assesscalc();
|
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http); |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
|
use Apache::lonlocal; |
|
use Apache::loncoursedata(); |
use HTML::Entities(); |
use HTML::Entities(); |
|
|
## |
## |
Line 105 sub file_dialogs {
|
Line 107 sub file_dialogs {
|
if ($save_status ne 'ok') { |
if ($save_status ne 'ok') { |
$message .= "An error occurred while saving the spreadsheet". |
$message .= "An error occurred while saving the spreadsheet". |
"There error is:".$save_status; |
"There error is:".$save_status; |
return $result; |
|
} else { |
} else { |
$message .= "Spreadsheet saved as ".$ENV{'form.savefilename'}; |
$message .= "Spreadsheet saved as ".$spreadsheet->filename(); |
} |
} |
} elsif (exists($ENV{'form.newformula'}) && |
} elsif (exists($ENV{'form.newformula'}) && |
exists($ENV{'form.cell'}) && |
exists($ENV{'form.cell'}) && |
Line 209 sub handler {
|
Line 210 sub handler {
|
# HTML Header |
# HTML Header |
# |
# |
if ($r->header_only) { |
if ($r->header_only) { |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK; |
return OK; |
} |
} |
Line 298 sub handler {
|
Line 299 sub handler {
|
# |
# |
# Open page, try to prevent browser cache. |
# Open page, try to prevent browser cache. |
# |
# |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::no_cache($r); |
&Apache::loncommon::no_cache($r); |
$r->send_http_header; |
$r->send_http_header; |
|
|
Line 374 ENDSCRIPT
|
Line 375 ENDSCRIPT
|
## |
## |
## Take care of "backdoor" spreadsheet expiration / recalc stuff |
## Take care of "backdoor" spreadsheet expiration / recalc stuff |
if ($allowed_to_edit && exists($ENV{'form.recalc'})) { |
if ($allowed_to_edit && exists($ENV{'form.recalc'})) { |
|
if (exists($ENV{'form.recalc'})) { |
|
&Apache::loncoursedata::delete_caches($ENV{'requres.course.id'}); |
|
} |
if ($ENV{'form.recalc'} eq 'ilovewastingtime') { |
if ($ENV{'form.recalc'} eq 'ilovewastingtime') { |
&Apache::lonnet::logthis('ilovewastingtime'); |
&Apache::lonnet::logthis('ilovewastingtime'); |
# expire ALL spreadsheets |
# expire ALL spreadsheets |
Line 457 END
|
Line 461 END
|
# |
# |
$r->print("<table><tr>"); |
$r->print("<table><tr>"); |
if ($sheettype eq 'classcalc') { |
if ($sheettype eq 'classcalc') { |
$r->print('<td><input type="submit" value="Generate Spreadsheet" />'. |
$r->print('<td><input type="submit" value="'. |
|
&mt('Generate Spreadsheet').'" />'. |
'</td>'); |
'</td>'); |
} |
} |
if ($allowed_to_view) { |
if ($allowed_to_view) { |