[LON-CAPA-cvs] cvs: loncom /homework outputtags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 02 May 2003 18:56:29 -0000
albertel Fri May 2 14:56:29 2003 EDT
Modified files:
/loncom/homework outputtags.pm
Log:
part of BUG#1276
<displayweight /> runs once per part
Index: loncom/homework/outputtags.pm
diff -u loncom/homework/outputtags.pm:1.25 loncom/homework/outputtags.pm:1.26
--- loncom/homework/outputtags.pm:1.25 Mon Jan 13 16:23:06 2003
+++ loncom/homework/outputtags.pm Fri May 2 14:56:29 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# tags that create controlled output
#
-# $Id: outputtags.pm,v 1.25 2003/01/13 21:23:06 sakharuk Exp $
+# $Id: outputtags.pm,v 1.26 2003/05/02 18:56:29 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -113,10 +113,13 @@
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my $result;
if (exists($Apache::outputtags::showonce{'displayweight'})) {
- return '';
- } else {
- $Apache::outputtags::showonce{'displayweight'}=1;
+ if(grep(/^\Q$Apache::inputtags::part\E$/,
+ @{$Apache::outputtags::showonce{'displayweight'}})) {
+ return '';
+ }
}
+ push(@{$Apache::outputtags::showonce{'displayweight'}},
+ $Apache::inputtags::part);
my $status=$Apache::inputtags::status['-1'];
if ($target eq 'web' || $target eq 'tex') {
my $id = $Apache::inputtags::part;