Diff for /loncom/interface/lonprintout.pm between versions 1.150 and 1.151

version 1.150, 2003/05/05 18:48:15 version 1.151, 2003/05/05 20:14:32
Line 1349  ENDPART Line 1349  ENDPART
  $laystyle='book';   $laystyle='book';
     }      }
     my ($textwidth,$textheight,$oddoffset,$evenoffset) = &page_format_new($papersize,$laystyle,$numberofcolumns);      my ($textwidth,$textheight,$oddoffset,$evenoffset) = &page_format_new($papersize,$laystyle,$numberofcolumns);
   
   
   
      
 #    my $choice = $ENV{'form.choice'};  
 #    my $layout = $ENV{'form.layout'};  
 #    my $numberofcolumns = $ENV{'form.numberofcolumns'};    
 #    my $papersize = $ENV{'form.papersize'};            
 #    my $laystyle = 'book';  
     my $assignment =  $ENV{'form.assignment'};      my $assignment =  $ENV{'form.assignment'};
 #    if ($choice eq 'Subdirectory print') {  #    if ($choice eq 'Subdirectory print') {
 # if ($ENV{'form.layout'} eq '') {$layout = 'CAPA';}  # if ($ENV{'form.layout'} eq '') {$layout = 'CAPA';}
Line 1482  ENDPART Line 1473  ENDPART
     my $fullname = &get_name($username,$userdomain);      my $fullname = &get_name($username,$userdomain);
             #goes through all resources, checks if they are available for current student, and produces output                 #goes through all resources, checks if they are available for current student, and produces output   
     foreach my $curresline (@master_seq)  {      foreach my $curresline (@master_seq)  {
 # my ($curres,$symb) = split /&&/, $curresline;  
 #                if ($curres=~ m/\.(problem|exam|quiz|assess|survey|form|library)/) {  
  if ($curresline=~ m/\.(problem|exam|quiz|assess|survey|form|library)$/) {   if ($curresline=~ m/\.(problem|exam|quiz|assess|survey|form|library)$/) {
 #    my ($map,$id,$res_url) = split(/___/,$symb);$curresres  
     my ($map,$id,$res_url) = split(/___/,$curresline);      my ($map,$id,$res_url) = split(/___/,$curresline);
     if (&Apache::lonnet::allowed('bre',$res_url)) {      if (&Apache::lonnet::allowed('bre',$res_url)) {
  my $rendered = &Apache::loncommon::get_student_view($curresline,$username,$userdomain,   my $rendered = &Apache::loncommon::get_student_view($curresline,$username,$userdomain,
Line 1517  ENDPART Line 1505  ENDPART
  &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);   &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
  $result .= '\end{document}';   $result .= '\end{document}';
  &Apache::lonnet::delenv('form.textwidth');   &Apache::lonnet::delenv('form.textwidth');
 #    } elsif ($choice eq 'Subdirectory print') {            } elsif ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'problems_from_directory') {      
 #    #prints selected problems from the subdirectory       #prints selected problems from the subdirectory 
 # $selectionmade = 6;   $selectionmade = 6;
 #        my @list_of_files = ();          my @list_of_files=split /\|\|\|/, $helper->{'VARS'}->{'FILES'};
 # for (my $i=0; $i<$ENV{'form.numberofproblems'};$i++) {   my $flag_latex_header_remove = 'NO';  
 #    if ($ENV{'form.whattoprint'.$i}=~/^\//) {   for (my $i=0;$i<=$#list_of_files;$i++) {
 # push @list_of_files,$ENV{'form.whattoprint'.$i};  
 #    }  
 # }  
 # my $flag_latex_header_remove = 'NO';    
 # for (my $i=0;$i<=$#list_of_files;$i++) {  
 #    my $urlp = $list_of_files[$i];  #    my $urlp = $list_of_files[$i];
 #    if ($urlp=~/\//) {  #    if ($urlp=~/\//) {
 # my %moreenv;   my %moreenv;
 # $moreenv{'form.grade_target'}='tex';   $moreenv{'form.grade_target'}='tex';
 # $moreenv{'form.textwidth'}=$LaTeXwidth;   $moreenv{'form.textwidth'}=$LaTeXwidth;
 # &Apache::lonnet::appenv(%moreenv);   &Apache::lonnet::appenv(%moreenv);
 # if ($urlp =~ m|/home/([^/]+)/public_html|) {  # if ($urlp =~ m|/home/([^/]+)/public_html|) {
 #    $urlp =~ s|/home/([^/]*)/public_html|/~$1|;  #    $urlp =~ s|/home/([^/]*)/public_html|/~$1|;
 # } else {  # } else {
 #    $urlp =~ s|^/home/httpd/html||;  #    $urlp =~ s|^/home/httpd/html||;
 # }  # }
 # my $texversion=&Apache::lonnet::ssi($urlp);  # my $texversion=&Apache::lonnet::ssi($urlp);
 # &Apache::lonnet::delenv('form.grade_target','form.textwidth');   &Apache::lonnet::delenv('form.grade_target','form.textwidth');
 #                #this chunck is responsible for printing the path to problem                  #this chunck is responsible for printing the path to problem
 # my $newurlp = '';  # my $newurlp = '';
 # my $HowMany = length($urlp)*2;  # my $HowMany = length($urlp)*2;
 # if ($HowMany > $LaTeXwidth) {  # if ($HowMany > $LaTeXwidth) {
Line 1569  ENDPART Line 1552  ENDPART
 # $result .= $texversion;  # $result .= $texversion;
 #    }  #    }
 #    $flag_latex_header_remove = 'YES';    #    $flag_latex_header_remove = 'YES';  
 # }   }
 # $result .= '\end{document}';        # $result .= '\end{document}';      
     }      }
 #-------------------------------------------------------- corrections for the different page formats  #-------------------------------------------------------- corrections for the different page formats
Line 1758  sub printHelper { Line 1741  sub printHelper {
   
     # "Delete everything after the last slash."      # "Delete everything after the last slash."
     $subdir =~ s|/[^/]+$||;      $subdir =~ s|/[^/]+$||;
       $subdir =  '/home/httpd/html/res'.$subdir.'/';
   
     # What can be printed is a very dynamic decision based on      # What can be printed is a very dynamic decision based on
     # lots of factors. So we need to dynamically build this list.      # lots of factors. So we need to dynamically build this list.

Removed from v.1.150  
changed lines
  Added in v.1.151


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