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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 12 Mar 2004 21:01:15 -0000


albertel		Fri Mar 12 16:01:15 2004 EDT

  Modified files:              
    /loncom/homework	randomlabel.pm 
  Log:
  - ignore undefined bgimg
  
  
Index: loncom/homework/randomlabel.pm
diff -u loncom/homework/randomlabel.pm:1.59 loncom/homework/randomlabel.pm:1.60
--- loncom/homework/randomlabel.pm:1.59	Mon Feb 23 18:25:39 2004
+++ loncom/homework/randomlabel.pm	Fri Mar 12 16:01:14 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # random labelling tool
 #
-# $Id: randomlabel.pm,v 1.59 2004/02/23 23:25:39 albertel Exp $
+# $Id: randomlabel.pm,v 1.60 2004/03/12 21:01:14 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -87,7 +87,7 @@
     my $result='';
     push (@Apache::lonxml::namespace,'randomlabel');
     my $bgimg= &Apache::lonxml::get_param('bgimg',$parstack,$safeeval);
-    if ( $bgimg !~ /^http:/ ) {
+    if ( defined($bgimg) && $bgimg !~ /^http:/ ) {
 	$bgimg=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$bgimg);
 	if (&Apache::lonnet::repcopy($bgimg) ne OK) {
 	    $bgimg='/home/httpd/html/adm/lonKaputt/lonlogo_broken.gif';