[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 16 Feb 2004 17:20:39 -0000


albertel		Mon Feb 16 12:20:39 2004 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - BUG #1682, okay problem state is wired up some, 'exceeded tries' and 'got correct' isn't et functional but getting there
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.164 loncom/homework/lonhomework.pm:1.165
--- loncom/homework/lonhomework.pm:1.164	Fri Feb 13 16:27:22 2004
+++ loncom/homework/lonhomework.pm	Mon Feb 16 12:20:39 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.164 2004/02/13 21:27:22 albertel Exp $
+# $Id: lonhomework.pm,v 1.165 2004/02/16 17:20:39 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -201,6 +201,14 @@
     my $passed;
 
     if ($ENV{'request.state'} eq "construct") {
+	if (defined($ENV{'form.problemstatus'})) {
+	    if ($ENV{'form.problemstate'} =~ /^CANNOT_ANSWER/) {
+		return ('CANNOT_ANSWER','is in this state by royal decree.');
+	    } else {
+		return ($ENV{'form.problemstate'},
+			'is in this state by royal decree.');
+	    }
+	}
 	&Apache::lonxml::debug("in construction ignoring dates");
 	$status='CAN_ANSWER';
 	$datemsg=&mt('is in under construction');