--- loncom/interface/spreadsheet/lonspreadsheet.pm 2003/09/16 15:41:16 1.24 +++ loncom/interface/spreadsheet/lonspreadsheet.pm 2003/09/30 15:40:09 1.26 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.24 2003/09/16 15:41:16 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.26 2003/09/30 15:40:09 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -62,6 +62,8 @@ use Apache::assesscalc(); use Apache::Constants qw(:common :http); use Apache::lonnet; use Apache::lonhtmlcommon; +use Apache::lonlocal; +use Apache::loncoursedata(); use HTML::Entities(); ## @@ -208,7 +210,7 @@ sub handler { # HTML Header # if ($r->header_only) { - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK; } @@ -297,7 +299,7 @@ sub handler { # # Open page, try to prevent browser cache. # - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); &Apache::loncommon::no_cache($r); $r->send_http_header; @@ -373,6 +375,9 @@ ENDSCRIPT ## ## Take care of "backdoor" spreadsheet expiration / recalc stuff 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') { &Apache::lonnet::logthis('ilovewastingtime'); # expire ALL spreadsheets @@ -456,7 +461,8 @@ END # $r->print(""); if ($sheettype eq 'classcalc') { - $r->print(''); } if ($allowed_to_view) {
'. + $r->print(''. '