[LON-CAPA-cvs] cvs: loncom /homework randomlabel.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 27 Aug 2002 15:40:07 -0000


sakharuk		Tue Aug 27 11:40:07 2002 EDT

  Modified files:              
    /loncom/homework	randomlabel.pm 
  Log:
  Added replication of eps. picture in the case if original eps does not exist on current library server.
  
  
Index: loncom/homework/randomlabel.pm
diff -u loncom/homework/randomlabel.pm:1.34 loncom/homework/randomlabel.pm:1.35
--- loncom/homework/randomlabel.pm:1.34	Wed Aug  7 17:49:35 2002
+++ loncom/homework/randomlabel.pm	Tue Aug 27 11:40:07 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # random labelling tool
 #
-# $Id: randomlabel.pm,v 1.34 2002/08/07 21:49:35 sakharuk Exp $
+# $Id: randomlabel.pm,v 1.35 2002/08/27 15:40:07 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -110,9 +110,12 @@
     $bgimg= &Apache::lonnet::filelocation($bgimg);
     if (not $ENV{'request.role'}=~/^au\./) {
 	$bgimg=~s/http:\/[^\/]*/\/home\/httpd\/html/;
+	$bgimg=~s/\/$//;
+	if (not-e $bgimg) {
+	    my $response = &Apache::lonnet::repcopy($bgimg);
+	}
     } else {
 	$bgimg=~s/http:\/[^\/]*\/~([^\/]+)/\/home\/$1\/public_html/;
-
     }
     $bgimg=~s/\/$//;
     my $dirtywidth=$texwidth+5;