--- loncom/interface/lonprintout.pm 2004/04/30 17:50:29 1.297 +++ loncom/interface/lonprintout.pm 2004/05/06 06:45:13 1.300 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.297 2004/04/30 17:50:29 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.300 2004/05/06 06:45:13 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -676,7 +676,7 @@ sub get_textwidth { sub unsupported { my $currentURL=shift; my $result.='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: '; - if ($currentURL=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) { + if ($currentURL=~/\/(aboutme|syllabus|bulletinboard)$/) { $result.='\textbf{'.$1.'}'; } elsif ($currentURL=~/\/ext\//) { $result.=' \strut \\\\ THIS IS EXTERNAL RESOURCE WITH URL \strut \\\\ '.$currentURL.' '; @@ -754,6 +754,7 @@ ENDPART } $selectionmade = 1; if ($currentURL=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { + &Apache::lonnet::logthis("II AMAM IN A WRONG PLACE"); my $rndseed=time; my $texversion=''; if ($helper->{'VARS'}->{'ANSWER_TYPE'} ne 'only') { @@ -876,14 +877,16 @@ ENDPART } if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;} $result .= '\end{document}'; - } elsif ($currentURL=~/\/smppg$/) { + } elsif ($currentURL=~/\/(smppg|syllabus)$/) { my %form; $form{'grade_target'}='tex'; $form{'textwidth'}=&get_textwidth($helper,$LaTeXwidth); $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'}; + if ($currentURL=~/\/syllabus$/) {$currentURL=~s/\/res//;} my $texversion=&Apache::lonnet::ssi($currentURL,%form); $result .= $texversion; } else { + &Apache::lonnet::logthis("IIII AMAM IN A WRONG PLACE"); $result.=&unsupported($currentURL); } } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or @@ -1035,7 +1038,7 @@ ENDPART } my $flag_latex_header_remove = 'NO'; my %moreenv = ('textwidth' => &get_textwidth($helper,$LaTeXwidth)); - my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Print Status','Class Print Status',$num_todo,'inline'); + my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Print Status','Class Print Status',$num_todo,'inline','75'); my $seed=time+($$<<16)+($$); my @allcodes; if ($old_name) { @@ -1043,6 +1046,7 @@ ENDPART @allcodes=split(',',$result{$old_name}); } else { my %allcodes; + srand($seed); for (my $i=0;$i<$num_todo;$i++) { $moreenv{'CODE'}=&get_CODE(\%allcodes,$i,$seed,'6'); } @@ -1244,7 +1248,6 @@ sub num_to_letters { sub get_CODE { my ($all_codes,$num,$seed,$size)=@_; my $max='1'.'0'x$size; - srand($seed); my $newcode; while(1) { $newcode=sprintf("%06d",int(rand($max)));