Diff for /loncom/homework/caparesponse/caparesponse.pm between versions 1.223 and 1.227.2.4

version 1.223, 2008/03/06 16:28:22 version 1.227.2.4, 2008/09/23 19:22:58
Line 427  sub check_submission { Line 427  sub check_submission {
  }   }
     } elsif ($tag eq 'numericalresponse') {      } elsif ($tag eq 'numericalresponse') {
  $$args_ref{'type'}='float';   $$args_ref{'type'}='float';
       } elsif ($tag eq 'stringresponse') {
           if ($$args_ref{'type'} eq '') {
               $$args_ref{'type'} = 'ci';
           }
     }      }
       
     &add_in_tag_answer($parstack,$safeeval);      &add_in_tag_answer($parstack,$safeeval);
   
     if (!%answer) {      if (!%answer) {
Line 602  sub end_numericalresponse { Line 606  sub end_numericalresponse {
  }   }
     }      }
  }   }
           if (($target eq 'web') && ($tag eq 'formularesponse')
               && ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')
       && (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffeditor') ne 'yes')) {
               $result.=&Apache::response::edit_mathresponse_button($id,"HWVAL_$id");
           }
   
  &Apache::response::setup_prior_tries_hash(\&format_prior_response_numerical);   &Apache::response::setup_prior_tries_hash(\&format_prior_response_numerical);
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
  $result.='</td></tr>'.&Apache::edit::end_table;   $result.='</td></tr>'.&Apache::edit::end_table;
Line 678  sub end_numericalresponse { Line 688  sub end_numericalresponse {
     #}      #}
  }   }
  if ($high && $tag eq 'numericalresponse') {   if ($high && $tag eq 'numericalresponse') {
     $element.=': ['.$low.','.$high.']';      $element.='; ['.$low.'; '.$high.']';
     $tolline .= "[$low, $high]";      $tolline .= "[$low, $high]";
  }   }
  if (defined($sighigh) && $tag eq 'numericalresponse') {   if (defined($sighigh) && $tag eq 'numericalresponse') {
     if ($env{'form.answer_output_mode'} eq 'tex') {      if ($env{'form.answer_output_mode'} eq 'tex') {
  $element.= ": Sig $siglow - $sighigh";   $element.= "; Sig $siglow - $sighigh";
     } else {      } else {
  $element.= " Sig <i>$siglow - $sighigh</i>";   $element.= " Sig <i>$siglow - $sighigh</i>";
  $sigline .= "[$siglow, $sighigh]";   $sigline .= "[$siglow, $sighigh]";
Line 1151  sub end_stringresponse { Line 1161  sub end_stringresponse {
     my @args = ('type');      my @args = ('type');
     my $args_ref = &setup_capa_args($safeeval,$parstack,      my $args_ref = &setup_capa_args($safeeval,$parstack,
     \@args,$response);      \@args,$response);
                       if ($$args_ref{'type'} eq '') {
                           $$args_ref{'type'} = 'ci';
                       }
     &add_in_tag_answer($parstack,$safeeval);      &add_in_tag_answer($parstack,$safeeval);
     my (@final_awards,@final_msgs,@names);      my (@final_awards,@final_msgs,@names);
     foreach my $name (keys(%answer)) {      foreach my $name (keys(%answer)) {

Removed from v.1.223  
changed lines
  Added in v.1.227.2.4


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