version 1.568.2.9, 2010/08/04 22:23:26
|
version 1.568.2.10, 2010/11/13 01:57:14
|
Line 1672 sub print_page_in_course {
|
Line 1672 sub print_page_in_course {
|
# List of recently generated print files |
# List of recently generated print files |
# |
# |
sub recently_generated { |
sub recently_generated { |
my $r=shift; |
my ($prtspool) = @_; |
my $prtspool=$r->dir_config('lonPrtDir'); |
my $output; |
|
|
my $zip_result; |
my $zip_result; |
my $pdf_result; |
my $pdf_result; |
opendir(DIR,$prtspool); |
opendir(DIR,$prtspool); |
Line 1706 sub recently_generated {
|
Line 1707 sub recently_generated {
|
if ($ext eq 'zip') { $zip_result .= $result; } |
if ($ext eq 'zip') { $zip_result .= $result; } |
} |
} |
if ($zip_result || $pdf_result) { |
if ($zip_result || $pdf_result) { |
$r->print('<hr />'); |
$output = '<hr />'; |
} |
} |
if ($zip_result) { |
if ($zip_result) { |
$r->print('<h3>'.&mt('Recently generated printout zip files')."</h3>\n" |
$output .='<h3>'.&mt('Recently generated printout zip files')."</h3>\n" |
.&Apache::loncommon::start_data_table() |
.&Apache::loncommon::start_data_table() |
.&Apache::loncommon::start_data_table_header_row() |
.&Apache::loncommon::start_data_table_header_row() |
.'<th>'.&mt('Download').'</th>' |
.'<th>'.&mt('Download').'</th>' |
Line 1717 sub recently_generated {
|
Line 1718 sub recently_generated {
|
.'<th>'.&mt('File Size (Bytes)').'</th>' |
.'<th>'.&mt('File Size (Bytes)').'</th>' |
.&Apache::loncommon::end_data_table_header_row() |
.&Apache::loncommon::end_data_table_header_row() |
.$zip_result |
.$zip_result |
.&Apache::loncommon::end_data_table() |
.&Apache::loncommon::end_data_table(); |
); |
|
} |
} |
if ($pdf_result) { |
if ($pdf_result) { |
$r->print('<h3>'.&mt('Recently generated printouts')."</h3>\n" |
$output .='<h3>'.&mt('Recently generated printouts')."</h3>\n" |
.&Apache::loncommon::start_data_table() |
.&Apache::loncommon::start_data_table() |
.&Apache::loncommon::start_data_table_header_row() |
.&Apache::loncommon::start_data_table_header_row() |
.'<th>'.&mt('Download').'</th>' |
.'<th>'.&mt('Download').'</th>' |
Line 1729 sub recently_generated {
|
Line 1729 sub recently_generated {
|
.'<th>'.&mt('File Size (Bytes)').'</th>' |
.'<th>'.&mt('File Size (Bytes)').'</th>' |
.&Apache::loncommon::end_data_table_header_row() |
.&Apache::loncommon::end_data_table_header_row() |
.$pdf_result |
.$pdf_result |
.&Apache::loncommon::end_data_table() |
.&Apache::loncommon::end_data_table(); |
); |
|
} |
} |
|
return $output; |
} |
} |
|
|
# |
# |
Line 3975 PROBTYPE
|
Line 3975 PROBTYPE
|
return $helper; |
return $helper; |
} |
} |
|
|
$r->print($helper->display()); |
my $footer; |
if ($helper->{STATE} eq 'START') { |
if ($helper->{STATE} eq 'START') { |
&recently_generated($r); |
my $prtspool=$r->dir_config('lonPrtDir'); |
|
$footer = &recently_generated($prtspool); |
} |
} |
|
$r->print($helper->display($footer)); |
&Apache::lonhelper::unregisterHelperTags(); |
&Apache::lonhelper::unregisterHelperTags(); |
|
|
return OK; |
return OK; |