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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Tue, 24 Jul 2007 18:03:54 -0000


albertel		Tue Jul 24 14:03:54 2007 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - BUG#4678, handle <block condition=""> correctly
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.384 loncom/homework/structuretags.pm:1.385
--- loncom/homework/structuretags.pm:1.384	Mon Jul 23 19:30:47 2007
+++ loncom/homework/structuretags.pm	Tue Jul 24 14:03:54 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.384 2007/07/23 23:30:47 albertel Exp $
+# $Id: structuretags.pm,v 1.385 2007/07/24 18:03:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1081,7 +1081,7 @@
     if ($target eq 'web' || $target eq 'grade'   || $target eq 'answer'  ||
 	$target eq 'tex' || $target eq 'analyze' || $target eq 'webgrade') {
 	my $code = $token->[2]->{'condition'};
-	if (defined($code)) {
+	if (defined($code) && $code ne '') {
 	    if (!$Apache::lonxml::default_homework_loaded) {
 		&Apache::lonxml::default_homework_load($safeeval);
 	    }