Diff for /loncom/homework/caparesponse/caparesponse.pm between versions 1.236 and 1.238

version 1.236, 2009/01/15 18:31:23 version 1.238, 2010/06/05 22:25:22
Line 305  sub start_numericalresponse { Line 305  sub start_numericalresponse {
  my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffunit');   my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffunit');
  &Apache::lonxml::debug("Got unit $hideunit for $partid $id");   &Apache::lonxml::debug("Got unit $hideunit for $partid $id");
  #no way to enter units, with radio buttons   #no way to enter units, with radio buttons
  if (lc($hideunit) eq "yes") {   if ((lc($hideunit) eq "yes") && ($Apache::lonhomework::type ne 'exam')) {
     my $unit=&Apache::lonxml::get_param_var('unit',$parstack,      my $unit=&Apache::lonxml::get_param_var('unit',$parstack,
     $safeeval);      $safeeval);
     if ($unit =~ /\S/) { $result.=" (in $unit) "; }      if ($unit =~ /\S/) { $result.=" (in $unit) "; }
Line 533  sub end_numericalresponse { Line 533  sub end_numericalresponse {
    $Apache::inputtags::params{'sig'});     $Apache::inputtags::params{'sig'});
  }   }
  &Apache::lonxml::debug("\n<br>result:$result:$Apache::lonxml::curdepth<br>\n");   &Apache::lonxml::debug("\n<br>result:$result:$Apache::lonxml::curdepth<br>\n");
  if ($Apache::lonhomework::type eq 'survey' &&                  if (($ad eq 'INCORRECT' || $ad eq 'APPROX_ANS' ||
     ($ad eq 'INCORRECT' || $ad eq 'APPROX_ANS' ||                       $ad eq 'EXACT_ANS')) {
      $ad eq 'EXACT_ANS')) {      if ($Apache::lonhomework::type eq 'survey') {
     $ad='SUBMITTED';          $ad='SUBMITTED';
  }      } elsif ($Apache::lonhomework::type eq 'surveycred') {
                           $ad='SUBMITTED_CREDIT';
                       } elsif ($Apache::lonhomework::type eq 'anonsurvey') {
                           $ad='ANONYMOUS';
                       } elsif ($Apache::lonhomework::type eq 'anonsurveycred') {
                           $ad='ANONYMOUS_CREDIT';                     
                       }
                   }
  &Apache::response::handle_previous(\%previous,$ad);   &Apache::response::handle_previous(\%previous,$ad);
  $Apache::lonhomework::results{"resource.$partid.$id.awarddetail"}=$ad;   $Apache::lonhomework::results{"resource.$partid.$id.awarddetail"}=$ad;
  $Apache::lonhomework::results{"resource.$partid.$id.awardmsg"}=$msg;   $Apache::lonhomework::results{"resource.$partid.$id.awardmsg"}=$msg;
Line 1186  sub end_stringresponse { Line 1193  sub end_stringresponse {
    \@final_msgs,     \@final_msgs,
    \@names,1);     \@names,1);
  }   }
  if ($Apache::lonhomework::type eq 'survey' &&                  if (($ad eq 'INCORRECT' || $ad eq 'APPROX_ANS' ||
     ($ad eq 'INCORRECT' || $ad eq 'APPROX_ANS' ||                       $ad eq 'EXACT_ANS')) {
      $ad eq 'EXACT_ANS')) {      if ($Apache::lonhomework::type eq 'survey') {
     $ad='SUBMITTED';          $ad='SUBMITTED';
  }      } elsif ($Apache::lonhomework::type eq 'surveycred') {
                           $ad='SUBMITTED_CREDIT';
                       } elsif ($Apache::lonhomework::type eq 'anonsurvey') {
                           $ad='ANONYMOUS';
                       } elsif ($Apache::lonhomework::type eq 'anonsurveycred') {
                           $ad='ANONYMOUS_CREDIT';
                       }
                   }
  &Apache::response::handle_previous(\%previous,$ad);   &Apache::response::handle_previous(\%previous,$ad);
  $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=$ad;   $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=$ad;
  $Apache::lonhomework::results{"resource.$part.$id.awardmsg"}=$msg;   $Apache::lonhomework::results{"resource.$part.$id.awardmsg"}=$msg;

Removed from v.1.236  
changed lines
  Added in v.1.238


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