version 1.131, 2003/08/21 17:07:57
|
version 1.133, 2003/09/16 22:00:25
|
Line 974 sub publish {
|
Line 974 sub publish {
|
|
|
# -------------------------------------------------- Parse content for metadata |
# -------------------------------------------------- Parse content for metadata |
if (($style eq 'ssi') || ($style eq 'prv')) { |
if (($style eq 'ssi') || ($style eq 'prv')) { |
my $oldenv=$ENV{'request.uri'}; |
my $dir=$source; |
|
$dir=~s-/[^/]*$--; |
$ENV{'request.uri'}=$target; |
my $file=$source; |
$allmeta=Apache::lonxml::xmlparse(undef,'meta',$content); |
$file=(split('/',$file))[-1]; |
$ENV{'request.uri'}=$oldenv; |
$source=&Apache::lonnet::hreflocation($dir,$file); |
|
$allmeta=&Apache::lonnet::ssi_body($source,('grade_target' => 'meta')); |
|
|
&metaeval($allmeta); |
&metaeval($allmeta); |
} |
} |
Line 1492 sub phasetwo {
|
Line 1493 sub phasetwo {
|
|
|
sub batchpublish { |
sub batchpublish { |
my ($r,$srcfile,$targetfile)=@_; |
my ($r,$srcfile,$targetfile)=@_; |
|
#publication pollutes %ENV with form.* values |
|
my %oldENV=%ENV; |
$srcfile=~s/\/+/\//g; |
$srcfile=~s/\/+/\//g; |
$targetfile=~s/\/+/\//g; |
$targetfile=~s/\/+/\//g; |
my $thisdisfn=$srcfile; |
my $thisdisfn=$srcfile; |
Line 1527 sub batchpublish {
|
Line 1530 sub batchpublish {
|
&phasetwo($r,$srcfile,$targetfile,$thisembstyle,$thisdistarget,1); |
&phasetwo($r,$srcfile,$targetfile,$thisembstyle,$thisdistarget,1); |
$r->print('</p>'); |
$r->print('</p>'); |
} |
} |
|
%ENV=%oldENV; |
return ''; |
return ''; |
} |
} |
|
|