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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 22 Feb 2007 21:40:42 -0000


albertel		Thu Feb 22 16:40:42 2007 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - add in ability to explicitly control placement of gradeinfo display
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.225 loncom/homework/bridgetask.pm:1.226
--- loncom/homework/bridgetask.pm:1.225	Sat Feb 17 21:04:04 2007
+++ loncom/homework/bridgetask.pm	Thu Feb 22 16:40:40 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.225 2007/02/18 02:04:04 albertel Exp $
+# $Id: bridgetask.pm,v 1.226 2007/02/22 21:40:40 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2383,8 +2383,11 @@
 		    }
 		}
 		# puts the results at the end of the dimension
-		$result .= $dim_info;
-
+		if ($result =~m{<QuestionGradeInfo\s*/>}) {
+		    $result=~s{<QuestionGradeInfo\s*/>}{$dim_info};
+		} else {
+		    $result .= $dim_info;
+		}
 		# puts the results at the beginning of the dimension
 		# my $internal_location=&internal_location($dim);
 		# $result=~s/\Q$internal_location\E/$dim_info/;