--- loncom/homework/inputtags.pm 2001/06/27 18:51:37 1.36
+++ loncom/homework/inputtags.pm 2001/07/13 14:02:35 1.38
@@ -31,6 +31,7 @@ sub initialize_inputtags {
sub start_input {
my ($parstack,$safeeval)=@_;
my $id = &Apache::lonxml::get_param('id',$parstack,$safeeval);
+ if ($id eq '') { $id = $Apache::lonxml::curdepth; }
push (@Apache::inputtags::input,$id);
push (@Apache::inputtags::inputlist,$id);
return $id;
@@ -158,9 +159,22 @@ sub decideoutput {
my ($award,$solved)=@_;
my $message='';
my $button=0;
- if ($solved =~ /^correct/ || $award eq 'EXACT_ANS' || $award eq 'APPROX_ANS' ) {
- $message = "You are correct. Your receipt is ".&Apache::lonnet::receipt;
+ if ($solved =~ /^correct/) {
+ $message = "You are correct. Your receipt is ".
+ &Apache::lonnet::receipt;
$button=0;
+ } elsif ($solved =~ /^excused/) {
+ $message = "You are excused from the problem.";
+ $button=0;
+ } elsif ($award eq 'EXACT_ANS' || $award eq 'APPROX_ANS' ) {
+ if ($solved =~ /^incorrect/ || $solved eq '') {
+ $message = "Incorrect";
+ $button=1;
+ } else {
+ $message = "You are correct. Your receipt is ".
+ &Apache::lonnet::receipt;
+ $button=0;
+ }
} elsif ($award eq 'NO_RESPONSE') {
$message = '';
$button=1;