[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Tue, 13 May 2003 20:38:55 -0000
sakharuk Tue May 13 16:38:55 2003 EDT
Modified files:
/loncom/homework structuretags.pm
Log:
Changes to print single resource with answers.
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.170 loncom/homework/structuretags.pm:1.171
--- loncom/homework/structuretags.pm:1.170 Mon May 12 09:50:08 2003
+++ loncom/homework/structuretags.pm Tue May 13 16:38:55 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.170 2003/05/12 13:50:08 www Exp $
+# $Id: structuretags.pm,v 1.171 2003/05/13 20:38:55 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -481,7 +481,7 @@
) {
if ($status eq 'CAN_ANSWER') {
if ($target ne 'tex') {
- $result.="</form></body>\n";
+ if ($ENV{'form.print_answer'} ne 'yes') {$result.="</form></body>\n";}
}
} elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER' ||
$status eq 'UNCHECKEDOUT' ) {
@@ -505,8 +505,10 @@
&finalize_storage();
}
if ($target eq 'answer' && ($ENV{'request.state'} eq 'construct') ) {
- $result.='</html>'; #normally we get it from xmlend, but in CSTR
- # we always show answer mode too.
+ if ($ENV{'form.print_answer'} ne 'yes') {
+ $result.='</html>'; #normally we get it from xmlend, but in CSTR
+ # we always show answer mode too.
+ }
}
} elsif ($target eq 'meta') {
if ($Apache::inputtags::part eq '0') {