Diff for /loncom/homework/caparesponse/caparesponse.pm between versions 1.228 and 1.234

version 1.228, 2008/09/04 13:49:19 version 1.234, 2008/09/20 00:25:39
Line 310  sub start_numericalresponse { Line 310  sub start_numericalresponse {
     $safeeval);      $safeeval);
     if ($unit =~ /\S/) { $result.=" (in $unit) "; }      if ($unit =~ /\S/) { $result.=" (in $unit) "; }
  }   }
         if (($token->[1] eq 'formularesponse') &&   
             ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')) {  
         }  
  if (  &Apache::response::show_answer() ) {   if (  &Apache::response::show_answer() ) {
     &set_answertext($tag_internal_answer_name,$target,$token,$tagstack,      &set_answertext($tag_internal_answer_name,$target,$token,$tagstack,
     $parstack,$parser,$safeeval,-1);      $parstack,$parser,$safeeval,-1);
Line 430  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 606  sub end_numericalresponse { Line 607  sub end_numericalresponse {
     }      }
  }   }
         if (($target eq 'web') && ($tag eq 'formularesponse')          if (($target eq 'web') && ($tag eq 'formularesponse')
             && ($Apache::lonhomework::type ne 'exam')) {              && ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')
       && (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoneditor') ne 'no')){   
            $result.=&Apache::response::edit_mathresponse_button($id,"HWVAL_$id");             $result.=&Apache::response::edit_mathresponse_button($id,"HWVAL_$id");
         }          }
                           
Line 1159  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.228  
changed lines
  Added in v.1.234


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