Diff for /loncom/homework/edit.pm between versions 1.49 and 1.53

version 1.49, 2003/05/06 11:54:08 version 1.53, 2003/06/04 23:04:34
Line 386  sub insert_radiobuttonhint { Line 386  sub insert_radiobuttonhint {
 </radiobuttonhint>';  </radiobuttonhint>';
 }  }
   
   sub insert_optionhint {
     return '
   <optionhint>
   </optionhint>';
   }
   
 sub insert_startouttext {  sub insert_startouttext {
   return "<startouttext />\n<endouttext />";    return "<startouttext />\n<endouttext />";
 }  }
Line 398  sub textarea_sizes { Line 404  sub textarea_sizes {
   my ($data)=@_;    my ($data)=@_;
   my $count=0;    my $count=0;
   my $maxlength=-1;    my $maxlength=-1;
   foreach (split ("\n", $$data)) { $count++;    foreach (split ("\n", $$data)) {
  if (length($_) > $maxlength) { $maxlength = length($_); }        $count+=int(length($_)/79);
       }        $count++;
         if (length($_) > $maxlength) { $maxlength = length($_); }
     }
   my $rows = $count;    my $rows = $count;
   my $cols = $maxlength;    my $cols = $maxlength;
   return ($rows,$cols);    return ($rows,$cols);
Line 454  sub get_new_args { Line 462  sub get_new_args {
     my $element=&html_element_name($arg);      my $element=&html_element_name($arg);
     my $newvalue=$ENV{"form.$element"};      my $newvalue=$ENV{"form.$element"};
     &Apache::lonxml::debug(" for:$arg: cur is :$value: new is :$newvalue:");      &Apache::lonxml::debug(" for:$arg: cur is :$value: new is :$newvalue:");
     if ($value ne $newvalue) {      if (defined($newvalue) && $value ne $newvalue) {
       $token->[2]->{$arg}=$newvalue;        $token->[2]->{$arg}=$newvalue;
       $rebuild=1;        $rebuild=1;
     }      }
Line 621  sub entercoordpair { Line 629  sub entercoordpair {
  $formwidth='&formwidth='.$width.'_'.$Apache::edit::bgimgsrccurdepth;   $formwidth='&formwidth='.$width.'_'.$Apache::edit::bgimgsrccurdepth;
     }      }
     my $result = <<"ENDBUTTON";      my $result = <<"ENDBUTTON";
 <a href="/cgi-bin/imagechoice.pl?mode=pair&formname=$form&file=$bgfile$formheight$formwidth"  <a href="/cgi-bin/imagechoice.pl?mode=pair&formname=$form&file=$bgfile$formheight$formwidth&formcoord=$element"
 target="imagechoice">Click Coordinate Pair</a>  target="imagechoice">Click Coordinate Pair</a>
 ENDBUTTON  ENDBUTTON
     return $result;      return $result;

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


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