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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Tue, 13 Nov 2007 19:48:12 -0000


albertel		Tue Nov 13 14:48:12 2007 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - ignore blank form.problemtype
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.409 loncom/homework/structuretags.pm:1.410
--- loncom/homework/structuretags.pm:1.409	Wed Oct 31 13:40:01 2007
+++ loncom/homework/structuretags.pm	Tue Nov 13 14:48:09 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.409 2007/10/31 17:40:01 albertel Exp $
+# $Id: structuretags.pm,v 1.410 2007/11/13 19:48:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -723,7 +723,7 @@
     if ($target ne 'analyze') {
 	$Apache::lonhomework::type=&Apache::lonnet::EXT('resource.0.type');
 	if (($env{'request.state'} eq 'construct') &&
-	    defined($env{'form.problemtype'})) {
+	    $env{'form.problemtype'} =~ /\S/) {
 	    $Apache::lonhomework::type=$env{'form.problemtype'};
 	}
 	&Apache::lonxml::debug("Found this to be of type :$Apache::lonhomework::type:");