version 1.185, 2005/12/01 18:46:31
|
version 1.186.2.1, 2006/06/09 16:31:00
|
Line 229 sub start_textline {
|
Line 229 sub start_textline {
|
$Apache::lonxml::evaluate--; |
$Apache::lonxml::evaluate--; |
my $partid=$Apache::inputtags::part; |
my $partid=$Apache::inputtags::part; |
my $id=$Apache::inputtags::response[-1]; |
my $id=$Apache::inputtags::response[-1]; |
if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') { |
if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER' |
|
|| ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER' && |
|
$Apache::lonhomework::history{"resource.$partid.solved"} !~ /^correct/ )) { |
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); |
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); |
my $maxlength; |
my $maxlength; |
if ($size eq '') { $size=20; } else { |
if ($size eq '') { $size=20; } else { |
Line 244 sub start_textline {
|
Line 246 sub start_textline {
|
} |
} |
my $readonly=&Apache::lonxml::get_param('readonly',$parstack, |
my $readonly=&Apache::lonxml::get_param('readonly',$parstack, |
$safeeval); |
$safeeval); |
if (lc($readonly) eq 'yes') { |
if (lc($readonly) eq 'yes' |
|
|| $Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') { |
$readonly=' readonly="readonly" '; |
$readonly=' readonly="readonly" '; |
} else { |
} else { |
$readonly=''; |
$readonly=''; |
} |
} |
$result.= '<input type="text" '.$readonly.' name="HWVAL_'.$id.'" value="'. |
my $name = 'HWVAL_'.$id; |
|
if ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') { |
|
$name = "none"; |
|
} |
|
$result.= '<input type="text" '.$readonly.' name="'.$name.'" value="'. |
$oldresponse.'" size="'.$size.'" maxlength="'.$maxlength.'" />'; |
$oldresponse.'" size="'.$size.'" maxlength="'.$maxlength.'" />'; |
} |
} |
} else { |
} else { |
Line 622 sub decideoutput {
|
Line 629 sub decideoutput {
|
$bgcolor=$possiblecolors{'correct'}; |
$bgcolor=$possiblecolors{'correct'}; |
$button=0; |
$button=0; |
} elsif ($award eq '') { |
} elsif ($award eq '') { |
$bgcolor=$possiblecolors{'not_charged_try'}; |
if ($handgrade && $Apache::inputtags::status[-1] eq 'SHOW_ANSWER') { |
|
$message = &mt("Nothing submitted."); |
|
$bgcolor=$possiblecolors{'charged_try'}; |
|
} else { |
|
$bgcolor=$possiblecolors{'not_charged_try'}; |
|
} |
$button=1; |
$button=1; |
} else { |
} else { |
$message = &mt("Unknown message").": $award"; |
$message = &mt("Unknown message").": $award"; |