Diff for /loncom/homework/response.pm between versions 1.149 and 1.150

version 1.149, 2006/10/17 19:35:37 version 1.150, 2006/12/04 20:35:06
Line 470  sub start_mathresponse { Line 470  sub start_mathresponse {
  $result.=&Apache::edit::tag_start($target,$token);   $result.=&Apache::edit::tag_start($target,$token);
  $result.=&Apache::edit::text_arg('String to display for answer:',   $result.=&Apache::edit::text_arg('String to display for answer:',
  'answerdisplay',$token);   'answerdisplay',$token);
    $result.=&Apache::edit::select_arg('Algebra System:',
      'cas',
      ['maxima'],
      $token);
    $result.=&Apache::edit::text_arg('Algebra System:',
    'cas',$token);
    $result.=&Apache::edit::text_arg('Argument Array:',
    'args',$token);
  $result.=&Apache::edit::end_row().&Apache::edit::start_spanning_row();   $result.=&Apache::edit::end_row().&Apache::edit::start_spanning_row();
     } elsif ($target eq 'modified') {      } elsif ($target eq 'modified') {
  my $constructtag;   my $constructtag;
Line 494  sub end_mathresponse { Line 502  sub end_mathresponse {
     my $id=$Apache::inputtags::response[-1];      my $id=$Apache::inputtags::response[-1];
     if ( $target eq 'grade' && &Apache::response::submitted() ) {      if ( $target eq 'grade' && &Apache::response::submitted() ) {
  my $response = &Apache::response::getresponse();   my $response = &Apache::response::getresponse();
  if ( $response =~ /[^\s]/ &&    if ( $response =~ /[^\s]/ ) {
      $Apache::response::custom_answer_type eq 'loncapa/perl') {  
     if (!$Apache::lonxml::default_homework_loaded) {      if (!$Apache::lonxml::default_homework_loaded) {
  &Apache::lonxml::default_homework_load($safeeval);   &Apache::lonxml::default_homework_load($safeeval);
     }      }
Line 509  sub end_mathresponse { Line 516  sub end_mathresponse {
           
     my $award = &Apache::run::run('{ my $submission=$LONCAPA::mathresponse_submission;'.$Apache::response::custom_answer.'}',$safeeval);      my $award = &Apache::run::run('{ my $submission=$LONCAPA::mathresponse_submission;'.$Apache::response::custom_answer.'}',$safeeval);
     if (!&Apache::inputtags::valid_award($award)) {      if (!&Apache::inputtags::valid_award($award)) {
  $error = $award;   if ($award==1) {
  $award = 'ERROR';      $award='EXACT_ANS';
    } elsif ($award==0) {
       $award='INCORRECT';
    } else {
       $error = $award;
       $award = 'ERROR';
    }
     }      }
     &Apache::response::handle_previous(\%previous,$award);      &Apache::response::handle_previous(\%previous,$award);
     $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=      $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=

Removed from v.1.149  
changed lines
  Added in v.1.150


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