[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm structuretags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 16 Feb 2004 19:19:32 -0000
albertel Mon Feb 16 14:19:32 2004 EDT
Modified files:
/loncom/homework structuretags.pm lonhomework.pm
Log:
- BUG#1682, the ficred state 'Open and correct' Coupled with 'Don't Show Feedback' now works properly, I.e. it doesn't dhow feedback and state is properly set to 'CAN_ANSWER'
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.237 loncom/homework/structuretags.pm:1.238
--- loncom/homework/structuretags.pm:1.237 Mon Feb 16 13:40:18 2004
+++ loncom/homework/structuretags.pm Mon Feb 16 14:19:31 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.237 2004/02/16 18:40:18 albertel Exp $
+# $Id: structuretags.pm,v 1.238 2004/02/16 19:19:31 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -394,6 +394,11 @@
&initialize_storage();
if ($target eq 'web') {
&Apache::lonhomework::showhash(%Apache::lonhomework::history);
+ }
+ if ($ENV{'request.state'} eq 'construct' &&
+ $ENV{'form.problemstate'} eq 'CANNOT_ANSWER_correct' ) {
+ $Apache::lonhomework::history{'resource.0.solved'}=
+ 'correct_by_student';
}
$Apache::lonhomework::type=&Apache::lonnet::EXT('resource.0.type');
if (($ENV{'request.state'} eq 'construct') &&
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.166 loncom/homework/lonhomework.pm:1.167
--- loncom/homework/lonhomework.pm:1.166 Mon Feb 16 13:40:52 2004
+++ loncom/homework/lonhomework.pm Mon Feb 16 14:19:31 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.166 2004/02/16 18:40:52 albertel Exp $
+# $Id: lonhomework.pm,v 1.167 2004/02/16 19:19:31 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -201,9 +201,12 @@
my $passed;
if ($ENV{'request.state'} eq "construct") {
- if ($ENV{'form.problemstatus'}) {
+ if ($ENV{'form.problemstate'}) {
if ($ENV{'form.problemstate'} =~ /^CANNOT_ANSWER/) {
- return ('CANNOT_ANSWER','is in this state by royal decree.');
+ if ( ! ($ENV{'form.problemstate'} eq 'CANNOT_ANSWER_correct' &&
+ lc($Apache::lonhomework::problemstatus) eq 'no')) {
+ return ('CANNOT_ANSWER','is in this state by royal decree.');
+ }
} else {
return ($ENV{'form.problemstate'},
'is in this state by royal decree.');