--- loncom/interface/lonprintout.pm 2008/03/03 10:50:26 1.516 +++ loncom/interface/lonprintout.pm 2008/03/11 09:52:56 1.519 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.516 2008/03/03 10:50:26 foxr Exp $ +# $Id: lonprintout.pm,v 1.519 2008/03/11 09:52:56 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -149,6 +149,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; @@ -1124,6 +1126,7 @@ sub print_latex_header { '\usepackage[dvips]{graphicx}\usepackage{epsfig}'."\n". '\usepackage{wrapfig}'. '\usepackage{picins}\usepackage{calc}'."\n". + '\usepackage[utf8]{inputenc}'."\n". '\newenvironment{choicelist}{\begin{list}{}{\setlength{\rightmargin}{0in}'."\n". '\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.05in}'."\n". '\setlength{\itemsep}{0.022in}\setlength{\parsep}{0in}'."\n". @@ -2483,6 +2486,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. # @@ -3205,19 +3212,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(""); }