Diff for /loncom/interface/lonprintout.pm between versions 1.160 and 1.164

version 1.160, 2003/05/08 19:16:42 version 1.164, 2003/05/13 15:28:32
Line 1381  ENDPART Line 1381  ENDPART
     &Apache::lonnet::appenv(%moreenv);      &Apache::lonnet::appenv(%moreenv);
     my $texversion=&Apache::lonnet::ssi($currentURL);      my $texversion=&Apache::lonnet::ssi($currentURL);
     &Apache::lonnet::delenv('form.grade_target','form.textwidth','form.counter');      &Apache::lonnet::delenv('form.grade_target','form.textwidth','form.counter');
       if($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') {
    $moreenv{'form.grade_target'}='answer';
    $moreenv{'form.print_answer'}='yes';
    &Apache::lonnet::appenv(%moreenv);
    my $answer=&Apache::lonnet::ssi($currentURL);
    &Apache::lonnet::delenv('form.grade_target','form.print_answer');
    my $start=index($answer,'\vskip 0 mm',0);
    my $finish=rindex $answer,'\vskip 0 mm' ;
    if ($start!=-1 && $finish!=-1) {$answer=substr($answer,$start,$finish-$start+12);}
   # $r->print('<pre>'.$answer.'</pre>'); return OK;
    $texversion=~s/(\\end{document})/$answer$1/;
       }
     $result .= $texversion;      $result .= $texversion;
     if ($currentURL=~m/\.page\s*$/) {      if ($currentURL=~m/\.page\s*$/) {
  ($result,$number_of_columns) = &page_cleanup($result);   ($result,$number_of_columns) = &page_cleanup($result);
Line 1582  sub handler { Line 1594  sub handler {
         $helper = $result;          $helper = $result;
   
   
 # my $key;   
 # foreach $key (keys %{$helper->{'VARS'}}) {   my $key; 
 #    $r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<-<br />');   foreach $key (keys %{$helper->{'VARS'}}) {
 # }      $r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<-<br />');
    }
 # return OK;  # return OK;
   
   
Line 1883  CHOOSE_FROM_SUBDIR Line 1896  CHOOSE_FROM_SUBDIR
     $helper->declareVar('PRINT_TYPE');      $helper->declareVar('PRINT_TYPE');
     $paramHash->{CHOICES} = $printChoices;      $paramHash->{CHOICES} = $printChoices;
     Apache::lonhelper::choices->new();      Apache::lonhelper::choices->new();
   
       if ($ENV{'request.role.adv'}) {
           $paramHash = Apache::lonhelper::getParamHash();
           $paramHash->{MESSAGE_TEXT} = "<br /><big><b><i>Next option is available only for advanced users:</i></b></big><br />";
           Apache::lonhelper::message->new();
           $paramHash = Apache::lonhelper::getParamHash();
    $paramHash->{'variable'} = 'ANSWER_TYPE';   
    $helper->declareVar('ANSWER_TYPE');         
           $paramHash->{CHOICES} = [
                                      ['Print without answer', 'yes'],
                                      ['Print with answers', 'no'] ];
           Apache::lonhelper::choices->new();
       }
   
     Apache::lonprintout::page_format_state->new("FORMAT");      Apache::lonprintout::page_format_state->new("FORMAT");
   
     # Generate the PAGESIZE state which will offer the user the margin      # Generate the PAGESIZE state which will offer the user the margin

Removed from v.1.160  
changed lines
  Added in v.1.164


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