--- loncom/interface/lonprintout.pm 2001/12/19 17:17:46 1.11 +++ loncom/interface/lonprintout.pm 2002/01/11 17:06:56 1.12 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.11 2001/12/19 17:17:46 albertel Exp $ +# $Id: lonprintout.pm,v 1.12 2002/01/11 17:06:56 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -101,7 +101,29 @@ ENDPART } my $file=&Apache::lonnet::filelocation("",$ENV{'form.url'}); my $filecontents=&Apache::lonnet::getfile($file); - $result = &Apache::lonxml::xmlparse('tex',$filecontents,'',%mystyle); + $_ = $file; + if (/\.problem/) { + my $default=&Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm'); + if ($default == -1) { + &Apache::lonxml::error("Unable to find default_homework.lcpm"); + $default=''; + } + $result = &Apache::lonxml::xmlparse('tex', $filecontents,$default.&Apache::lonhomework::setup_vars('tex'),%mystyle); + + + } else { + $result = &Apache::lonxml::xmlparse('tex',$filecontents,'',%mystyle); + } + + + + + + +# my $ere; +# foreach $ere (%ENV) { +# $result .= ' SS '.$ere.' => '.$ENV{$ere}.' FF '."\n\n"; +# } } elsif ($choice eq 'Standard LaTeX output for the primary sequence') { my @master_seq = (); my $keyword = 0;