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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 14 Nov 2006 22:12:58 -0000


albertel		Tue Nov 14 17:12:58 2006 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - sub sub questions not embedded in a <questionText> weren't being shown properly
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.204 loncom/homework/bridgetask.pm:1.205
--- loncom/homework/bridgetask.pm:1.204	Mon Nov 13 16:47:33 2006
+++ loncom/homework/bridgetask.pm	Tue Nov 14 17:12:58 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.204 2006/11/13 21:47:33 albertel Exp $
+# $Id: bridgetask.pm,v 1.205 2006/11/14 22:12:58 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2104,7 +2104,9 @@
     }
     push(@Apache::bridgetask::dimension,$dim);
     &Apache::lonxml::startredirection();
-    &enable_dimension_parsing($dim);
+    if (!&skip_dimension_parsing($dim)) {
+	&enable_dimension_parsing($dim);
+    }
     return &internal_location($dim);
 }
 
@@ -2247,13 +2249,20 @@
 				@{$dimension{$dim}{'criterias'}}) {
 		    my $type = $dimension{$dim}{'criteria.'.$id.'.type'};
 		    if ($type eq 'dimension') {
-			$result.=$dimension{$id}{'result'};
-			next;
+			if (defined($dimension{$id}{'result'})) {
+			    $result.=$dimension{$id}{'result'};
+			    next;
+			} else {
+			    $dim_info .=
+				&nested_parse(\$dimension{$dim}{'criteria.'.$id},
+					      [@_],{'set_dim_id' => $id});
+			}
+		    } else {
+			my $criteria =
+			    &nested_parse(\$dimension{$dim}{'criteria.'.$id},
+					  [@_]);
+			$dim_info .= &layout_web_Criteria($dim,$id,$criteria);
 		    }
-		    my $criteria = 
-			&nested_parse(\$dimension{$dim}{'criteria.'.$id},
-				      [@_]);
-		    $dim_info .= &layout_web_Criteria($dim,$id,$criteria);
 		}
 		# puts the results at the end of the dimension
 		$result .= $dim_info;