Diff for /loncom/homework/randomlabel.pm between versions 1.53 and 1.56

version 1.53, 2003/11/11 00:25:24 version 1.56, 2004/01/09 00:53:19
Line 107  sub start_randomlabel { Line 107  sub start_randomlabel {
  my $newbgimg = $bgimg;   my $newbgimg = $bgimg;
  $bgimg=~s/\.(gif|jpg|png|jpeg)$/\.eps/i;   $bgimg=~s/\.(gif|jpg|png|jpeg)$/\.eps/i;
  $bgimg= &Apache::lonnet::filelocation($bgimg);   $bgimg= &Apache::lonnet::filelocation($bgimg);
  $bgimg=~s/http:\/[^\/]*/\/home\/httpd\/html/;   $bgimg=~s|http:/[^/]*|/home/httpd/html|;
  $bgimg=~s/\/$//;   $bgimg=~s|/$||;
  #if no eps file try to replicate it   #if no eps file try to replicate it
  if (not-e $bgimg) {   if (not-e $bgimg) {
     if (&Apache::lonnet::repcopy($bgimg) ne OK ) {      if (&Apache::lonnet::repcopy($bgimg) ne OK ) {
Line 122  sub start_randomlabel { Line 122  sub start_randomlabel {
     my $temp_file;      my $temp_file;
     my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout.dat";      my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout.dat";
     $temp_file = Apache::File->new('>>'.$filename);      $temp_file = Apache::File->new('>>'.$filename);
     $newbgimg =~ s/(.*)\/res\//\/home\/httpd\/html\/res\//;      $newbgimg =~ s|(.*)/res/|/home/httpd/html/res/|;
     print $temp_file "$newbgimg\n";      print $temp_file "$newbgimg\n";
     $bgimg=~s/\/home\/httpd\/html\/res/\/home\/httpd\/prtspool/; }      $bgimg=~s|/home/httpd/html/res|/home/httpd/prtspool|;
       $bgimg=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|;
    }
     }      }
  }   }
  $bgimg=~s/\/$//;   $bgimg=~s|/$||;
  my $dirtywidth=$texwidth+5;   my $dirtywidth=$texwidth+5;
  $result.='\vspace*{2mm}\noindent \parbox{'.$dirtywidth.' mm}{  \noindent \epsfxsize='.   $result.='\vspace*{2mm}\noindent \parbox{'.$dirtywidth.' mm}{  \noindent \epsfxsize='.
     $texwidth.' mm \epsffile{'.$bgimg.'}\setlength{\unitlength}{1mm}  \begin{picture}('.      $texwidth.' mm \epsffile{'.$bgimg.'}\setlength{\unitlength}{1mm}  \begin{picture}('.

Removed from v.1.53  
changed lines
  Added in v.1.56


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