--- loncom/homework/lonhomework.pm 2003/05/16 17:41:17 1.128 +++ loncom/homework/lonhomework.pm 2003/05/16 19:01:27 1.129 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.128 2003/05/16 17:41:17 albertel Exp $ +# $Id: lonhomework.pm,v 1.129 2003/05/16 19:01:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -214,9 +214,13 @@ sub check_access { my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries"); if ( $tries eq '' ) { $tries = '0'; } if ( $maxtries eq '' ) { $maxtries = '2'; } - if ($tries >= $maxtries) { $status = 'CANNOT_ANSWER'; } - if($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/ - && lc($Apache::lonhomework::problemstatus) ne 'no') { + if ($tries >= $maxtries) { $status = 'CANNOT_ANSWER'; } + # if (correct and show prob status) or excused then CANNOT_ANSWER + if(($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/ + && + lc($Apache::lonhomework::problemstatus) ne 'no') + || + $Apache::lonhomework::history{"resource.$id.solved"}=~/^excused/) { $status = 'CANNOT_ANSWER'; } }