version 1.44, 2003/06/20 04:18:49
|
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 166 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; |