Diff for /loncom/interface/lonprintout.pm between versions 1.517 and 1.519.2.1

version 1.517, 2008/03/10 08:54:19 version 1.519.2.1, 2008/03/23 23:48:45
Line 38  use Apache::edit; Line 38  use Apache::edit;
 use Apache::File();  use Apache::File();
 use Apache::lonnavmaps;  use Apache::lonnavmaps;
 use Apache::admannotations;  use Apache::admannotations;
   use Apache::lonenc;
 use HTTP::Response;  use HTTP::Response;
   
 use LONCAPA::map();  use LONCAPA::map();
Line 149  sub ssi_with_retries { Line 150  sub ssi_with_retries {
  $ssi_error               = 1;   $ssi_error               = 1;
  $ssi_last_error_resource = $resource;   $ssi_last_error_resource = $resource;
  $ssi_last_error          = $response->code . " " . $response->message;   $ssi_last_error          = $response->code . " " . $response->message;
   
    &Apache::lonnet::logthis("Error in SSI resource: $resource Error: $ssi_last_error");
     }      }
   
     return $content;      return $content;
Line 1663  ENDPART Line 1666  ENDPART
  my $pbreakresources = keys %page_breaks;   my $pbreakresources = keys %page_breaks;
  for (my $i=0;$i<=$#master_seq;$i++) {   for (my $i=0;$i<=$#master_seq;$i++) {
   
               &Apache::lonenc::reset_enc();
   
     # Note due to document structure, not allowed to put \newpage      # Note due to document structure, not allowed to put \newpage
     # prior to the first resource      # prior to the first resource
   
Line 1671  ENDPART Line 1676  ENDPART
     $result.="\\newpage\n";      $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);      $urlp=&Apache::lonnet::clutter($urlp);
     $form{'symb'}=$master_seq[$i];      $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      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 ($selectionmade==7) {$helper->{VARS}->{'assignment'}=$assignment;}
     if ($i==0) {$prevassignment=$assignment;}      if ($i==0) {$prevassignment=$assignment;}
     my $texversion='';      my $texversion='';
Line 1982  ENDPART Line 1988  ENDPART
     $rndseed=$helper->{'VARS'}->{'curseed'};      $rndseed=$helper->{'VARS'}->{'curseed'};
  }   }
  for (my $i=0;$i<=$#list_of_files;$i++) {   for (my $i=0;$i<=$#list_of_files;$i++) {
   
               &Apache::lonenc::reset_enc();
   
     my $urlp = $list_of_files[$i];      my $urlp = $list_of_files[$i];
     $urlp=~s|//|/|;      $urlp=~s|//|/|;
     if ($urlp=~/\//) {      if ($urlp=~/\//) {
Line 2484  sub printHelper { Line 2493  sub printHelper {
     $helper->declareVar("showallfoils");      $helper->declareVar("showallfoils");
     $helper->declareVar("STUDENTS");      $helper->declareVar("STUDENTS");
   
   
      
   
   
     #  The page breaks can get loaded initially from the course environment:      #  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.      # But we only do this in the initial state so that they are allowed to change.
     #      #
Line 3206  RNDSEED Line 3219  RNDSEED
   
   
     addMessage("<tr><td>Problem Type:</td><td>");      addMessage("<tr><td>Problem Type:</td><td>");
     $paramHash = &Apache::lonhelper::getParamHash();  
     $paramHash->{'variable'} = 'probstatus'; # Already declared:  
     #      #
     # Initial value from construction space:      # Initial value from construction space:
     #      #
     if (!$helper->{VARS}->{'probstatus'} && $env{'form.problemtype'}) {      if (!$helper->{VARS}->{'probstatus'} && $env{'form.problemtype'}) {
  $helper->{VARS}->{'probstatus'} = $env{'form.problemtype'}; # initial value   $helper->{VARS}->{'probstatus'} = $env{'form.problemtype'}; # initial value
     }      }
     $paramHash->{CHOICES} = [      $xmlfrag = << "PROBTYPE";
      ['Homework problem',     'problem'],   <dropdown variable="probstatus" multichoice="0" allowempty="0">
      ['Exam Problem', 'exam'],     <defaultvalue>
      ['Survey question',      'survey']];        return "$helper->{VARS}->{'probstatus'}";
     Apache::lonhelper::dropdown->new();                     </defaultvalue>
      <choice computer="problem">Homework Problem</choice>
      <choice computer="exam">Exam Problem</choice>
      <choice computer="survey">Survey question</choice>
    </dropdown>
   PROBTYPE
               &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
       
     addMessage("</td></tr>");       addMessage("</td></tr>"); 
   
  }    } 

Removed from v.1.517  
changed lines
  Added in v.1.519.2.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>