Diff for /loncom/xml/londefdef.pm between versions 1.342 and 1.343

version 1.342, 2006/11/06 23:06:19 version 1.343, 2006/11/06 23:45:00
Line 2860  sub start_img { Line 2860  sub start_img {
     my ($height_param,$width_param)=      my ($height_param,$width_param)=
  &image_size($origsrc,0.3,$parstack,$safeeval);   &image_size($origsrc,0.3,$parstack,$safeeval);
     my $destpath = $path;      my $destpath = $path;
     $destpath    =~ s/ /\_/g; # Spaces in path cause LaTex to vomit.  
     my $destfile = $file;      my $destfile = $file;
     $destfile    =~ s/ /\_/g;  
     my $size;      my $size;
     if ($width_param)  { $size.='width='.$width_param.' mm,'; }      if ($width_param)  { $size.='width='.$width_param.' mm,'; }
     if ($height_param) { $size.='height='.$height_param.' mm]'; }      if ($height_param) { $size.='height='.$height_param.' mm]'; }
Line 4245  sub get_eps_image { Line 4243  sub get_eps_image {
     $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);      $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
     &Apache::lonxml::debug("Filelocation gives: $src");      &Apache::lonxml::debug("Filelocation gives: $src");
     if (! -e $src) {      if (! -e $src) {
  # &Apache::lonnet::logthis("$src does not exist...repcopying");  
  &Apache::lonxml::debug("$src does not exist");   &Apache::lonxml::debug("$src does not exist");
  if (&Apache::lonnet::repcopy($src) ne 'ok' ) {   if (&Apache::lonnet::repcopy($src) ne 'ok' ) {
     &Apache::lonxml::debug("Repcopy of $src failed (1)");      &Apache::lonxml::debug("Repcopy of $src failed (1)");
Line 4257  sub get_eps_image { Line 4254  sub get_eps_image {
     &Apache::lonxml::debug("repcopy of $src ... $didrepcopy");      &Apache::lonxml::debug("repcopy of $src ... $didrepcopy");
     if ( (not -e $src) ||      if ( (not -e $src) ||
  ($didrepcopy ne 'ok')) {   ($didrepcopy ne 'ok')) {
  # &Apache::lonnet::logthis("queuing $orig_src for dynamic eps gen");  
  &Apache::lonxml::debug("Failed to find or replicate $src");   &Apache::lonxml::debug("Failed to find or replicate $src");
   
  #if replication failed try to produce eps file dynamically   #if replication failed try to produce eps file dynamically
Line 4276  sub get_eps_image { Line 4272  sub get_eps_image {
  }   }
   
     }      }
   
  }   }
     } else {      } else {
 # &Apache::lonnet::logthis("$src exists. queueing for copy.");  
 # &Apache::lonnet::logthis("Got eps already.. queue for copy");  
  # If the postscript file has spaces in its name,   # If the postscript file has spaces in its name,
  # LaTeX will gratuitiously vomit.  Therefore   # LaTeX will gratuitiously vomit.  Therefore
  # queue such files for copy with " " replaced by "_".   # queue such files for copy with " " replaced by "_".
Line 4287  sub get_eps_image { Line 4282  sub get_eps_image {
  my $newsrc = $orig_src;   my $newsrc = $orig_src;
  $newsrc    =~  s|(.*)/res/|/home/httpd/html/res/|;   $newsrc    =~  s|(.*)/res/|/home/httpd/html/res/|;
  open(FILE,">>/home/httpd/prtspool/$env{'user.name'}_$env{'user.domain'}_printout.dat");   open(FILE,">>/home/httpd/prtspool/$env{'user.name'}_$env{'user.domain'}_printout.dat");
 # &Apache::lonnet::logthis("Queueing $newsrc for copy");   print FILE "$src\n";
  print FILE "$newsrc\n";  
  close FILE;   close FILE;
  $src=~s|/home/httpd/html/res|/home/httpd/prtspool|;   $src=~s|/home/httpd/html/res|/home/httpd/prtspool|;
  $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|;   $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|;
     }      }
     my ($path,$file)=($src=~m|(.*)/([^/]*)$|);      my ($path,$file)=($src=~m|(.*)/([^/]*)$|);
       $file =~ s/ /\_/g;
     &Apache::lonxml::debug("get_eps_image returning: $path / $file<BR />");      &Apache::lonxml::debug("get_eps_image returning: $path / $file<BR />");
     return ($path.'/',$file);      return ($path.'/',$file);
 }  }

Removed from v.1.342  
changed lines
  Added in v.1.343


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