[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 16 May 2003 19:01:27 -0000
albertel Fri May 16 15:01:27 2003 EDT
Modified files:
/loncom/homework lonhomework.pm
Log:
- if the student is excused, it should not allow one to answer the problem (BUG# 1443)
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.128 loncom/homework/lonhomework.pm:1.129
--- loncom/homework/lonhomework.pm:1.128 Fri May 16 13:41:17 2003
+++ loncom/homework/lonhomework.pm Fri May 16 15:01:27 2003
@@ -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 @@
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';
}
}