--- loncom/homework/inputtags.pm 2003/09/23 01:52:57 1.114.2.1 +++ loncom/homework/inputtags.pm 2003/10/15 22:20:13 1.114.2.4 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.114.2.1 2003/09/23 01:52:57 albertel Exp $ +# $Id: inputtags.pm,v 1.114.2.4 2003/10/15 22:20:13 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -517,6 +517,9 @@ sub setgradedata { } elsif ( $award eq 'INCORRECT' ) { $Apache::lonhomework::results{"resource.$id.tries"} = $Apache::lonhomework::history{"resource.$id.tries"} + 1; + if (lc($Apache::lonhomework::problemstatus) eq 'no') { + $Apache::lonhomework::results{"resource.$id.awarded"} = 0; + } $Apache::lonhomework::results{"resource.$id.solved"} = 'incorrect_attempted' } elsif ( $award eq 'SUBMITTED' ) { @@ -536,6 +539,7 @@ sub setgradedata { if (lc($Apache::lonhomework::problemstatus) eq 'no') { $Apache::lonhomework::results{"resource.$id.tries"} = $Apache::lonhomework::history{"resource.$id.tries"} + 1; + $Apache::lonhomework::results{"resource.$id.awarded"} = 0; } } @@ -616,7 +620,8 @@ sub gradestatus { my $status = $Apache::inputtags::status['-1']; &Apache::lonxml::debug("gradestatus has :$status:"); - if ( $status ne 'CLOSED' && $status ne 'UNAVAILABLE') { + if ( $status ne 'CLOSED' && $status ne 'UNAVAILABLE' && + $status ne 'INVALID_ACCESS') { my $award = $Apache::lonhomework::history{"resource.$id.award"}; my $solved = $Apache::lonhomework::history{"resource.$id.solved"}; my $previous = $Apache::lonhomework::history{"resource.$id.previous"};