[LON-CAPA-cvs] cvs: loncom(version_1_1_X) /homework imageresponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 15 Jan 2004 22:25:31 -0000


albertel		Thu Jan 15 17:25:31 2004 EDT

  Modified files:              (Branch: version_1_1_X)
    /loncom/homework	imageresponse.pm 
  Log:
  - backport 1.45 
  
  
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.42 loncom/homework/imageresponse.pm:1.42.2.1
--- loncom/homework/imageresponse.pm:1.42	Mon Nov 10 19:39:33 2003
+++ loncom/homework/imageresponse.pm	Thu Jan 15 17:25:31 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # image click response style
 #
-# $Id: imageresponse.pm,v 1.42 2003/11/11 00:39:33 albertel Exp $
+# $Id: imageresponse.pm,v 1.42.2.1 2004/01/15 22:25:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -459,7 +459,11 @@
 	    my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout.dat";
 	    $temp_file = Apache::File->new('>>'.$filename); 
 	    print $temp_file "$src\n";
-	    $Apache::response::foilgroup{"$name.image"} ='\vskip 0 mm \graphicspath{{/home/httpd/prtspool/}}\includegraphics[width='.$width_param.' mm]{'.$file.'} ';
+	    $newsrc=~s/\/home\/httpd\/html\/res//;
+	    $newsrc=~s/\/home\/([^\/]*)\/public_html\//\/$1\//;
+	    $newsrc=~s/\/\.\//\//;
+	    $newsrc=~s/\/([^\/]+)\.(ps|eps)/\//;
+	    $Apache::response::foilgroup{"$name.image"} ='\vskip 0 mm \graphicspath{{/home/httpd/prtspool'.$newsrc.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'} ';
 	}
     } 
     return $result;