[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 16 Feb 2004 19:50:10 -0000
albertel Mon Feb 16 14:50:10 2004 EDT
Modified files:
/loncom/homework structuretags.pm
Log:
- this 'set mode in CSTR space' makes testing some things much easier. <notsolved> and <solved> ignored 'Don't Show Feedback' settings
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.238 loncom/homework/structuretags.pm:1.239
--- loncom/homework/structuretags.pm:1.238 Mon Feb 16 14:19:31 2004
+++ loncom/homework/structuretags.pm Mon Feb 16 14:50:10 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.238 2004/02/16 19:19:31 albertel Exp $
+# $Id: structuretags.pm,v 1.239 2004/02/16 19:50:10 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1131,7 +1131,8 @@
$target eq 'tex') {
my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"};
&Apache::lonxml::debug("not solved has :$gradestatus:");
- if ($gradestatus =~ /^correct/) {
+ if ($gradestatus =~ /^correct/ &&
+ &Apache::response::show_answer()) {
&Apache::lonxml::debug("skipping");
&Apache::lonxml::get_all_text("/notsolved",$parser);
}
@@ -1148,7 +1149,8 @@
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||
$target eq 'tex') {
my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"};
- if ($gradestatus !~ /^correct/) {
+ if ($gradestatus !~ /^correct/ ||
+ !&Apache::response::show_answer()) {
&Apache::lonxml::get_all_text("/solved",$parser);
}
}