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

version 1.223, 2008/03/06 16:28:22 version 1.230, 2008/09/08 16:08:37
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 510  sub end_numericalresponse { Line 513  sub end_numericalresponse {
  &Apache::lonxml::debug($$parstack[-1] . "\n<br>");   &Apache::lonxml::debug($$parstack[-1] . "\n<br>");
   
  if ( &Apache::response::submitted('scantron')) {   if ( &Apache::response::submitted('scantron')) {
     &add_in_tag_answer($parstack,$safeeval);      &add_in_tag_answer($parstack,$safeeval);
     my ($values,$display)=&make_numerical_bubbles($partid,$id,      my ($values,$display)=&make_numerical_bubbles($partid,$id,
   $target,$parstack,$safeeval);    $target,$parstack,$safeeval);
     $response=$values->[$response];      $response=$values->[$response];
  }   }
  $Apache::lonhomework::results{"resource.$partid.$id.submission"}=$response;   $Apache::lonhomework::results{"resource.$partid.$id.submission"}=$response;
  my ($ad,$msg,$name)=&check_submission($response,$partid,$id,   my ($ad,$msg,$name)=&check_submission($response,$partid,$id,
       $tag,$parstack,        $tag,$parstack,
       $safeeval);        $safeeval);
Line 602  sub end_numericalresponse { Line 605  sub end_numericalresponse {
  }   }
     }      }
  }   }
           if (($target eq 'web') && ($tag eq 'formularesponse')
               && ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')&&  (&Apache::lonxml::get_param('turnoneditor',$parstack,$safeeval) ne 'no')) {
              $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 686  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]";

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


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