--- loncom/publisher/lonpublisher.pm 2003/09/16 21:30:28 1.132 +++ loncom/publisher/lonpublisher.pm 2003/09/22 00:48:32 1.134 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.132 2003/09/16 21:30:28 albertel Exp $ +# $Id: lonpublisher.pm,v 1.134 2003/09/22 00:48:32 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -142,6 +142,7 @@ use DBI; use Apache::lonnet(); use Apache::loncommon(); use Apache::lonmysql; +use Apache::lonlocal; use vars qw(%metadatafields %metadatakeys); my %addid; @@ -324,6 +325,7 @@ string which presents the form field (fo ######################################### sub textfield { my ($title,$name,$value)=@_; + $title=&mt($title); my $uctitle=uc($title); return "\n
$uctitle:". "
$uctitle:". @@ -974,11 +977,12 @@ sub publish { # -------------------------------------------------- Parse content for metadata if (($style eq 'ssi') || ($style eq 'prv')) { - my $oldenv=$ENV{'request.uri'}; - - $ENV{'request.uri'}=$target; - $allmeta=Apache::lonxml::xmlparse(undef,'meta',$content); - $ENV{'request.uri'}=$oldenv; + my $dir=$source; + $dir=~s-/[^/]*$--; + my $file=$source; + $file=(split('/',$file))[-1]; + $source=&Apache::lonnet::hreflocation($dir,$file); + $allmeta=&Apache::lonnet::ssi_body($source,('grade_target' => 'meta')); &metaeval($allmeta); }