Diff for /loncom/homework/edit.pm between versions 1.31 and 1.32

version 1.31, 2002/03/22 14:45:11 version 1.32, 2002/03/22 20:05:19
Line 31 Line 31
 package Apache::edit;   package Apache::edit; 
   
 use strict;  use strict;
 use Apache::lonnet;  use Apache::lonnet();
   use HTML::Entities();
   
 # Global Vars  # Global Vars
 # default list of colors to use in editing  # default list of colors to use in editing
Line 301  sub textarea_sizes { Line 302  sub textarea_sizes {
   return ($rows,$cols);    return ($rows,$cols);
 }  }
   
 sub textfield {  sub editline {
     my ($tag,$data,$description,$size)=@_;      my ($tag,$data,$description,$size)=@_;
       $data=&HTML::Entities::encode($data);
     if ($description) { $description="<br />".$description."<br />"; }      if ($description) { $description="<br />".$description."<br />"; }
     my $result = <<"END";      my $result = <<"END";
 $description  $description
Line 320  sub editfield { Line 322  sub editfield {
   if ($cols < $minwidth ) { $cols = $minwidth; }    if ($cols < $minwidth ) { $cols = $minwidth; }
   if ($rows < $minheight) { $rows = $minheight; }    if ($rows < $minheight) { $rows = $minheight; }
   if ($description) { $description="<br />".$description."<br />"; }    if ($description) { $description="<br />".$description."<br />"; }
   return "$description\n&nbsp;&nbsp;&nbsp;<textarea rows=\"$rows\" cols=\"$cols\" name=\"homework_edit_".$Apache::lonxml::curdepth."\">$data</textarea>\n";    return $description."\n".'&nbsp;&nbsp;&nbsp;<textarea rows="'.$rows.
       '" cols="'.$cols.'" name="homework_edit_'.$Apache::lonxml::curdepth.'">'.
         &HTML::Entities::encode($data).'</textarea>'."\n";
 }  }
   
 sub modifiedfield {  sub modifiedfield {
Line 564  searcher (lonsearchcat) and, once a file Line 568  searcher (lonsearchcat) and, once a file
 the form element $elementname.  the form element $elementname.
   
 = item *  = item *
 textfield(tag,data,description,size): Provide a <input type="text" ../> for  editline(tag,data,description,size): Provide a <input type="text" ../> for
 single-line text entry.  This is to be used for text enclosed by tags, not  single-line text entry.  This is to be used for text enclosed by tags, not
 arguements/parameters associated with a tag.  arguements/parameters associated with a tag.
   

Removed from v.1.31  
changed lines
  Added in v.1.32


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