version 1.31.2.1, 2004/02/24 21:03:09
|
version 1.37, 2004/04/26 14:06:00
|
Line 240 sub handler {
|
Line 240 sub handler {
|
# Get query string for limited number of parameters |
# Get query string for limited number of parameters |
# |
# |
&Apache::loncommon::get_unprocessed_cgi |
&Apache::loncommon::get_unprocessed_cgi |
($ENV{'QUERY_STRING'},['sname','sdomain','usymb','filename','recalc']); |
($ENV{'QUERY_STRING'},['sname','sdomain','usymb','filename','recalc', |
|
'output_format','not_first_run']); |
# |
# |
# Deal with restricted student permissions |
# Deal with restricted student permissions |
# |
# |
Line 367 sub handler {
|
Line 368 sub handler {
|
</script> |
</script> |
ENDSCRIPT |
ENDSCRIPT |
} |
} |
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href => $r->uri, |
|
title => 'Spreadsheet', |
|
text => 'Spreadsheet', |
|
faq => 134, |
|
bug => 'Spreadsheet'}); |
$r->print('</head>'.&Apache::loncommon::bodytag('Grades Spreadsheet'). |
$r->print('</head>'.&Apache::loncommon::bodytag('Grades Spreadsheet'). |
|
&Apache::lonhtmlcommon::breadcrumbs(undef,'Spreadsheet'). |
'<form action="'.$r->uri.'" name="sheet" method="post">'); |
'<form action="'.$r->uri.'" name="sheet" method="post">'); |
$r->print(&hiddenfield('sname' ,$ENV{'form.sname'}). |
$r->print(&hiddenfield('sname' ,$ENV{'form.sname'}). |
&hiddenfield('sdomain',$ENV{'form.sdomain'}). |
&hiddenfield('sdomain',$ENV{'form.sdomain'}). |
Line 391 ENDSCRIPT
|
Line 400 ENDSCRIPT
|
&Apache::loncoursedata::delete_caches($ENV{'requres.course.id'}); |
&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('spreadsheet expired: entire course'); |
# expire ALL spreadsheets |
# expire ALL spreadsheets |
&Apache::lonnet::expirespread('','','studentcalc'); |
&Apache::lonnet::expirespread('','','studentcalc'); |
&Apache::lonnet::expirespread('','','assesscalc'); |
&Apache::lonnet::expirespread('','','assesscalc'); |
|
$r->print('<h3>'. |
|
&mt('Expired spreadsheet caches for all students'). |
|
'</h3>'); |
} elsif ($ENV{'form.recalc'} =~ /^symb:/) { |
} elsif ($ENV{'form.recalc'} =~ /^symb:/) { |
# expire for all students on this symb |
# expire for all students on this symb |
my ($symb) = ($ENV{'form.recalc'} =~ /^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('','','assesscalc',$symb); |
&Apache::lonnet::expirespread('','','studentcalc'); |
&Apache::lonnet::expirespread('','','studentcalc'); |
|
$r->print('<h3>'. |
|
&mt('Expired spreadsheet caches for all students for symb [_1]', |
|
$symb). |
|
'</h3>'); |
} elsif ($ENV{'form.recalc'} =~ /^student:/) { |
} elsif ($ENV{'form.recalc'} =~ /^student:/) { |
# expire all assessment spreadsheets for this user |
# expire all assessment spreadsheets for this user |
my ($sname,$sdom) = ($ENV{'form.recalc'}=~/^student:(.*):(.*)$/); |
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)) { |
if (defined($sname) && defined($sdom)) { |
&Apache::lonnet::expirespread($sname,$sdom,'assesscalc'); |
&Apache::lonnet::expirespread($sname,$sdom,'assesscalc'); |
&Apache::lonnet::expirespread($sname,$sdom,'studentcalc'); |
&Apache::lonnet::expirespread($sname,$sdom,'studentcalc'); |
|
$r->print('<h3>'. |
|
&mt('Expired spreadsheet caches for student [_1]', |
|
$sname.'@'.$sdom). |
|
'</h3>'); |
} |
} |
} |
} |
} |
} |