--- loncom/homework/randomlabel.pm 2008/11/25 13:16:17 1.93 +++ loncom/homework/randomlabel.pm 2011/11/14 02:17:47 1.96 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # random labelling tool # -# $Id: randomlabel.pm,v 1.93 2008/11/25 13:16:17 jms Exp $ +# $Id: randomlabel.pm,v 1.96 2011/11/14 02:17:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -172,10 +172,10 @@ sub start_randomlabel { $label_xscale = 1.0; # Assume image size not overridden. $label_yscale = 1.0; my $bgimg= &Apache::lonxml::get_param('bgimg',$parstack,$safeeval); - if ( defined($bgimg) && $bgimg !~ /^http:/ ) { + if ( defined($bgimg) && $bgimg !~ /^https?\:/ ) { $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'; + $bgimg=$Apache::lonnet::perlvar{'lonDocRoot'}.'/adm/lonKaputt/lonlogo_broken.gif'; } } $Apache::randomlabel::obj_cnt=0; @@ -223,7 +223,7 @@ sub end_randomlabel { &Apache::lonnet::appenv(\%args); } elsif ($target eq 'tex') { $result='\end{picture}\\\\'; - $result.= ' \vskip -'.$height_param.' mm } \\\\ '; + $result.= ' \vskip -'.$height_param.' mm } \\newline '; } elsif ($target eq 'edit') { $result.=&Apache::edit::end_table; }