--- loncom/homework/lonhomework.pm 2004/02/16 18:40:52 1.166 +++ loncom/homework/lonhomework.pm 2004/02/16 19:19:31 1.167 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.166 2004/02/16 18:40:52 albertel Exp $ +# $Id: lonhomework.pm,v 1.167 2004/02/16 19:19:31 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -201,9 +201,12 @@ sub check_access { my $passed; if ($ENV{'request.state'} eq "construct") { - if ($ENV{'form.problemstatus'}) { + if ($ENV{'form.problemstate'}) { if ($ENV{'form.problemstate'} =~ /^CANNOT_ANSWER/) { - return ('CANNOT_ANSWER','is in this state by royal decree.'); + if ( ! ($ENV{'form.problemstate'} eq 'CANNOT_ANSWER_correct' && + lc($Apache::lonhomework::problemstatus) eq 'no')) { + return ('CANNOT_ANSWER','is in this state by royal decree.'); + } } else { return ($ENV{'form.problemstate'}, 'is in this state by royal decree.');