Diff for /loncom/homework/hint.pm between versions 1.43 and 1.46

version 1.43, 2003/06/20 04:16:00 version 1.46, 2004/01/07 21:01:17
Line 50  sub start_hintgroup { Line 50  sub start_hintgroup {
  my $hinttries=&Apache::lonnet::EXT("resource.$id.hinttries");   my $hinttries=&Apache::lonnet::EXT("resource.$id.hinttries");
  if ( $hinttries eq '') { $hinttries = 1; }   if ( $hinttries eq '') { $hinttries = 1; }
  &Apache::lonxml::debug("found :$id:$numtries:$hinttries:");   &Apache::lonxml::debug("found :$id:$numtries:$hinttries:");
  if ( $numtries < $hinttries ) {   my $gradestatus=$Apache::lonhomework::history{"resource.$id.solved"};
    if ( $numtries < $hinttries || $gradestatus =~ /^correct/) {
     &Apache::lonxml::get_all_text("/hintgroup",$parser);      &Apache::lonxml::get_all_text("/hintgroup",$parser);
  }   }
  &Apache::lonxml::startredirection;   &Apache::lonxml::startredirection;
Line 102  sub start_numericalhint { Line 103  sub start_numericalhint {
     $result.=&Apache::edit::text_arg('Format:','format',$token,4).      $result.=&Apache::edit::text_arg('Format:','format',$token,4).
  &Apache::loncommon::help_open_topic('Numerical_Response_Format');   &Apache::loncommon::help_open_topic('Numerical_Response_Format');
  } elsif ($token->[1] eq 'stringhint') {   } elsif ($token->[1] eq 'stringhint') {
     $result.=&Apache::edit::select_arg('Type:','type',['cs','ci','mc'],$token);      $result.=&Apache::edit::select_arg('Type:','type',
       [['cs','Case Sensitive'],['ci','Case Insensitive'],
        ['mc','Case Insensitive, Any Order']],$token);
  } elsif ($token->[1] eq 'formulahint') {   } elsif ($token->[1] eq 'formulahint') {
     $result.=&Apache::edit::text_arg('Sample Points:','samples',$token,40);      $result.=&Apache::edit::text_arg('Sample Points:','samples',$token,40);
  }   }
Line 164  sub end_numericalhint { Line 167  sub end_numericalhint {
     $expression.=';my $type="float";';      $expression.=';my $type="float";';
  }   }
  $expression.="');";   $expression.="');";
    my @answer=&Apache::lonxml::get_param_var('answer',$parstack,$safeeval);
    &Apache::lonxml::debug('answer is'.join(':',@answer));
    @{$safeeval->varglob('CAPARESPONSE_CHECK_LIST_answer')}=@answer;
   
  $result = &Apache::run::run($expression,$safeeval);   $result = &Apache::run::run($expression,$safeeval);
  &Apache::lonxml::debug("$expression:result:$result:$Apache::lonxml::curdepth");   &Apache::lonxml::debug("$expression:result:$result:$Apache::lonxml::curdepth");
  my ($awards) = split /:/ , $result;   my ($awards) = split /:/ , $result;

Removed from v.1.43  
changed lines
  Added in v.1.46


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