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

albertel lon-capa-cvs@mail.lon-capa.org
Sun, 29 Aug 2004 07:49:36 -0000


albertel		Sun Aug 29 03:49:36 2004 EDT

  Modified files:              
    /loncom/homework	response.pm structuretags.pm 
  Log:
  - BUG# 3336, was waring incorrectly about not finding a <part> around a <response>
  
  
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.100 loncom/homework/response.pm:1.101
--- loncom/homework/response.pm:1.100	Tue Jun 29 18:32:14 2004
+++ loncom/homework/response.pm	Sun Aug 29 03:49:35 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.100 2004/06/29 22:32:14 albertel Exp $
+# $Id: response.pm,v 1.101 2004/08/29 07:49:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -46,7 +46,8 @@
     push (@Apache::inputtags::response,$id);
     push (@Apache::inputtags::responselist,$id);
     @Apache::inputtags::inputlist=();
-    if ($Apache::inputtags::part eq '') {
+    if ($Apache::inputtags::part eq '' && 
+	!$Apache::lonhomework::ignore_response_errors) {
 	&Apache::lonxml::error(&HTML::Entities::encode(&mt("Found a <*response> outside of a <part> in a <part>ed problem"),'<>&"'));
     }
     if ($Apache::inputtags::response_with_no_part &&
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.265 loncom/homework/structuretags.pm:1.266
--- loncom/homework/structuretags.pm:1.265	Wed Aug 25 15:16:25 2004
+++ loncom/homework/structuretags.pm	Sun Aug 29 03:49:35 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.265 2004/08/25 19:16:25 sakharuk Exp $
+# $Id: structuretags.pm,v 1.266 2004/08/29 07:49:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -354,12 +354,13 @@
     if ($type eq 'problem') {
 	$Apache::inputtags::part='0';
 	@Apache::inputtags::partlist=('0');
-
-	$Apache::lonhomework::problemstatus=&get_problem_status('0')
-    } else {
+	$Apache::lonhomework::problemstatus=&get_problem_status('0');
+	$Apache::lonhomework::ignore_response_errors=0;
+    } elsif ($type eq 'library') {
 	$Apache::inputtags::part='';
 	@Apache::inputtags::partlist=();
 	$Apache::lonhomework::problemstatus='';	
+	$Apache::lonhomework::ignore_response_errors=1;
     }
     @Apache::inputtags::responselist = ();
     @Apache::inputtags::importlist = ();