Diff for /loncom/interface/lonprintout.pm between versions 1.204 and 1.208

version 1.204, 2003/07/18 15:47:35 version 1.208, 2003/08/02 13:57:05
Line 619  ENDPART Line 619  ENDPART
     $currentURL=$helper->{'VARS'}->{'filename'};      $currentURL=$helper->{'VARS'}->{'filename'};
     $currentURL=~s/\/home\//\/~/;      $currentURL=~s/\/home\//\/~/;
     $currentURL=~s/public_html\///;      $currentURL=~s/public_html\///;
       if ($currentURL=~/([^?]+)/) {$currentURL=$1;}
  }   }
  $selectionmade = 1;   $selectionmade = 1;
  if ($currentURL=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) {   if ($currentURL=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) {
Line 650  ENDPART Line 651  ENDPART
  ($result,$number_of_columns) = &page_cleanup($result);   ($result,$number_of_columns) = &page_cleanup($result);
     }      }
  } else {   } else {
 #  $result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';    $result='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';
 #  if ($ENV{'form.url'}=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) {    if ($currentURL=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) {
 #      $result.=$1;        $result.=$1;
 #  } else {    } elsif ($currentURL=~/\/ext\//) {
 #      $result.=$ENV{'form.url'};        $result.=' \strut \\\\ THIS IS EXTERNAL RESOURCE WITH URL \strut \\\\ '.$currentURL.' ';
 #  }    } else {
 #  $result.=' \end{document}'        $result.=$currentURL;
     }
     $result.=' \end{document}'
  }   }
     } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or      } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or
              ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') or               ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems_pages') or
Line 900  sub handler { Line 903  sub handler {
   
     my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'});      my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'});
           
  my $key;   # my $key; 
 # foreach $key (keys %parmhash) {  # foreach $key (keys %parmhash) {
 #    $r->print(' '.$key.'->'.$parmhash{$key}.'<-<br />');  #    $r->print(' '.$key.'->'.$parmhash{$key}.'<-<br />');
 # }  # }
Line 955  sub printHelper { Line 958  sub printHelper {
     # This will persistently load in the data we want from the      # This will persistently load in the data we want from the
     # very first screen.      # very first screen.
     # Detect whether we're coming from construction space      # Detect whether we're coming from construction space
     if ($ENV{'form.postdata'} =~ /http:\/\// ) {      if ($ENV{'form.postdata'}=~/^(?:http:\/\/[^\/]+\/|\/|)\~([^\/]+)\/(.*)$/) {
         $ENV{'form.postdata'} =~ /http:\/\/[^\/]+\/~([^\/]+)\/(.*)/;  
         $helper->{VARS}->{'filename'} = "/home/$1/public_html/$2";          $helper->{VARS}->{'filename'} = "/home/$1/public_html/$2";
         $helper->{VARS}->{'construction'} = 1;          $helper->{VARS}->{'construction'} = 1;
     } else {      } else {
Line 1131  CHOOSE_FROM_SUBDIR Line 1133  CHOOSE_FROM_SUBDIR
                   
         $xmlfrag .= <<'CHOOSE_FROM_SUBDIR';          $xmlfrag .= <<'CHOOSE_FROM_SUBDIR';
       <filefilter>return $filename =~         <filefilter>return $filename =~ 
            m/^[^\.]+\.(problem|exam|quiz|assess|survey|form|library)$/;             m/\.(problem|exam|quiz|assess|survey|form|library)$/;
       </filefilter>        </filefilter>
       </files>        </files>
     </state>      </state>

Removed from v.1.204  
changed lines
  Added in v.1.208


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