--- loncom/interface/lonprintout.pm 2008/03/10 08:54:19 1.517 +++ loncom/interface/lonprintout.pm 2008/03/23 23:48:45 1.519.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.517 2008/03/10 08:54:19 foxr Exp $ +# $Id: lonprintout.pm,v 1.519.2.1 2008/03/23 23:48:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,6 +38,7 @@ use Apache::edit; use Apache::File(); use Apache::lonnavmaps; use Apache::admannotations; +use Apache::lonenc; use HTTP::Response; use LONCAPA::map(); @@ -149,6 +150,8 @@ sub ssi_with_retries { $ssi_error = 1; $ssi_last_error_resource = $resource; $ssi_last_error = $response->code . " " . $response->message; + + &Apache::lonnet::logthis("Error in SSI resource: $resource Error: $ssi_last_error"); } return $content; @@ -1663,6 +1666,8 @@ ENDPART my $pbreakresources = keys %page_breaks; for (my $i=0;$i<=$#master_seq;$i++) { + &Apache::lonenc::reset_enc(); + # Note due to document structure, not allowed to put \newpage # prior to the first resource @@ -1671,11 +1676,12 @@ ENDPART $result.="\\newpage\n"; } } - my ($sequence,undef,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]); + my ($sequence,$middle_thingy,$urlp)=&Apache::lonnet::decode_symb($master_seq[$i]); $urlp=&Apache::lonnet::clutter($urlp); $form{'symb'}=$master_seq[$i]; my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($sequence),'header'); #title of the assignment which contains this problem + if ($selectionmade==7) {$helper->{VARS}->{'assignment'}=$assignment;} if ($i==0) {$prevassignment=$assignment;} my $texversion=''; @@ -1982,6 +1988,9 @@ ENDPART $rndseed=$helper->{'VARS'}->{'curseed'}; } for (my $i=0;$i<=$#list_of_files;$i++) { + + &Apache::lonenc::reset_enc(); + my $urlp = $list_of_files[$i]; $urlp=~s|//|/|; if ($urlp=~/\//) { @@ -2484,6 +2493,10 @@ sub printHelper { $helper->declareVar("showallfoils"); $helper->declareVar("STUDENTS"); + + + + # The page breaks can get loaded initially from the course environment: # But we only do this in the initial state so that they are allowed to change. # @@ -3206,19 +3219,24 @@ RNDSEED addMessage("Problem Type:"); - $paramHash = &Apache::lonhelper::getParamHash(); - $paramHash->{'variable'} = 'probstatus'; # Already declared: # # Initial value from construction space: # if (!$helper->{VARS}->{'probstatus'} && $env{'form.problemtype'}) { $helper->{VARS}->{'probstatus'} = $env{'form.problemtype'}; # initial value } - $paramHash->{CHOICES} = [ - ['Homework problem', 'problem'], - ['Exam Problem', 'exam'], - ['Survey question', 'survey']]; - Apache::lonhelper::dropdown->new(); + $xmlfrag = << "PROBTYPE"; + + + return "$helper->{VARS}->{'probstatus'}"; + + Homework Problem + Exam Problem + Survey question + +PROBTYPE + &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag); + addMessage(""); }