Diff for /loncom/homework/caparesponse/caparesponse.pm between versions 1.95 and 1.96

version 1.95, 2003/04/21 20:59:02 version 1.96, 2003/05/09 22:00:16
Line 79  sub start_numericalresponse { Line 79  sub start_numericalresponse {
  $result=&Apache::response::meta_package_write('numericalresponse');   $result=&Apache::response::meta_package_write('numericalresponse');
     } elsif ($target eq 'answer' || $target eq 'grade') {      } elsif ($target eq 'answer' || $target eq 'grade') {
  &Apache::response::reset_params();   &Apache::response::reset_params();
       } elsif ($target eq 'web') {
    my $partid = $Apache::inputtags::part;
    my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffunit');
    &Apache::lonxml::debug("Got unit $hideunit for $partid $id");
    #no way to enter units, with radio buttons
    if (lc($hideunit) eq "yes") {
       my $unit=&Apache::lonxml::get_param_var('unit',$parstack,
       $safeeval);
       if ($unit =~ /\S/) { $result.=" (in $unit) "; }
    }
     }      }
     return $result;      return $result;
 }  }
Line 124  sub end_numericalresponse { Line 134  sub end_numericalresponse {
  &Apache::lonxml::debug("current $response");   &Apache::lonxml::debug("current $response");
  my $expression="&caparesponse_check_list('".$response."','".   my $expression="&caparesponse_check_list('".$response."','".
     $$parstack[-1];      $$parstack[-1];
    my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffunit');
  #no way to enter units, with radio buttons   #no way to enter units, with radio buttons
  if ($Apache::lonhomework::type eq 'exam') {   if ($Apache::lonhomework::type eq 'exam' ||
       lc($hideunit) eq "yes") {
     $expression.=';my $unit=undef;';      $expression.=';my $unit=undef;';
  }   }
  foreach my $key (keys(%Apache::inputtags::params)) {   foreach my $key (keys(%Apache::inputtags::params)) {

Removed from v.1.95  
changed lines
  Added in v.1.96


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