--- loncom/publisher/lonpublisher.pm 2003/07/25 02:04:51 1.127 +++ loncom/publisher/lonpublisher.pm 2003/09/16 21:30:28 1.132 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.127 2003/07/25 02:04:51 bowersj2 Exp $ +# $Id: lonpublisher.pm,v 1.132 2003/09/16 21:30:28 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -718,8 +718,9 @@ sub fix_ids_and_indices { } if (!$endtag) { if ($token->[4]=~m:/>$:) { $endtag=' /'; }; } $outstring.='<'.$tag.$newparmstring.$endtag.'>'; - if ($lctag eq 'm') { - $outstring.=&get_all_text_unbalanced('/m',\@parser); + if ($lctag eq 'm' || $lctag eq 'script' + || $lctag eq 'display' || $lctag eq 'tex') { + $outstring.=&get_all_text_unbalanced('/'.$lctag,\@parser); } } elsif ($token->[0] eq 'E') { if ($token->[2]) { @@ -1491,6 +1492,8 @@ sub phasetwo { sub batchpublish { my ($r,$srcfile,$targetfile)=@_; + #publication pollutes %ENV with form.* values + my %oldENV=%ENV; $srcfile=~s/\/+/\//g; $targetfile=~s/\/+/\//g; my $thisdisfn=$srcfile; @@ -1526,6 +1529,7 @@ sub batchpublish { &phasetwo($r,$srcfile,$targetfile,$thisembstyle,$thisdistarget,1); $r->print('

'); } + %ENV=%oldENV; return ''; } @@ -1744,17 +1748,25 @@ unless ($ENV{'form.phase'} eq 'two') { if ($fn=~/\/$/) { # -------------------------------------------------------- This is a directory &publishdirectory($r,$fn,$thisdisfn); + $r->print('
Done
Return to Directory'); + } else { # ---------------------- Evaluate individual file, and then output information. $thisfn=~/\.(\w+)$/; my $thistype=$1; my $thisembstyle=&Apache::loncommon::fileembstyle($thistype); - $r->print('

Publishing '. - &Apache::loncommon::filedescription($thistype).' '. - ''.$thisdisfn. - '

Target: '.$thisdistarget.'
'); + &Apache::loncommon::filedescription($thistype).' '); + + $r->print(< +$thisdisfn +ENDCAPTION + $r->print( + 'Target: '.$thisdistarget.'
'); if (($cuname ne $ENV{'user.name'}) || ($cudom ne $ENV{'user.domain'})) { $r->print('

Co-Author: '.$cuname.' at '.$cudom. @@ -1762,9 +1774,10 @@ unless ($ENV{'form.phase'} eq 'two') { } if (&Apache::loncommon::fileembstyle($thistype) eq 'ssi') { - $r->print('
Diffs with Current Version
'); + $r->print(< +Diffs with Current Version
+ENDDIFF } # ------------------ Publishing from $thisfn to $thistarget with $thisembstyle.