--- loncom/interface/lonprintout.pm 2009/07/16 11:12:30 1.557.2.3 +++ loncom/interface/lonprintout.pm 2009/07/23 10:42:41 1.557.2.4 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.557.2.3 2009/07/16 11:12:30 foxr Exp $ +# $Id: lonprintout.pm,v 1.557.2.4 2009/07/23 10:42:41 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -104,7 +104,7 @@ sub fetch_raw_resource { sub annotate { my ($symb) = @_; - my $annotation_text = &Apache::admannotations::get_annotation($symb, 1); + my $annotation_text = &Apache::loncommon::get_annotation($symb, 1); my $result = ""; @@ -230,6 +230,10 @@ sub include_pdf { sub ssi_with_retries { my ($resource, $retries, %form) = @_; + my $target = $form{'grade_target'}; + my $aom = $form{'answer_output_mode'}; + + my ($content, $response) = &Apache::loncommon::ssi_with_retries($resource, $retries, %form); if (!$response->is_success) { @@ -1356,7 +1360,7 @@ sub print_page_in_course { &Apache::lonnet::delenv('construct.style'); } - # First is theo verall page description. This is then followed by the + # First is the overall page description. This is then followed by the # components of the page. Each of which must be printed independently. my $the_page = shift(@page_resources); @@ -1418,16 +1422,18 @@ sub print_page_in_course { if(($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') || ($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'only')) { - $form{'problem_split'}=$parmhash{'problem_stream_switch'}; - $form{'grade_target'}='answer'; - $form{'answer_output_mode'}='tex'; - $form{'rndseed'}=$rndseed; + my %answerform = %form; + + + $answerform{'problem_split'}=$parmhash{'problem_stream_switch'}; + $answerform{'grade_target'}='answer'; + $answerform{'answer_output_mode'}='tex'; + $answerform{'rndseed'}=$rndseed; if ($helper->{'VARS'}->{'probstatus'} eq 'exam') { - $form{'problemtype'}='exam'; + $answerform{'problemtype'}='exam'; } - $resources_printed .= $currentURL.':'; - my $answer=&ssi_with_retries($currentURL,$ssi_retry_count, %form); - + $resources_printed .= $urlp.':'; + my $answer=&ssi_with_retries($urlp,$ssi_retry_count, %answerform); if ($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') { $texversion=~s/(\\keephidden{ENDOFPROBLEM})/$answer$1/; @@ -1896,7 +1902,6 @@ ENDPART && $currentURL=~/\.(sequence|page)$/ && $helper->{'VARS'}->{'construction'} eq '1') { #printing content of sequence from the construction space - &Apache::lonnet::logthis("Printing sequence/page but construction space??"); $currentURL=~s|\/~([^\/]+)\/|\/home\/$1\/public_html\/|; # $result .= &print_latex_header($helper->{'VARS'}->{'LATEX_TYPE'}); @@ -1934,7 +1939,6 @@ ENDPART $result .= &include_pdf($cleanURL); $result .= '\end{document}'; } elsif ($cleanURL =~ /\.page$/i) { # Print page in non construction space contexts. - &Apache::lonnet::logthis("Printing .page $cleanURL at " . __LINE__); # Determine the set of resources in the map of the page: @@ -2012,12 +2016,10 @@ ENDPART my $texversion=''; if ($urlp!~m|^/adm/| && $urlp=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { - &Apache::lonnet::logthis("At line 1834 printing $urlp"); $resources_printed .= $urlp.':'; &Apache::lonxml::remember_problem_counter(); $texversion.=&ssi_with_retries($urlp, $ssi_retry_count, %form); if ($urlp=~/\.page$/) { - &Apache::lonnet::logthis("Handling a .page at ". __LINE__); ($texversion,my $number_of_columns_page) = &page_cleanup($texversion); if ($number_of_columns_page > $number_of_columns) {$number_of_columns=$number_of_columns_page;} @@ -2607,7 +2609,6 @@ sub print_resources { if ($res_url!~m|^ext/| && $res_url=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { $printed .= $curresline.':'; - &Apache::lonnet::logthis("At line 2427 printing $curresline"); &Apache::lonxml::remember_problem_counter(); my $rendered = &get_student_view_with_retries($curresline,$ssi_retry_count,$username,$userdomain,$env{'request.course.id'},'tex',$moreenv);