version 1.395, 2005/10/30 02:24:34
|
version 1.396, 2005/10/31 21:06:35
|
Line 909 sub unsupported {
|
Line 909 sub unsupported {
|
sub recently_generated { |
sub recently_generated { |
my $r=shift; |
my $r=shift; |
my $prtspool=$r->dir_config('lonPrtDir'); |
my $prtspool=$r->dir_config('lonPrtDir'); |
$r->print('<h4>'.&mt('Recently generated printouts').'</h4>'); |
my $result; |
opendir(DIR,$prtspool); |
opendir(DIR,$prtspool); |
while (my $filename=readdir(DIR)) { |
while (my $filename=readdir(DIR)) { |
if ($filename=~/^$env{'user.name'}\_$env{'user.domain'}\_printout\_(\d+)\_.*.pdf$/) { |
if ($filename=~/^$env{'user.name'}\_$env{'user.domain'}\_printout\_(\d+)\_.*.pdf$/) { |
Line 917 sub recently_generated {
|
Line 917 sub recently_generated {
|
$cuid,$cgid,$crdev,$csize, |
$cuid,$cgid,$crdev,$csize, |
$catime,$cmtime,$cctime, |
$catime,$cmtime,$cctime, |
$cblksize,$cblocks)=stat($prtspool.'/'.$filename); |
$cblksize,$cblocks)=stat($prtspool.'/'.$filename); |
$r->print ("<a href='/prtspool/$filename'>". |
$result.="<a href='/prtspool/$filename'>". |
&mt('Generated').' '.&Apache::lonlocal::locallocaltime($cctime). |
&mt('Generated [_1] ([_2] bytes)', |
' ('.$csize.' bytes)</a><br />'); |
&Apache::lonlocal::locallocaltime($cctime),$csize). |
|
'</a><br />'; |
} |
} |
} |
} |
closedir(DIR); |
closedir(DIR); |
|
if ($result) { |
|
$r->print('<h4>'.&mt('Recently generated printouts').'</h4>'."\n". |
|
$result); |
|
} |
} |
} |
|
|
# |
# |