--- loncom/interface/lonprintout.pm 2005/10/31 21:48:07 1.397
+++ loncom/interface/lonprintout.pm 2005/12/06 15:01:45 1.402
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.397 2005/10/31 21:48:07 albertel Exp $
+# $Id: lonprintout.pm,v 1.402 2005/12/06 15:01:45 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -433,6 +433,7 @@ sub character_chart {
$result =~ s/&(\#252|uuml);/\\\"{u}/g;
$result =~ s/&(\#253|yacute);/\\\'{y}/g;
$result =~ s/&(\#255|yuml);/\\\"{y}/g;
+ $result =~ s/&\#295;/\\ensuremath\{\\hbar\}/g;
$result =~ s/&\#952;/\\ensuremath\{\\theta\}/g;
#Greek Alphabet
$result =~ s/&(alpha|\#945);/\\ensuremath\{\\alpha\}/g;
@@ -907,28 +908,43 @@ sub unsupported {
#
# List of recently generated print files
#
-
sub recently_generated {
my $r=shift;
my $prtspool=$r->dir_config('lonPrtDir');
- my $result;
+ my $zip_result;
+ my $pdf_result;
opendir(DIR,$prtspool);
- while (my $filename=readdir(DIR)) {
- if ($filename=~/^$env{'user.name'}\_$env{'user.domain'}\_printout\_(\d+)\_.*.pdf$/) {
- my ($cdev,$cino,$cmode,$cnlink,
- $cuid,$cgid,$crdev,$csize,
- $catime,$cmtime,$cctime,
- $cblksize,$cblocks)=stat($prtspool.'/'.$filename);
- $result.="".
- &mt('Generated [_1] ([_2] bytes)',
- &Apache::lonlocal::locallocaltime($cctime),$csize).
- '
';
- }
- }
+
+ my @files =
+ grep(/^$env{'user.name'}_$env{'user.domain'}_printout_(\d+)_.*\.(pdf|zip)$/,readdir(DIR));
closedir(DIR);
- if ($result) {
- $r->print('
Please stand by while processing your print request, this may take some time ... +
ENDPART @@ -1093,6 +1111,9 @@ ENDPART $form{'grade_target'}='answer'; $form{'answer_output_mode'}='tex'; $form{'rndseed'}=$rndseed; + if ($helper->{'VARS'}->{'probstatus'} eq 'exam') { + $form{'problemtype'}='exam'; + } $resources_printed .= $currentURL.':'; my $answer=&Apache::lonnet::ssi($currentURL,%form); if ($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') { @@ -2631,7 +2652,8 @@ STATEHTML $result .= "