[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm edit.pm hint.pm imageresponse.pm inputtags.pm randomlabel.pm structuretags.pm /homework/caparesponse caparesponse.pm /xml languagetags.pm londefdef.pm lonplot.pm scripttag.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 01 Dec 2005 18:46:49 -0000


This is a MIME encoded message

--albertel1133462809
Content-Type: text/plain

albertel		Thu Dec  1 13:46:49 2005 EDT

  Modified files:              
    /loncom/xml	languagetags.pm londefdef.pm lonplot.pm scripttag.pm 
    /loncom/homework	bridgetask.pm edit.pm hint.pm imageresponse.pm 
                    	inputtags.pm randomlabel.pm structuretags.pm 
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  - finish off the conversion to allowing style tags get_all_text across tags
  - BUG#4428
  
  
  
--albertel1133462809
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20051201134649.txt"

Index: loncom/xml/languagetags.pm
diff -u loncom/xml/languagetags.pm:1.1 loncom/xml/languagetags.pm:1.2
--- loncom/xml/languagetags.pm:1.1	Sat Oct 11 17:06:11 2003
+++ loncom/xml/languagetags.pm	Thu Dec  1 13:46:17 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Locale-related tags
 #
-# $Id: languagetags.pm,v 1.1 2003/10/11 21:06:11 www Exp $
+# $Id: languagetags.pm,v 1.2 2005/12/01 18:46:17 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -38,8 +38,8 @@
 # ================================================================ The <mt> tag
 
 sub start_mt {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-    return &Apache::lonlocal::mt(&Apache::lonxml::get_all_text("/mt",$parser));
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+    return &Apache::lonlocal::mt(&Apache::lonxml::get_all_text("/mt",$parser,$style));
 }
 
 sub end_mt {
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.298 loncom/xml/londefdef.pm:1.299
--- loncom/xml/londefdef.pm:1.298	Mon Nov 28 19:08:10 2005
+++ loncom/xml/londefdef.pm	Thu Dec  1 13:46:17 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.298 2005/11/29 00:08:10 foxr Exp $
+# $Id: londefdef.pm,v 1.299 2005/12/01 18:46:17 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -145,10 +145,11 @@
 }
 
 sub start_tthoption {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
     my $result;
     if ($target eq 'web') {
-	my $inside = &Apache::lonxml::get_all_text("/tthoption",$parser);
+	my $inside = &Apache::lonxml::get_all_text("/tthoption",$parser,
+						   $style);
 	$inside=~s/^\s*//;
 	if ($env{'browser.mathml'}) {
 	    &tth::ttmoptions($inside);
@@ -385,13 +386,13 @@
 
 #-- <meta> tag (end tag forbidden)
 sub start_meta {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
     my $currentstring = '';
     if ($target eq 'web') {
 	my $args='';
 	if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }
 	if ($args eq '') {
-	    &Apache::lonxml::get_all_text("/meta",$parser);
+	    &Apache::lonxml::get_all_text("/meta",$parser,$style);
 	} else {
 	    $currentstring = $token->[4];
 	}
@@ -454,7 +455,7 @@
 
 # accessrule
 sub start_accessrule {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
     my $currentstring = '';
     my $eff=&Apache::lonxml::get_param
 	('effect',$parstack,$safeeval,undef,1);
@@ -473,7 +474,7 @@
 	my $args='';
 	if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }
 	if ($args eq '') {
-	    &Apache::lonxml::get_all_text("/accessrule",$parser);
+	    &Apache::lonxml::get_all_text("/accessrule",$parser,$style);
 	} else {
 	    $currentstring = $token->[4];
 	}
@@ -2580,11 +2581,11 @@
 #         (Note there seems to also be support for this as a % of page size)
 #      
 sub start_img {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_;
     my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval,
 					 undef,1);
     if (not $src and ($target eq 'web' or $target eq 'tex')) { 
-	my $inside = &Apache::lonxml::get_all_text("/img",$parser);
+	my $inside = &Apache::lonxml::get_all_text("/img",$parser,$style);
 	return '';
     }
     &Apache::lonxml::extlink($src);
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.111 loncom/xml/lonplot.pm:1.112
--- loncom/xml/lonplot.pm:1.111	Tue Jul  5 11:05:13 2005
+++ loncom/xml/lonplot.pm	Thu Dec  1 13:46:17 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.111 2005/07/05 15:05:13 albertel Exp $
+# $Id: lonplot.pm,v 1.112 2005/12/01 18:46:17 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -698,7 +698,7 @@
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result='';
     if ($target eq 'web' || $target eq 'tex') {
-	$title = &Apache::lonxml::get_all_text("/title",$parser);
+	$title = &Apache::lonxml::get_all_text("/title",$parser,$style);
 	$title=&Apache::run::evaluate($title,$safeeval,$$parstack[-1]);
 	$title =~ s/\n/ /g;
 	if (length($title) > $max_str_len) {
@@ -706,7 +706,7 @@
 	}
     } elsif ($target eq 'edit') {
 	$result.=&Apache::edit::tag_start($target,$token,'Plot Title');
-	my $text=&Apache::lonxml::get_all_text("/title",$parser);
+	my $text=&Apache::lonxml::get_all_text("/title",$parser,$style);
 	$result.=&Apache::edit::end_row().
 	    &Apache::edit::start_spanning_row().
 	    &Apache::edit::editline('',$text,'',60);
@@ -731,7 +731,7 @@
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result='';
     if ($target eq 'web' || $target eq 'tex') {
-	$xlabel = &Apache::lonxml::get_all_text("/xlabel",$parser);
+	$xlabel = &Apache::lonxml::get_all_text("/xlabel",$parser,$style);
 	$xlabel=&Apache::run::evaluate($xlabel,$safeeval,$$parstack[-1]);
 	$xlabel =~ s/\n/ /g;
 	if (length($xlabel) > $max_str_len) {
@@ -739,7 +739,7 @@
 	}
     } elsif ($target eq 'edit') {
 	$result.=&Apache::edit::tag_start($target,$token,'Plot Xlabel');
-	my $text=&Apache::lonxml::get_all_text("/xlabel",$parser);
+	my $text=&Apache::lonxml::get_all_text("/xlabel",$parser,$style);
 	$result.=&Apache::edit::end_row().
 	    &Apache::edit::start_spanning_row().
 	    &Apache::edit::editline('',$text,'',60);
@@ -765,7 +765,7 @@
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result='';
     if ($target eq 'web' || $target eq 'tex') {
-	$ylabel = &Apache::lonxml::get_all_text("/ylabel",$parser);
+	$ylabel = &Apache::lonxml::get_all_text("/ylabel",$parser,$style);
 	$ylabel = &Apache::run::evaluate($ylabel,$safeeval,$$parstack[-1]);
 	$ylabel =~ s/\n/ /g;
 	if (length($ylabel) > $max_str_len) {
@@ -773,7 +773,7 @@
 	}
     } elsif ($target eq 'edit') {
 	$result .= &Apache::edit::tag_start($target,$token,'Plot Ylabel');
-	my $text = &Apache::lonxml::get_all_text("/ylabel",$parser);
+	my $text = &Apache::lonxml::get_all_text("/ylabel",$parser,$style);
 	$result .= &Apache::edit::end_row().
 	    &Apache::edit::start_spanning_row().
 	    &Apache::edit::editline('',$text,'',60);
@@ -802,7 +802,7 @@
 	my %label;
 	&get_attributes(\%label,\%label_defaults,$parstack,$safeeval,
 		    $tagstack->[-1]);
-	my $text = &Apache::lonxml::get_all_text("/label",$parser);
+	my $text = &Apache::lonxml::get_all_text("/label",$parser,$style);
 	$text = &Apache::run::evaluate($text,$safeeval,$$parstack[-1]);
 	$text =~ s/\n/ /g;
 	$text = substr($text,0,$max_str_len) if (length($text) > $max_str_len);
@@ -811,7 +811,7 @@
     } elsif ($target eq 'edit') {
 	$result .= &Apache::edit::tag_start($target,$token,'Plot Label');
 	$result .= &edit_attributes($target,$token,\%label_defaults);
-	my $text = &Apache::lonxml::get_all_text("/label",$parser);
+	my $text = &Apache::lonxml::get_all_text("/label",$parser,$style);
 	$result .= &Apache::edit::end_row().
 	    &Apache::edit::start_spanning_row().
 	    &Apache::edit::editline('',$text,'',60);
@@ -885,12 +885,13 @@
                  'curve function declaration.');
 	    delete $curves[-1]->{'data'} ;
 	}
-        my $function = &Apache::lonxml::get_all_text("/function",$parser);
+        my $function = &Apache::lonxml::get_all_text("/function",$parser,
+						     $style);
 	$function = &Apache::run::evaluate($function,$safeeval,$$parstack[-1]);
 	$curves[-1]->{'function'} = $function; 
     } elsif ($target eq 'edit') {
 	$result .= &Apache::edit::tag_start($target,$token,'Gnuplot compatible curve function');
-	my $text = &Apache::lonxml::get_all_text("/function",$parser);
+	my $text = &Apache::lonxml::get_all_text("/function",$parser,$style);
 	$result .= &Apache::edit::end_row().
 	    &Apache::edit::start_spanning_row().
 	    &Apache::edit::editline('',$text,'',60);
@@ -924,7 +925,7 @@
                  'curve data declaration.');
 	    delete($curves[-1]->{'function'});
 	}
-	my $datatext = &Apache::lonxml::get_all_text("/data",$parser);
+	my $datatext = &Apache::lonxml::get_all_text("/data",$parser,$style);
 	$datatext=&Apache::run::evaluate($datatext,$safeeval,$$parstack[-1]);
 	# Deal with cases where we're given an array...
 	if ($datatext =~ /^\@/) {
@@ -967,7 +968,7 @@
 	push  @{$curves[-1]->{'data'}},\@data;
     } elsif ($target eq 'edit') {
 	$result .= &Apache::edit::tag_start($target,$token,'Comma or space deliminated curve data');
-	my $text = &Apache::lonxml::get_all_text("/data",$parser);
+	my $text = &Apache::lonxml::get_all_text("/data",$parser,$style);
 	$result .= &Apache::edit::end_row().
 	    &Apache::edit::start_spanning_row().
 	    &Apache::edit::editline('',$text,'',60);
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.132 loncom/xml/scripttag.pm:1.133
--- loncom/xml/scripttag.pm:1.132	Thu Sep 29 15:15:47 2005
+++ loncom/xml/scripttag.pm	Thu Dec  1 13:46:17 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # <script> definiton
 #
-# $Id: scripttag.pm,v 1.132 2005/09/29 19:15:47 albertel Exp $
+# $Id: scripttag.pm,v 1.133 2005/12/01 18:46:17 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -442,7 +442,7 @@
   my $result='';
   if ($target eq 'web' ) {
     if ( $env{'request.course.id'} ) {
-      my $inside = &Apache::lonxml::get_all_text("/standalone",$parser);
+      my $inside = &Apache::lonxml::get_all_text("/standalone",$parser,$style);
     } else {
       $result='<table bgcolor="#E1E1E1" border="2"><tr><td>';
     }
@@ -467,14 +467,14 @@
   my $result='';
   if ($target eq 'edit') {
     $result=&Apache::edit::tag_start($target,$token);
-    my $bodytext=&Apache::lonxml::get_all_text("/comment",$parser);
+    my $bodytext=&Apache::lonxml::get_all_text("/comment",$parser,$style);
     $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,4)
   } elsif ( $target eq 'modified') {
     $result=$token->[4].&Apache::edit::modifiedfield("/comment",$parser);
   } elsif ( $target eq 'web' || $target eq 'tex' || $target eq 'grade' ||
 	    $target eq 'answer' || $target eq 'meta' || $target eq 'analyze') {
     #normally throw away comments
-    my $bodytext=&Apache::lonxml::get_all_text("/comment",$parser);
+    my $bodytext=&Apache::lonxml::get_all_text("/comment",$parser,$style);
   }
   return $result;
 }
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.86 loncom/homework/bridgetask.pm:1.87
--- loncom/homework/bridgetask.pm:1.86	Thu Dec  1 13:19:17 2005
+++ loncom/homework/bridgetask.pm	Thu Dec  1 13:46:31 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.86 2005/12/01 18:19:17 albertel Exp $
+# $Id: bridgetask.pm,v 1.87 2005/12/01 18:46:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -381,7 +381,7 @@
 }
 
 sub start_Task {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
 
     my ($status,$accessmsg,$slot);
     if ($target ne 'webgrade') {
@@ -431,7 +431,7 @@
 	&Apache::lonxml::debug("Got $status");
 	$body_tag_start.=&add_previous_version_button($status);
 	if (!&show_task($status,$previous)) {
-	    my $bodytext=&Apache::lonxml::get_all_text("/task",$parser);
+	    my $bodytext=&Apache::lonxml::get_all_text("/task",$parser,$style);
 	    if ( $target eq "web" ) {
 		$result.= $head_tag_start.'</head>'.$body_tag_start;
 		if ($env{'request.state'} eq 'construct') {
@@ -552,7 +552,7 @@
 		}
 	    }
 	    $webgrade='no';
-	    my $bodytext=&Apache::lonxml::get_all_text("/task",$parser);
+	    my $bodytext=&Apache::lonxml::get_all_text("/task",$parser,$style);
 	}
 	if ($target eq 'webgrade' && defined($env{'form.queue'})) {
 	    if ($webgrade eq 'yes') {
@@ -1698,14 +1698,14 @@
 }
 
 sub start_IntroParagraph {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
     if ($target eq 'web' || $target eq 'webgrade') {
 	if ($tagstack->[-2] eq 'Dimension') {
-	    $dimension{'intro'}=&Apache::lonxml::get_all_text('/introparagraph',$parser);
+	    $dimension{'intro'}=&Apache::lonxml::get_all_text('/introparagraph',$parser,$style);
 	
 	} elsif ($target eq 'webgrade') {
-	    &Apache::lonxml::get_all_text('/introparagraph',$parser);
+	    &Apache::lonxml::get_all_text('/introparagraph',$parser,$style);
 	}
 	
     }
@@ -1734,9 +1734,9 @@
 }
 
 sub start_InstanceText {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $instance_id=$Apache::bridgetask::instance[-1];
-    my $text=&Apache::lonxml::get_all_text('/instancetext',$parser);
+    my $text=&Apache::lonxml::get_all_text('/instancetext',$parser,$style);
     if ($target eq 'web' || $target eq 'webgrade') {
 	$dimension{$instance_id.'.text'}=$text;
     }
@@ -1748,9 +1748,9 @@
 }
 
 sub start_Criteria {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $instance_id=$Apache::bridgetask::instance[-1];
-    my $criteria=&Apache::lonxml::get_all_text('/criteria',$parser);
+    my $criteria=&Apache::lonxml::get_all_text('/criteria',$parser,$style);
     if ($target eq 'web' || $target eq 'webgrade' || $target eq 'grade') {
 	my $id=&get_id($parstack,$safeeval);
 	$dimension{$instance_id.'.criteria.'.$id}=$criteria;
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.96 loncom/homework/edit.pm:1.97
--- loncom/homework/edit.pm:1.96	Tue Nov 15 10:57:45 2005
+++ loncom/homework/edit.pm	Thu Dec  1 13:46:31 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # edit mode helpers
 #
-# $Id: edit.pm,v 1.96 2005/11/15 15:57:45 albertel Exp $
+# $Id: edit.pm,v 1.97 2005/12/01 18:46:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -163,7 +163,7 @@
     }
     if (!$result) {
 	my $endtag='/'.$token->[1];
-	my $bodytext=&Apache::lonxml::get_all_text($endtag,$parser);
+	my $bodytext=&Apache::lonxml::get_all_text($endtag,$parser,$style);
 	$$parser['-1']->get_token();
 	&Apache::lonxml::debug("Deleting :$bodytext: for $token->[1]");
 	&Apache::lonxml::end_tag($tagstack,$parstack,$token);
Index: loncom/homework/hint.pm
diff -u loncom/homework/hint.pm:1.60 loncom/homework/hint.pm:1.61
--- loncom/homework/hint.pm:1.60	Fri Aug 26 14:57:25 2005
+++ loncom/homework/hint.pm	Thu Dec  1 13:46:31 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # implements the tags that control the hints
 #
-# $Id: hint.pm,v 1.60 2005/08/26 18:57:25 albertel Exp $
+# $Id: hint.pm,v 1.61 2005/12/01 18:46:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -57,7 +57,7 @@
 	if ( ($showoncorrect ne 'yes' && &Apache::response::show_answer()) ||
 	     ( $numtries < $hinttries) ) {
 	    &Apache::lonxml::debug("Grabbin all");
-	    &Apache::lonxml::get_all_text("/hintgroup",$parser);
+	    &Apache::lonxml::get_all_text("/hintgroup",$parser,$style);
 	}
 	&Apache::lonxml::startredirection;
     } elsif ($target eq 'tex') {
@@ -322,10 +322,10 @@
 	    foreach $which (@Apache::hint::which) { if ($which eq $on) { $show = 1; last } }
 	}
 	if (!$show) {
-	    &Apache::lonxml::get_all_text("/hintpart",$parser);
+	    &Apache::lonxml::get_all_text("/hintpart",$parser,$style);
 	}
     } elsif ($target eq 'grade') {
-	&Apache::lonxml::get_all_text("/hintpart",$parser);
+	&Apache::lonxml::get_all_text("/hintpart",$parser,$style);
     } elsif ($target eq 'edit') {
 	$result.= &Apache::edit::tag_start($target,$token);
 	$result.= &Apache::edit::text_arg('On:','on',$token);
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.72 loncom/homework/imageresponse.pm:1.73
--- loncom/homework/imageresponse.pm:1.72	Wed Jun 22 08:03:23 2005
+++ loncom/homework/imageresponse.pm	Thu Dec  1 13:46:31 2005
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # image click response style
 #
-# $Id: imageresponse.pm,v 1.72 2005/06/22 12:03:23 albertel Exp $
+# $Id: imageresponse.pm,v 1.73 2005/12/01 18:46:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -391,7 +391,7 @@
     if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') { 
 	&Apache::lonxml::startredirection; 
     } elsif ($target eq 'edit') {
-	my $descr=&Apache::lonxml::get_all_text('/text',$parser);
+	my $descr=&Apache::lonxml::get_all_text('/text',$parser,$style);
 	$result=&Apache::edit::tag_start($target,$token,'Task Description').
 	    &Apache::edit::editfield($token->[1],$descr,'Text',60,2).
 	    &Apache::edit::end_row();
@@ -425,7 +425,7 @@
     if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') { 
 	&Apache::lonxml::startredirection; 
     } elsif ($target eq 'edit') {
-	my $bgimg=&Apache::lonxml::get_all_text('/image',$parser);
+	my $bgimg=&Apache::lonxml::get_all_text('/image',$parser,$style);
 	$Apache::edit::bgimgsrc=$bgimg;
 	$Apache::edit::bgimgsrcdepth=$Apache::lonxml::curdepth;
 
@@ -502,7 +502,7 @@
 	$target eq 'analyze') { 
 	&Apache::lonxml::startredirection; 
     } elsif ($target eq 'edit') {
-	my $coords=&Apache::lonxml::get_all_text('/rectangle',$parser);
+	my $coords=&Apache::lonxml::get_all_text('/rectangle',$parser,$style);
 	$result=&Apache::edit::tag_start($target,$token,'Rectangle').
 	    &Apache::edit::editline($token->[1],$coords,'Coordinate Pairs',40).
 	    &Apache::edit::entercoord(undef,'textnode',undef,undef,'box').
@@ -556,7 +556,7 @@
 	$target eq 'analyze') { 
 	&Apache::lonxml::startredirection; 
     } elsif ($target eq 'edit') {
-	my $coords=&Apache::lonxml::get_all_text('/polygon',$parser);
+	my $coords=&Apache::lonxml::get_all_text('/polygon',$parser,$style);
 	$result=&Apache::edit::tag_start($target,$token,'Polygon').
 	    &Apache::edit::editline($token->[1],$coords,'Coordinate list',40).
 	    &Apache::edit::entercoord(undef,'textnode',undef,undef,'polygon').
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.184 loncom/homework/inputtags.pm:1.185
--- loncom/homework/inputtags.pm:1.184	Mon Nov 21 17:45:13 2005
+++ loncom/homework/inputtags.pm	Thu Dec  1 13:46:31 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.184 2005/11/21 22:45:13 albertel Exp $
+# $Id: inputtags.pm,v 1.185 2005/12/01 18:46:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -131,7 +131,7 @@
 }
 
 sub start_textfield {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result = "";
     my $id = &start_input($parstack,$safeeval);
     my $resid=$Apache::inputtags::response[-1];
@@ -155,17 +155,18 @@
 	    if ($oldresponse ne '') {
 
 		#get rid of any startup text if the user has already responded
-		&Apache::lonxml::get_all_text("/textfield",$parser);
+		&Apache::lonxml::get_all_text("/textfield",$parser,$style);
 	    }
 	} else {
 	    #right or wrong don't show it
 	    #$result='<table border="1"><tr><td><i>'.$oldresponse.'</i></td></tr></table>';
 	    $result='';
 	    #get rid of any startup text
-	    &Apache::lonxml::get_all_text("/textfield",$parser);
+	    &Apache::lonxml::get_all_text("/textfield",$parser,$style);
 	}
     } elsif ($target eq 'grade') {
-	my $seedtext=&Apache::lonxml::get_all_text("/textfield",$parser);
+	my $seedtext=&Apache::lonxml::get_all_text("/textfield",$parser,
+						   $style);
 	if ($seedtext eq $env{'form.HWVAL_'.$resid}) {
 	    # if the seed text is still there it wasn't a real submission
 	    $env{'form.HWVAL_'.$resid}='';
@@ -176,7 +177,8 @@
 	$result.=&Apache::edit::text_arg('Columns:','cols',$token,4);
 	$result.=&Apache::edit::text_arg
 	    ('Click-On Texts (comma sep):','addchars',$token,10);
-	my $bodytext=&Apache::lonxml::get_all_text("/textfield",$parser);
+	my $bodytext=&Apache::lonxml::get_all_text("/textfield",$parser,
+						   $style);
 	$result.=&Apache::edit::editfield($token->[1],$bodytext,'Text you want to appear by default:',80,2);
     } elsif ($target eq 'modified') {
 	my $constructtag=&Apache::edit::get_new_args($token,$parstack,
Index: loncom/homework/randomlabel.pm
diff -u loncom/homework/randomlabel.pm:1.80 loncom/homework/randomlabel.pm:1.81
--- loncom/homework/randomlabel.pm:1.80	Thu Jul 14 00:17:44 2005
+++ loncom/homework/randomlabel.pm	Thu Dec  1 13:46:31 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # random labelling tool
 #
-# $Id: randomlabel.pm,v 1.80 2005/07/14 04:17:44 albertel Exp $
+# $Id: randomlabel.pm,v 1.81 2005/12/01 18:46:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -551,7 +551,7 @@
 	&Apache::lonxml::startredirection; 
     } elsif ($target eq 'edit') {
 	$result.=&Apache::edit::tag_start($target,$token,"$type Label");
-	my $text=&Apache::lonxml::get_all_text("/label",$parser);
+	my $text=&Apache::lonxml::get_all_text("/label",$parser,$style);
 	if ($type eq 'image') {
 	    $result.=&Apache::edit::end_row().
 		&Apache::edit::start_spanning_row();
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.325 loncom/homework/structuretags.pm:1.326
--- loncom/homework/structuretags.pm:1.325	Mon Nov 21 17:16:38 2005
+++ loncom/homework/structuretags.pm	Thu Dec  1 13:46:31 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.325 2005/11/21 22:16:38 albertel Exp $
+# $Id: structuretags.pm,v 1.326 2005/12/01 18:46:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -42,8 +42,8 @@
 }
 
 sub start_web {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-    my $bodytext=&Apache::lonxml::get_all_text("/web",$parser);
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+    my $bodytext=&Apache::lonxml::get_all_text("/web",$parser,$style);
     if ($target eq 'web') {
 	return $bodytext;
     }
@@ -55,9 +55,9 @@
 }
 
 sub start_tex {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result='';
-    my $bodytext=&Apache::lonxml::get_all_text("/tex",$parser);
+    my $bodytext=&Apache::lonxml::get_all_text("/tex",$parser,$style);
     if ($target eq 'tex') {
 	return $bodytext.' ';
     }
@@ -514,7 +514,7 @@
 }
 
 sub start_problem {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
 
     # We'll use the redirection to fix up printing of duedates.
     if (!$Apache::lonxml::metamode) {
@@ -527,7 +527,7 @@
     if ( $Apache::inputtags::part ne '' ||
 	 $Apache::lonhomework::parsing_a_problem) {
 	&Apache::lonxml::error('Only one &lt;problem&gt; allowed in a .problem file');
-	#my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser);
+	#my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser,$style);
 	return '';
     }
 
@@ -630,7 +630,8 @@
 	    ( $status eq 'UNAVAILABLE') ||
 	    ( $status eq 'NOT_IN_A_SLOT') ||
 	    ( $status eq 'INVALID_ACCESS')) {
-	    my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser);
+	    my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser,
+						       $style);
 	    if ( $target eq "web" ) {
 		$result.= $head_tag_start.'</head>';
 		my $msg=$body_tag_start;
@@ -658,7 +659,8 @@
 		}
 	    }
 	} elsif ($status eq 'NEEDS_CHECKIN') {
-	    my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser);
+	    my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser,
+						       $style);
 	    if ($target eq 'web') {
 		$result .= $head_tag_start.'</head>';
 		$result .= $body_tag_start;
@@ -933,12 +935,12 @@
 }
 
 sub start_definetag {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
 
     my $result;
 
     my $name = $token->[2]->{'name'};
-    my $skip=&Apache::lonxml::get_all_text("/definetag",$parser);
+    my $skip=&Apache::lonxml::get_all_text("/definetag",$parser,$style);
     if ($name=~/^\//) {
 	$result=
  '<br /><table bgcolor="#FFBBBB"><tr><th>END <tt>'.$name.'</tt></th></tr>';
@@ -1084,7 +1086,7 @@
 }
 
 sub start_while {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
 
     my $result;
     if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||
@@ -1096,7 +1098,7 @@
 	    &Apache::lonxml::default_homework_load($safeeval);
 	}
 	my $result = &Apache::run::run($code,$safeeval);
-	my $bodytext=&Apache::lonxml::get_all_text("/while",$parser);
+	my $bodytext=&Apache::lonxml::get_all_text("/while",$parser,$style);
 	push( @Apache::structuretags::whilebody, $bodytext);
 	push( @Apache::structuretags::whileline, $token->[5]);
 	&Apache::lonxml::debug("s code $code got -$result-");
@@ -1152,11 +1154,11 @@
 #  ...
 # </randomlist>
 sub start_randomlist {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
     if ($target eq 'answer' || $target eq 'grade' || $target eq 'web' ||
 	$target eq 'tex' || $target eq 'analyze') {
-	my $body= &Apache::lonxml::get_all_text("/randomlist",$parser);
+	my $body= &Apache::lonxml::get_all_text("/randomlist",$parser,$style);
 	my $b_parser= HTML::LCParser->new(\$body);
 	$b_parser->xml_mode(1);
 	$b_parser->marked_sections(1);
@@ -1245,7 +1247,7 @@
 }
 
 sub start_part {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     if (!$Apache::lonxml::metamode) {
 	&Apache::lonxml::startredirection(); # we'll use redirection to fix up 
 	                                     # duedates.
@@ -1274,7 +1276,7 @@
     } elsif ($target eq 'web' || $target eq 'grade' ||
 	     $target eq 'answer' || $target eq 'tex') {
 	if ($hidden || !$in_order_show) {
-	    my $bodytext=&Apache::lonxml::get_all_text("/part",$parser);
+	    my $bodytext=&Apache::lonxml::get_all_text("/part",$parser,$style);
 	} else {
 	    my ($status,$accessmsg) = &Apache::lonhomework::check_access($id);
 	    push (@Apache::inputtags::status,$status);
@@ -1290,7 +1292,8 @@
 		( $status eq 'BANNED') ||
 		( $status eq 'UNAVAILABLE') ||
 		( $status eq 'INVALID_ACCESS')) {
-		my $bodytext=&Apache::lonxml::get_all_text("/part",$parser);
+		my $bodytext=&Apache::lonxml::get_all_text("/part",$parser,
+							   $style);
 		if ( $target eq "web" ) {
 		    $result="<br />".&mt('Part is not open to be viewed. It')." $accessmsg<br />";
 		} elsif ( $target eq 'tex' ) {
@@ -1392,14 +1395,14 @@
 }
 
 sub start_preduedate {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {
 	&Apache::lonxml::debug("State in preduedate is ". $Apache::inputtags::status['-1']);
 	if (!$Apache::lonhomework::scantronmode &&
 	    $Apache::inputtags::status['-1'] ne 'CAN_ANSWER' &&
 	    $Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') {
 	    &Apache::lonxml::debug("Wha? ". ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER'));
-	    &Apache::lonxml::get_all_text("/preduedate",$parser);
+	    &Apache::lonxml::get_all_text("/preduedate",$parser,$style);
 	}
     }
     return '';
@@ -1410,14 +1413,14 @@
 }
 
 sub start_postanswerdate {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     if ($target eq 'web' || $target eq 'grade') {
 	if ($Apache::lonhomework::scantronmode ||
 	    $Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') {
-	    &Apache::lonxml::get_all_text("/postanswerdate",$parser);
+	    &Apache::lonxml::get_all_text("/postanswerdate",$parser,$style);
 	}
     } elsif ($target eq 'tex') {
-	&Apache::lonxml::get_all_text("/postanswerdate",$parser);
+	&Apache::lonxml::get_all_text("/postanswerdate",$parser,$style);
     }
     return '';
 }
@@ -1427,7 +1430,7 @@
 }
 
 sub start_notsolved {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||
 	$target eq 'tex') {
 	my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"};
@@ -1435,7 +1438,7 @@
 	if ($gradestatus =~ /^correct/ &&
 	    &Apache::response::show_answer()) {
 	    &Apache::lonxml::debug("skipping");
-	    &Apache::lonxml::get_all_text("/notsolved",$parser);
+	    &Apache::lonxml::get_all_text("/notsolved",$parser,$style);
 	}
     }
     return '';
@@ -1446,13 +1449,13 @@
 }
 
 sub start_solved {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||
 	$target eq 'tex') {
 	my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"};
 	if ($gradestatus !~ /^correct/ ||
 	    !&Apache::response::show_answer()) {
-	    &Apache::lonxml::get_all_text("/solved",$parser);
+	    &Apache::lonxml::get_all_text("/solved",$parser,$style);
 	}
     }
     return '';
@@ -1463,7 +1466,7 @@
 }
 
 sub start_problemtype {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
     if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||
 	$target eq 'tex' || $target eq 'analyze') {
@@ -1475,10 +1478,10 @@
 	    if ($Apache::lonhomework::type eq lc($type)) { $found=1; }
 	}
 	if ($mode eq 'show' && !$found) {
-	    &Apache::lonxml::get_all_text("/problemtype",$parser);
+	    &Apache::lonxml::get_all_text("/problemtype",$parser,$style);
 	}
 	if ($mode eq 'hide' && $found) {
-	    &Apache::lonxml::get_all_text("/problemtype",$parser);
+	    &Apache::lonxml::get_all_text("/problemtype",$parser,$style);
 	}
     } elsif ($target eq 'edit') {
 	$result .=&Apache::edit::tag_start($target,$token);
@@ -1512,12 +1515,12 @@
 }
 
 sub end_startouttext {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result='';
     my $text='';
 
     if ($target eq 'edit') {
-	$text=&Apache::lonxml::get_all_text("endouttext",$parser);
+	$text=&Apache::lonxml::get_all_text("endouttext",$parser,$style);
 	$result.=&Apache::edit::start_table($token)."<tr><td>".&mt('Text Block')."</td>
 <td>".&mt('Delete:').
                  &Apache::edit::deletelist($target,$token)
@@ -1556,8 +1559,8 @@
 }
 
 sub delete_startouttext {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-    #  my $text=&Apache::lonxml::get_all_text("endouttext",$parser);
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+    #  my $text=&Apache::lonxml::get_all_text("endouttext",$parser,$style);
     my $text=$$parser['-1']->get_text("/endouttext");
     my $ntoken=$$parser['-1']->get_token();
     &Apache::lonxml::debug("Deleting :$text: and :$ntoken->[0]:$ntoken->[1]:$ntoken->[2]: for startouttext");
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.181 loncom/homework/caparesponse/caparesponse.pm:1.182
--- loncom/homework/caparesponse/caparesponse.pm:1.181	Wed Nov 16 17:52:31 2005
+++ loncom/homework/caparesponse/caparesponse.pm	Thu Dec  1 13:46:48 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.181 2005/11/16 22:52:31 albertel Exp $
+# $Id: caparesponse.pm,v 1.182 2005/12/01 18:46:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -76,12 +76,12 @@
 }
 
 sub start_value {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
     if ( $target eq 'web' || $target eq 'tex' ||
 	 $target eq 'grade' || $target eq 'webgrade' ||
 	 $target eq 'answer' || $target eq 'analyze' ) {
-	my $bodytext = &Apache::lonxml::get_all_text("/value",$parser);
+	my $bodytext = &Apache::lonxml::get_all_text("/value",$parser,$style);
 	$bodytext = &Apache::run::evaluate($bodytext,$safeeval,
 					   $$parstack[-1]);
 	push(@{ $answer{$cur_name}{'answers'} },$bodytext);
@@ -96,12 +96,12 @@
 }
 
 sub start_array {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
     if ( $target eq 'web' || $target eq 'tex' ||
 	 $target eq 'grade' || $target eq 'webgrade' ||
 	 $target eq 'answer' || $target eq 'analyze' ) {
-	my $bodytext = &Apache::lonxml::get_all_text("/value",$parser);
+	my $bodytext = &Apache::lonxml::get_all_text("/array",$parser,$style);
 	my @values = &Apache::run::evaluate($bodytext,$safeeval,
 					    $$parstack[-1]);
 	push(@{ $answer{$cur_name}{'answers'} },@values);

--albertel1133462809--