--- loncom/homework/inputtags.pm 2002/07/25 20:55:13 1.58 +++ loncom/homework/inputtags.pm 2002/08/01 15:18:58 1.59 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.58 2002/07/25 20:55:13 ng Exp $ +# $Id: inputtags.pm,v 1.59 2002/08/01 15:18:58 ng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -232,6 +232,9 @@ sub finalizeawards { foreach $award (@_) { if ($award eq 'INCORRECT') {$result=$award; last;} } } if ($result eq '' ) { + foreach $award (@_) { if ($award eq 'DRAFT') {$result=$award; last;} } + } + if ($result eq '' ) { foreach $award (@_) { if ($award eq 'SUBMITTED') {$result=$award; last;} } } if ($result eq '' ) { @@ -298,6 +301,9 @@ sub decideoutput { } elsif ($award eq 'SUBMITTED') { $message = "Your submission has been recorded."; $button=1; + } elsif ($award eq 'DRAFT') { + $message = "A draft copy has been saved."; + $button=1; } else { $message = "Unknown message: $award"; $button=1; @@ -327,12 +333,14 @@ sub setgradedata { $Apache::lonhomework::results{"resource.$id.tries"} = $Apache::lonhomework::history{"resource.$id.tries"} + 1; $Apache::lonhomework::results{"resource.$id.solved"} = - 'incorrect_attempted'; + 'incorrect_attempted' } elsif ( $award eq 'SUBMITTED' ) { $Apache::lonhomework::results{"resource.$id.tries"} = $Apache::lonhomework::history{"resource.$id.tries"} + 1; $Apache::lonhomework::results{"resource.$id.solved"} = 'ungraded_attempted'; + } elsif ( $award eq 'DRAFT' ) { + $Apache::lonhomework::results{"resource.$id.solved"} = ''; } elsif ( $award eq 'NO_RESPONSE' ) { return ''; } else {