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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 14 Jun 2006 15:47:58 -0000


albertel		Wed Jun 14 11:47:58 2006 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - need to output nested Question when not yet graded
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.171 loncom/homework/bridgetask.pm:1.172
--- loncom/homework/bridgetask.pm:1.171	Tue Jun 13 17:34:28 2006
+++ loncom/homework/bridgetask.pm	Wed Jun 14 11:47: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.171 2006/06/13 21:34:28 albertel Exp $
+# $Id: bridgetask.pm,v 1.172 2006/06/14 15:47:58 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1922,6 +1922,7 @@
 	    &Apache::lonxml::get_param('Mandatory',$parstack,$safeeval);
 	push(@{$dimension{$previous_dim}{'criterias'}},$dim);
 	$dimension{$dim}{'nested'}=$previous_dim;
+	&Apache::lonxml::debug("adding $dim as criteria to $previous_dim");
     } else {
 	$Apache::bridgetask::top_dimensionlist{$dim}{'manadatory'}=
 	    &Apache::lonxml::get_param('Mandatory',$parstack,$safeeval);
@@ -2104,6 +2105,14 @@
 			}
 			$result.='</div>';
 		    }
+		} else {
+		    foreach my $id (@{$dimension{$dim}{$instance.'.criterias'}},
+				    @{$dimension{$dim}{'criterias'}}) {
+			my $type = $dimension{$dim}{'criteria.'.$id.'.type'};
+			if ($type eq 'dimension') {
+			    $result.=$dimension{$id}{'result'};
+			}
+		    }
 		}
 	    }
 	    if (exists($dimension{$dim}{'nested'})) {