--- loncom/homework/lonhomework.pm 2003/05/09 17:01:08 1.122 +++ loncom/homework/lonhomework.pm 2003/05/13 01:56:32 1.126 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.122 2003/05/09 17:01:08 albertel Exp $ +# $Id: lonhomework.pm,v 1.126 2003/05/13 01:56:32 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -61,7 +61,8 @@ BEGIN { } sub get_target { - if ( $ENV{'request.state'} eq "published") { + if (($ENV{'request.state'} eq "published") || + ($ENV{'request.state'} eq "uploaded")) { if ( defined($ENV{'form.grade_target'} ) && ($ENV{'form.grade_target'} eq 'tex')) { return ($ENV{'form.grade_target'}); @@ -214,7 +215,8 @@ sub check_access { if ( $tries eq '' ) { $tries = '0'; } if ( $maxtries eq '' ) { $maxtries = '2'; } if ($tries >= $maxtries) { $status = 'CANNOT_ANSWER'; } - if($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/) { + if($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/ + && lc($Apache::lonhomework::problemstatus) ne 'no') { $status = 'CANNOT_ANSWER'; } }