Diff for /loncom/homework/randomlabel.pm between versions 1.59 and 1.61

version 1.59, 2004/02/23 23:25:39 version 1.61, 2004/07/02 08:09:49
Line 87  sub start_randomlabel { Line 87  sub start_randomlabel {
     my $result='';      my $result='';
     push (@Apache::lonxml::namespace,'randomlabel');      push (@Apache::lonxml::namespace,'randomlabel');
     my $bgimg= &Apache::lonxml::get_param('bgimg',$parstack,$safeeval);      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);   $bgimg=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$bgimg);
  if (&Apache::lonnet::repcopy($bgimg) ne OK) {   if (&Apache::lonnet::repcopy($bgimg) ne OK) {
     $bgimg='/home/httpd/html/adm/lonKaputt/lonlogo_broken.gif';      $bgimg='/home/httpd/html/adm/lonKaputt/lonlogo_broken.gif';
Line 260  sub start_labelgroup { Line 260  sub start_labelgroup {
   
 sub add_vars {  sub add_vars {
     my ($name,$order,$label,$labelorder,$value,$image,$safeeval) = @_;      my ($name,$order,$label,$labelorder,$value,$image,$safeeval) = @_;
       if (!defined($name) || $name eq '') { return; }
     my $code = '${'.$name."}{'".($order+1)."'}='".$label."';";      my $code = '${'.$name."}{'".($order+1)."'}='".$label."';";
     my $out=Apache::run::run($code,$safeeval);      my $out=Apache::run::run($code,$safeeval);
     if ($value) {      if ($value) {
Line 451  sub end_label { Line 452  sub end_label {
     my $description = &Apache::lonxml::get_param('description',      my $description = &Apache::lonxml::get_param('description',
  $parstack,$safeeval);   $parstack,$safeeval);
     push(@Apache::randomlabel::description,$description);      push(@Apache::randomlabel::description,$description);
    } else {
       $ltext=~s/[\r\n]*//gs
  }   }
  push(@Apache::randomlabel::label_arr,$ltext);   push(@Apache::randomlabel::label_arr,$ltext);
     }      }

Removed from v.1.59  
changed lines
  Added in v.1.61


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>