Diff for /loncom/homework/randomlabel.pm between versions 1.48 and 1.49

version 1.48, 2003/09/08 19:17:34 version 1.49, 2003/09/23 21:20:42
Line 92  sub start_randomlabel { Line 92  sub start_randomlabel {
     }      }
     my $w= &check_int(&Apache::lonxml::get_param('width',$parstack,$safeeval));      my $w= &check_int(&Apache::lonxml::get_param('width',$parstack,$safeeval));
     my $h= &check_int(&Apache::lonxml::get_param('height',$parstack,$safeeval));      my $h= &check_int(&Apache::lonxml::get_param('height',$parstack,$safeeval));
     my $texwidth= &Apache::lonxml::get_param('texwidth',$parstack,$safeeval);      my $texwidth= &Apache::lonxml::get_param('texwidth',$parstack,$safeeval,undef,1);
       if (!$texwidth) { $texwidth=90; }
     $Apache::randomlabel::tlabel_cnt=0;      $Apache::randomlabel::tlabel_cnt=0;
     $Apache::randomlabel::ilabel_cnt=0;      $Apache::randomlabel::ilabel_cnt=0;
     if ($target eq 'web') {      if ($target eq 'web') {
Line 178  sub end_randomlabel { Line 179  sub end_randomlabel {
  $result='\end{picture}\\\\';   $result='\end{picture}\\\\';
  my $height=&Apache::lonxml::get_param('height',$parstack,$safeeval);   my $height=&Apache::lonxml::get_param('height',$parstack,$safeeval);
  my $width=&Apache::lonxml::get_param('width',$parstack,$safeeval);   my $width=&Apache::lonxml::get_param('width',$parstack,$safeeval);
  my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval);   my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval,undef,1);
           if (!$texwidth) { $texwidth=90; }
  my $howtoskipback = $texwidth*$height/$width;   my $howtoskipback = $texwidth*$height/$width;
  $result.= ' \vskip -'.$howtoskipback.' mm }  \\\\ ';   $result.= ' \vskip -'.$howtoskipback.' mm }  \\\\ ';
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
Line 285  sub end_labelgroup { Line 287  sub end_labelgroup {
  my $WY1=0; #  Web y-coord. of (ULC)   my $WY1=0; #  Web y-coord. of (ULC)
  my $wwidth=&Apache::lonxml::get_param('width',$parstack,$safeeval,-2);   my $wwidth=&Apache::lonxml::get_param('width',$parstack,$safeeval,-2);
  my $wheight=&Apache::lonxml::get_param('height',$parstack,$safeeval,-2);   my $wheight=&Apache::lonxml::get_param('height',$parstack,$safeeval,-2);
  my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval,-2);   my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval,-2,1);
    if (!$texwidth) { $texwidth=90; }
  my $TX1=0;   my $TX1=0;
  my $TY1=$texwidth*($wheight/$wwidth);   my $TY1=$texwidth*($wheight/$wwidth);
  my $TX2=$texwidth;   my $TX2=$texwidth;

Removed from v.1.48  
changed lines
  Added in v.1.49


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