[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 13 Feb 2004 21:27:22 -0000
albertel Fri Feb 13 16:27:22 2004 EDT
Modified files:
/loncom/homework lonhomework.pm
Log:
- but ignore maxtries in construct
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.163 loncom/homework/lonhomework.pm:1.164
--- loncom/homework/lonhomework.pm:1.163 Fri Feb 13 16:21:30 2004
+++ loncom/homework/lonhomework.pm Fri Feb 13 16:27:22 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.163 2004/02/13 21:21:30 albertel Exp $
+# $Id: lonhomework.pm,v 1.164 2004/02/13 21:27:22 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -267,8 +267,9 @@
my $tries = $Apache::lonhomework::history{"resource.$id.tries"};
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 ( $maxtries eq '' &&
+ $ENV{'request.state'} ne 'construct') { $maxtries = '2'; }
+ 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/
&&