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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 23 May 2006 19:55:41 -0000


albertel		Tue May 23 15:55:41 2006 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - parsing the instance text during the grade pass in case the info is needed
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.152 loncom/homework/bridgetask.pm:1.153
--- loncom/homework/bridgetask.pm:1.152	Tue May 16 17:21:31 2006
+++ loncom/homework/bridgetask.pm	Tue May 23 15:55:40 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.152 2006/05/16 21:21:31 albertel Exp $
+# $Id: bridgetask.pm,v 1.153 2006/05/23 19:55:40 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1909,9 +1909,14 @@
 	    my $mandatory_failed=0;
 	    my $ungraded=0;
 	    my $review=0;
+
+	    @Apache::scripttag::parser_env = @_;
+	    $result.=&Apache::scripttag::xmlparse($dimension{'intro'});
 	    foreach my $id (@{$dimension{$instance.'.criterias'}},
 			    @{$dimension{'criterias'}}) {
 		my $link=&link($id);
+		@Apache::scripttag::parser_env = @_;
+		$result.=&Apache::scripttag::xmlparse($dimension{$instance.'.text'});
 		my $status=$Apache::lonhomework::results{"resource.$version.0.$dim.$id.status"}=$env{'form.HWVAL_'.$link};
 		$Apache::lonhomework::results{"resource.$version.0.$dim.$id.comment"}=$env{'form.HWVAL_comment_'.$link};
 		my $mandatory=($dimension{'criteria.'.$id.'.mandatory'} ne 'N');
@@ -1995,7 +2000,7 @@
 sub start_IntroParagraph {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
-    if ($target eq 'web' || $target eq 'webgrade') {
+    if ($target eq 'grade' || $target eq 'web' || $target eq 'webgrade') {
 	if ($tagstack->[-2] eq 'Dimension' || $tagstack->[-2] eq 'Question' ) {
 	    $dimension{'intro'}=
 		&Apache::lonxml::get_all_text('/introparagraph',
@@ -2037,7 +2042,7 @@
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $instance_id=$Apache::bridgetask::instance[-1];
     my $text=&Apache::lonxml::get_all_text('/instancetext',$parser,$style);
-    if ($target eq 'web' || $target eq 'webgrade') {
+    if ($target eq 'grade' || $target eq 'web' || $target eq 'webgrade') {
 	$dimension{$instance_id.'.text'}=$text;
     }
     return '';