--- loncom/interface/spreadsheet/lonspreadsheet.pm 2003/10/11 14:04:54 1.27 +++ loncom/interface/spreadsheet/lonspreadsheet.pm 2004/10/12 20:51:54 1.39 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.27 2003/10/11 14:04:54 www Exp $ +# $Id: lonspreadsheet.pm,v 1.39 2004/10/12 20:51:54 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -72,8 +72,8 @@ use HTML::Entities(); sub textfield { my ($title,$name,$value)=@_; - return "\n

$title:
". - ''; + return "\n

$title:
". + ''; } sub hiddenfield { @@ -83,7 +83,7 @@ sub hiddenfield { sub selectbox { my ($title,$name,$value,%options)=@_; - my $selout="\n

$title:
".''; foreach (sort keys(%options)) { $selout.='

'); $r->print(&hiddenfield('sname' ,$ENV{'form.sname'}). &hiddenfield('sdomain',$ENV{'form.sdomain'}). @@ -385,23 +400,35 @@ ENDSCRIPT &Apache::loncoursedata::delete_caches($ENV{'requres.course.id'}); } if ($ENV{'form.recalc'} eq 'ilovewastingtime') { - &Apache::lonnet::logthis('ilovewastingtime'); + &Apache::lonnet::logthis('spreadsheet expired: entire course'); # expire ALL spreadsheets &Apache::lonnet::expirespread('','','studentcalc'); &Apache::lonnet::expirespread('','','assesscalc'); + $r->print('

'. + &mt('Expired spreadsheet caches for all students'). + '

'); } elsif ($ENV{'form.recalc'} =~ /^symb:/) { # expire for all students on this symb my ($symb) = ($ENV{'form.recalc'} =~ /^symb:(.*)$/); - &Apache::lonnet::logthis('symb = '.$symb); + &Apache::lonnet::logthis('spreadsheet expired: symb = '.$symb); &Apache::lonnet::expirespread('','','assesscalc',$symb); &Apache::lonnet::expirespread('','','studentcalc'); + $r->print('

'. + &mt('Expired spreadsheet caches for all students for symb [_1]', + $symb). + '

'); } elsif ($ENV{'form.recalc'} =~ /^student:/) { # expire all assessment spreadsheets for this user my ($sname,$sdom) = ($ENV{'form.recalc'}=~/^student:(.*):(.*)$/); - &Apache::lonnet::logthis('student = '.$sname.':'.$sdom); + &Apache::lonnet::logthis('spreadsheet expired: student = '. + $sname.'@'.$sdom); if (defined($sname) && defined($sdom)) { &Apache::lonnet::expirespread($sname,$sdom,'assesscalc'); &Apache::lonnet::expirespread($sname,$sdom,'studentcalc'); + $r->print('

'. + &mt('Expired spreadsheet caches for student [_1]', + $sname.'@'.$sdom). + '

'); } } } @@ -446,8 +473,10 @@ ENDSCRIPT } $action_message .= '.'; } - $r->print(''. - '
'.$spreadsheet->html_header().''.$html."
\n"); + $r->print(''. + '
'. + $spreadsheet->html_header(). + ''.$html."
\n"); if ($action_message ne '') { $r->print(< @@ -466,11 +495,9 @@ END $r->rflush(); # $r->print(""); - if ($sheettype eq 'classcalc') { - $r->print(''); - } + $r->print(''); if ($allowed_to_view) { $r->print('
'. - ''. + ''. &Apache::loncommon::help_open_topic("Spreadsheet_About",