Diff for /loncom/homework/inputtags.pm between versions 1.137 and 1.138

version 1.137, 2004/03/26 20:10:42 version 1.138, 2004/03/31 05:23:59
Line 118  sub start_textfield { Line 118  sub start_textfield {
  $Apache::lonxml::evaluate--;   $Apache::lonxml::evaluate--;
  if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {   if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
     my $partid=$Apache::inputtags::part;      my $partid=$Apache::inputtags::part;
     my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$resid.submission"});      my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$resid.submission"},'<>&"');
     my $cols = &Apache::lonxml::get_param('cols',$parstack,$safeeval);      my $cols = &Apache::lonxml::get_param('cols',$parstack,$safeeval);
     if ( $cols eq '') { $cols = 80; }      if ( $cols eq '') { $cols = 80; }
     my $rows = &Apache::lonxml::get_param('rows',$parstack,$safeeval);      my $rows = &Apache::lonxml::get_param('rows',$parstack,$safeeval);
Line 210  sub start_textline { Line 210  sub start_textline {
     if ($size eq '') { $size=20; } else {      if ($size eq '') { $size=20; } else {
  if ($size < 20) { $maxlength=$size; }   if ($size < 20) { $maxlength=$size; }
     }      }
     my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"});      my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"},'<>&"');
     if ($Apache::lonhomework::type ne 'exam') {      if ($Apache::lonhomework::type ne 'exam') {
  my $addchars=&Apache::lonxml::get_param('addchars',$parstack,$safeeval);   my $addchars=&Apache::lonxml::get_param('addchars',$parstack,$safeeval);
  $result='';   $result='';
Line 257  sub start_hiddenline { Line 257  sub start_hiddenline {
  if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {   if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
     my $partid=$Apache::inputtags::part;      my $partid=$Apache::inputtags::part;
     my $id=$Apache::inputtags::response[-1];      my $id=$Apache::inputtags::response[-1];
     my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"});      my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"},'<>&"');
     if ($Apache::lonhomework::type ne 'exam') {      if ($Apache::lonhomework::type ne 'exam') {
  $result= '<input type="hidden" name="HWVAL_'.$id.'" value="'.   $result= '<input type="hidden" name="HWVAL_'.$id.'" value="'.
     $oldresponse.'" />';      $oldresponse.'" />';

Removed from v.1.137  
changed lines
  Added in v.1.138


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