Diff for /loncom/homework/hint.pm between versions 1.42 and 1.45

version 1.42, 2003/05/09 20:44:54 version 1.45, 2003/06/24 20:41:56
Line 102  sub start_numericalhint { Line 102  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 158  sub end_numericalhint { Line 160  sub end_numericalhint {
     $expression.= ';my $'. #'      $expression.= ';my $'. #'
  $key.'="'.$Apache::inputtags::params{$key}.'"';   $key.'="'.$Apache::inputtags::params{$key}.'"';
  }   }
    if ($$tagstack[-1] eq 'formulahint') {
       $expression.=';my $type="fml";';
    } elsif ($$tagstack[-1] eq 'numericalhint') {
       $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.42  
changed lines
  Added in v.1.45


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