--- loncom/homework/lonhomework.pm 2011/11/14 00:20:39 1.330 +++ loncom/homework/lonhomework.pm 2011/11/29 13:24:38 1.331 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.330 2011/11/14 00:20:39 raeburn Exp $ +# $Id: lonhomework.pm,v 1.331 2011/11/29 13:24:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -442,13 +442,13 @@ sub check_access { $Apache::lonhomework::results{'resource.'.$id.'.maxtries'}=$maxtries; if ($maxtries && $tries >= $maxtries) { $status = 'CANNOT_ANSWER'; } # if (correct and show prob status) or excused then CANNOT_ANSWER - if(($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/ - && - &show_problem_status() - && - $Apache::lonhomework::history{"resource.$id.awarded"}==1) - || - $Apache::lonhomework::history{"resource.$id.solved"}=~/^excused/) { + if ( ($Apache::lonhomework::history{"resource.$id.solved"}=~/^correct/) + && (&show_problem_status()) ) { + if (&Apache::inputtags::grading_is_nonlenient($id) || + $Apache::lonhomework::history{"resource.$id.awarded"} == 1) { + $status = 'CANNOT_ANSWER'; + } + } elsif ($Apache::lonhomework::history{"resource.$id.solved"}=~/^excused/) { $status = 'CANNOT_ANSWER'; } if ($status eq 'CANNOT_ANSWER'