--- loncom/homework/lonhomework.pm 2011/02/12 01:36:21 1.324 +++ loncom/homework/lonhomework.pm 2011/06/06 16:48:39 1.326 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.324 2011/02/12 01:36:21 www Exp $ +# $Id: lonhomework.pm,v 1.326 2011/06/06 16:48:39 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -434,11 +434,14 @@ sub check_access { if ( $tries eq '' ) { $tries = '0'; } if ( $maxtries eq '' && $env{'request.state'} ne 'construct') { $maxtries = '2'; } + $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()) + &show_problem_status() + && + $Apache::lonhomework::history{"resource.$id.awarded"}==1) || $Apache::lonhomework::history{"resource.$id.solved"}=~/^excused/) { $status = 'CANNOT_ANSWER';