--- loncom/homework/randomlabel.pm 2001/10/14 05:08:09 1.5 +++ loncom/homework/randomlabel.pm 2001/10/24 19:40:50 1.6 @@ -41,7 +41,17 @@ sub BEGIN { sub start_randomlabel { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $result=''; + $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]= + '/res/adm/includes/GLabel.class'; + my $bgimg= &Apache::lonxml::get_param('bgimg',$parstack,$safeeval); + + if ( $bgimg !~ /^http:/ ) { + $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=$bgimg; + $bgimg=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$bgimg); + $bgimg=~s-$Apache::lonnet::perlvar{'lonDocRoot'}--; + $bgimg="http://".$ENV{'SERVER_NAME'}.$bgimg; + } my $code = &Apache::lonxml::get_param('code',$parstack,$safeeval); my $codebase = &Apache::lonxml::get_param('codebase',$parstack,$safeeval); my $w= &Apache::lonxml::get_param('width',$parstack,$safeeval);