version 1.99, 2002/10/07 13:50:36
|
version 1.103, 2002/10/18 13:49:49
|
Line 139 my $docroot;
|
Line 139 my $docroot;
|
my $cuname; |
my $cuname; |
my $cudom; |
my $cudom; |
|
|
######################################### |
|
######################################### |
|
|
|
=pod |
=pod |
|
|
=item B<metaeval> |
=item B<metaeval> |
Line 265 sub metaread {
|
Line 262 sub metaread {
|
} |
} |
|
|
######################################### |
######################################### |
######################################### |
|
|
|
=pod |
|
|
|
=item B<sqltime> |
|
|
|
Convert 'time' format into a datetime sql format |
|
|
|
Parameters: |
|
|
|
=over 4 |
|
|
|
=item I<$timef> |
|
|
|
Seconds since 00:00:00 UTC, January 1, 1970. |
|
|
|
=back |
|
|
|
Returns: |
|
|
|
=over 4 |
|
|
|
=item Scalar string |
|
|
|
MySQL-compatible datetime string. |
|
|
|
=back |
|
|
|
=cut |
|
|
|
######################################### |
######################################### |
######################################### |
######################################### |
sub sqltime { |
|
my $timef=shift @_; |
|
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = |
|
localtime($timef); |
|
$mon++; $year+=1900; |
|
return "$year-$mon-$mday $hour:$min:$sec"; |
|
} |
|
|
|
|
|
|
sub coursedependencies { |
|
my $url=&Apache::lonnet::declutter(shift); |
|
$url=~s/\.meta$//; |
|
my ($adomain,$aauthor)=($url=~/^(\w+)\/(\w+)\//); |
|
my $regexp=$url; |
|
$regexp=~s/(\W)/\\$1/g; |
|
$regexp='___'.$regexp.'___course'; |
|
my %evaldata=&Apache::lonnet::dump('nohist_resevaldata',$adomain, |
|
$aauthor,$regexp); |
|
my %courses=(); |
|
foreach (keys %evaldata) { |
|
if ($_=~/^([a-zA-Z0-9]+_[a-zA-Z0-9]+)___.+___course$/) { |
|
$courses{$1}=1; |
|
} |
|
} |
|
return %courses; |
|
} |
######################################### |
######################################### |
######################################### |
######################################### |
|
|
|
|
=pod |
=pod |
|
|
=item Form-field-generating subroutines. |
=item Form-field-generating subroutines. |
Line 492 sub get_subscribed_hosts {
|
Line 470 sub get_subscribed_hosts {
|
} else { |
} else { |
&Apache::lonnet::logthis("Unable to open $target.subscription"); |
&Apache::lonnet::logthis("Unable to open $target.subscription"); |
} |
} |
&Apache::lonnet::logthis("Got list of ".join(':',@subscribed)); |
|
return @subscribed; |
return @subscribed; |
} |
} |
|
|
Line 1104 END
|
Line 1081 END
|
unless ($metadatafields{'creationdate'}) { |
unless ($metadatafields{'creationdate'}) { |
$metadatafields{'creationdate'}=time; |
$metadatafields{'creationdate'}=time; |
} |
} |
$scrout.=&hiddenfield('creationdate',$metadatafields{'creationdate'}); |
$scrout.=&hiddenfield('creationdate', |
|
&Apache::loncommon::unsqltime($metadatafields{'creationdate'})); |
|
|
$scrout.=&hiddenfield('lastrevisiondate',time); |
$scrout.=&hiddenfield('lastrevisiondate',time); |
|
|
Line 1196 Returns:
|
Line 1174 Returns:
|
=item Scalar string |
=item Scalar string |
|
|
String contains status (errors and warnings) and information associated with |
String contains status (errors and warnings) and information associated with |
the server's attempts at publication. |
the server's attempts at publication. |
|
|
=cut |
=cut |
|
|
|
#'stupid emacs |
######################################### |
######################################### |
######################################### |
######################################### |
sub phasetwo { |
sub phasetwo { |
|
|
my ($source,$target,$style,$distarget,$batch)=@_; |
my ($r,$source,$target,$style,$distarget,$batch)=@_; |
|
$source=~s/\/+/\//g; |
|
$target=~s/\/+/\//g; |
|
$distarget=~s/\/+/\//g; |
my $logfile; |
my $logfile; |
my $scrout=''; |
|
unless ($logfile=Apache::File->new('>>'.$source.'.log')) { |
unless ($logfile=Apache::File->new('>>'.$source.'.log')) { |
return |
return |
'<font color=red>No write permission to user directory, FAIL</font>'; |
'<font color=red>No write permission to user directory, FAIL</font>'; |
} |
} |
print $logfile |
print $logfile |
"\n================= Publish ".localtime()." Phase Two ================\n"; |
"\n================= Publish ".localtime()." Phase Two ================\n"; |
|
|
%metadatafields=(); |
%metadatafields=(); |
%metadatakeys=(); |
%metadatakeys=(); |
|
|
&metaeval(&Apache::lonnet::unescape($ENV{'form.allmeta'})); |
&metaeval(&Apache::lonnet::unescape($ENV{'form.allmeta'})); |
|
|
$metadatafields{'title'}=$ENV{'form.title'}; |
$metadatafields{'title'}=$ENV{'form.title'}; |
$metadatafields{'author'}=$ENV{'form.author'}; |
$metadatafields{'author'}=$ENV{'form.author'}; |
$metadatafields{'subject'}=$ENV{'form.subject'}; |
$metadatafields{'subject'}=$ENV{'form.subject'}; |
$metadatafields{'notes'}=$ENV{'form.notes'}; |
$metadatafields{'notes'}=$ENV{'form.notes'}; |
$metadatafields{'abstract'}=$ENV{'form.abstract'}; |
$metadatafields{'abstract'}=$ENV{'form.abstract'}; |
$metadatafields{'mime'}=$ENV{'form.mime'}; |
$metadatafields{'mime'}=$ENV{'form.mime'}; |
$metadatafields{'language'}=$ENV{'form.language'}; |
$metadatafields{'language'}=$ENV{'form.language'}; |
$metadatafields{'creationdate'}= |
$metadatafields{'creationdate'}=$ENV{'form.creationdate'}; |
&sqltime($ENV{'form.creationdate'}); |
$metadatafields{'lastrevisiondate'}=$ENV{'form.lastrevisiondate'}; |
$metadatafields{'lastrevisiondate'}= |
$metadatafields{'owner'}=$ENV{'form.owner'}; |
&sqltime($ENV{'form.lastrevisiondate'}); |
$metadatafields{'copyright'}=$ENV{'form.copyright'}; |
$metadatafields{'owner'}=$ENV{'form.owner'}; |
$metadatafields{'dependencies'}=$ENV{'form.dependencies'}; |
$metadatafields{'copyright'}=$ENV{'form.copyright'}; |
|
$metadatafields{'dependencies'}=$ENV{'form.dependencies'}; |
my $allkeywords=$ENV{'form.addkey'}; |
|
if (exists($ENV{'form.keywords'})) { |
my $allkeywords=$ENV{'form.addkey'}; |
if (ref($ENV{'form.keywords'})) { |
if (exists($ENV{'form.keywords'})) { |
$allkeywords .= ','.join(',',@{$ENV{'form.keywords'}}); |
if (ref($ENV{'form.keywords'})) { |
} else { |
$allkeywords .= ','.join(',',@{$ENV{'form.keywords'}}); |
$allkeywords .= ','.$ENV{'form.keywords'}; |
} else { |
} |
$allkeywords .= ','.$ENV{'form.keywords'}; |
} |
} |
$allkeywords=~s/\W+/\,/; |
} |
$allkeywords=~s/^\,//; |
$allkeywords=~s/\W+/\,/; |
$metadatafields{'keywords'}=$allkeywords; |
$allkeywords=~s/^\,//; |
|
$metadatafields{'keywords'}=$allkeywords; |
{ |
|
print $logfile "\nWrite metadata file for ".$source; |
{ |
my $mfh; |
print $logfile "\nWrite metadata file for ".$source; |
unless ($mfh=Apache::File->new('>'.$source.'.meta')) { |
my $mfh; |
return |
unless ($mfh=Apache::File->new('>'.$source.'.meta')) { |
'<font color=red>Could not write metadata, FAIL</font>'; |
return |
} |
'<font color=red>Could not write metadata, FAIL</font>'; |
foreach (sort keys %metadatafields) { |
} |
unless ($_=~/\./) { |
foreach (sort keys %metadatafields) { |
my $unikey=$_; |
unless ($_=~/\./) { |
$unikey=~/^([A-Za-z]+)/; |
my $unikey=$_; |
my $tag=$1; |
$unikey=~/^([A-Za-z]+)/; |
$tag=~tr/A-Z/a-z/; |
my $tag=$1; |
print $mfh "\n\<$tag"; |
$tag=~tr/A-Z/a-z/; |
foreach (split(/\,/,$metadatakeys{$unikey})) { |
print $mfh "\n\<$tag"; |
my $value=$metadatafields{$unikey.'.'.$_}; |
foreach (split(/\,/,$metadatakeys{$unikey})) { |
$value=~s/\"/\'\'/g; |
my $value=$metadatafields{$unikey.'.'.$_}; |
print $mfh ' '.$_.'="'.$value.'"'; |
$value=~s/\"/\'\'/g; |
} |
print $mfh ' '.$_.'="'.$value.'"'; |
print $mfh '>'. |
} |
&HTML::Entities::encode($metadatafields{$unikey}) |
print $mfh '>'. |
.'</'.$tag.'>'; |
&HTML::Entities::encode($metadatafields{$unikey}) |
} |
.'</'.$tag.'>'; |
} |
} |
$r->print('<p>Wrote Metadata'); |
} |
print $logfile "\nWrote metadata"; |
$scrout.='<p>Wrote Metadata'; |
} |
print $logfile "\nWrote metadata"; |
|
} |
|
|
|
# -------------------------------- Synchronize entry with SQL metadata database |
# -------------------------------- Synchronize entry with SQL metadata database |
my $warning; |
|
$metadatafields{'url'} = $distarget; |
$metadatafields{'url'} = $distarget; |
$metadatafields{'version'} = 'current'; |
$metadatafields{'version'} = 'current'; |
unless ($metadatafields{'copyright'} eq 'priv') { |
unless ($metadatafields{'copyright'} eq 'priv') { |
my ($error,$success) = &store_metadata(\%metadatafields); |
my ($error,$success) = &store_metadata(\%metadatafields); |
if ($success) { |
if ($success) { |
$scrout.='<p>Synchronized SQL metadata database'; |
$r->print('<p>Synchronized SQL metadata database'); |
print $logfile "\nSynchronized SQL metadata database"; |
print $logfile "\nSynchronized SQL metadata database"; |
} else { |
} else { |
$warning.=$error; |
$r->print($error); |
print $logfile "\n".$error; |
print $logfile "\n".$error; |
} |
} |
} else { |
} else { |
$scrout.='<p>Private Publication - did not synchronize database'; |
$r->print('<p>Private Publication - did not synchronize database'); |
print $logfile "\nPrivate: Did not synchronize data into ". |
print $logfile "\nPrivate: Did not synchronize data into ". |
"SQL metadata database"; |
"SQL metadata database"; |
} |
} |
# ----------------------------------------------------------- Copy old versions |
# ----------------------------------------------------------- Copy old versions |
|
|
if (-e $target) { |
if (-e $target) { |
my $filename; |
my $filename; |
my $maxversion=0; |
my $maxversion=0; |
$target=~/(.*)\/([^\/]+)\.(\w+)$/; |
$target=~/(.*)\/([^\/]+)\.(\w+)$/; |
my $srcf=$2; |
my $srcf=$2; |
my $srct=$3; |
my $srct=$3; |
my $srcd=$1; |
my $srcd=$1; |
unless ($srcd=~/^\/home\/httpd\/html\/res/) { |
unless ($srcd=~/^\/home\/httpd\/html\/res/) { |
print $logfile "\nPANIC: Target dir is ".$srcd; |
print $logfile "\nPANIC: Target dir is ".$srcd; |
return "<font color=red>Invalid target directory, FAIL</font>"; |
return "<font color=red>Invalid target directory, FAIL</font>"; |
} |
} |
opendir(DIR,$srcd); |
opendir(DIR,$srcd); |
while ($filename=readdir(DIR)) { |
while ($filename=readdir(DIR)) { |
if (-l $srcd.'/'.$filename) { |
if (-l $srcd.'/'.$filename) { |
unlink($srcd.'/'.$filename); |
unlink($srcd.'/'.$filename); |
unlink($srcd.'/'.$filename.'.meta'); |
unlink($srcd.'/'.$filename.'.meta'); |
} else { |
} else { |
if ($filename=~/$srcf\.(\d+)\.$srct$/) { |
if ($filename=~/$srcf\.(\d+)\.$srct$/) { |
$maxversion=($1>$maxversion)?$1:$maxversion; |
$maxversion=($1>$maxversion)?$1:$maxversion; |
} |
} |
} |
} |
} |
} |
closedir(DIR); |
closedir(DIR); |
$maxversion++; |
$maxversion++; |
$scrout.='<p>Creating old version '.$maxversion; |
$r->print('<p>Creating old version '.$maxversion); |
print $logfile "\nCreating old version ".$maxversion; |
print $logfile "\nCreating old version ".$maxversion; |
|
|
my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct; |
my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct; |
|
|
if (copy($target,$copyfile)) { |
if (copy($target,$copyfile)) { |
print $logfile "Copied old target to ".$copyfile."\n"; |
print $logfile "Copied old target to ".$copyfile."\n"; |
$scrout.='<p>Copied old target file'; |
$r->print('<p>Copied old target file'); |
} else { |
} else { |
print $logfile "Unable to write ".$copyfile.':'.$!."\n"; |
print $logfile "Unable to write ".$copyfile.':'.$!."\n"; |
return "<font color=red>Failed to copy old target, $!, FAIL</font>"; |
return "<font color=red>Failed to copy old target, $!, FAIL</font>"; |
} |
} |
|
|
# --------------------------------------------------------------- Copy Metadata |
# --------------------------------------------------------------- Copy Metadata |
|
|
$copyfile=$copyfile.'.meta'; |
$copyfile=$copyfile.'.meta'; |
|
|
if (copy($target.'.meta',$copyfile)) { |
if (copy($target.'.meta',$copyfile)) { |
print $logfile "Copied old target metadata to ".$copyfile."\n"; |
print $logfile "Copied old target metadata to ".$copyfile."\n"; |
$scrout.='<p>Copied old metadata'; |
$r->print('<p>Copied old metadata') |
} else { |
} else { |
print $logfile "Unable to write metadata ".$copyfile.':'.$!."\n"; |
print $logfile "Unable to write metadata ".$copyfile.':'.$!."\n"; |
if (-e $target.'.meta') { |
if (-e $target.'.meta') { |
return |
return |
"<font color=red>Failed to write old metadata copy, $!, FAIL</font>"; |
"<font color=red>Failed to write old metadata copy, $!, FAIL</font>"; |
} |
} |
} |
} |
|
|
|
|
} else { |
} else { |
$scrout.='<p>Initial version'; |
$r->print('<p>Initial version'); |
print $logfile "\nInitial version"; |
print $logfile "\nInitial version"; |
} |
} |
|
|
# ---------------------------------------------------------------- Write Source |
# ---------------------------------------------------------------- Write Source |
my $copyfile=$target; |
my $copyfile=$target; |
|
|
my @parts=split(/\//,$copyfile); |
my @parts=split(/\//,$copyfile); |
my $path="/$parts[1]/$parts[2]/$parts[3]/$parts[4]"; |
my $path="/$parts[1]/$parts[2]/$parts[3]/$parts[4]"; |
|
|
my $count; |
my $count; |
for ($count=5;$count<$#parts;$count++) { |
for ($count=5;$count<$#parts;$count++) { |
$path.="/$parts[$count]"; |
$path.="/$parts[$count]"; |
if ((-e $path)!=1) { |
if ((-e $path)!=1) { |
print $logfile "\nCreating directory ".$path; |
print $logfile "\nCreating directory ".$path; |
$scrout.='<p>Created directory '.$parts[$count]; |
$r->print('<p>Created directory '.$parts[$count]); |
mkdir($path,0777); |
mkdir($path,0777); |
} |
|
} |
|
|
|
if (copy($source,$copyfile)) { |
|
print $logfile "\nCopied original source to ".$copyfile."\n"; |
|
$scrout.='<p>Copied source file'; |
|
} else { |
|
print $logfile "\nUnable to write ".$copyfile.':'.$!."\n"; |
|
return "<font color=red>Failed to copy source, $!, FAIL</font>"; |
|
} |
} |
|
} |
|
|
|
if (copy($source,$copyfile)) { |
|
print $logfile "\nCopied original source to ".$copyfile."\n"; |
|
$r->print('<p>Copied source file'); |
|
} else { |
|
print $logfile "\nUnable to write ".$copyfile.':'.$!."\n"; |
|
return "<font color=red>Failed to copy source, $!, FAIL</font>"; |
|
} |
|
|
# --------------------------------------------------------------- Copy Metadata |
# --------------------------------------------------------------- Copy Metadata |
|
|
$copyfile=$copyfile.'.meta'; |
$copyfile=$copyfile.'.meta'; |
|
|
if (copy($source.'.meta',$copyfile)) { |
if (copy($source.'.meta',$copyfile)) { |
print $logfile "\nCopied original metadata to ".$copyfile."\n"; |
print $logfile "\nCopied original metadata to ".$copyfile."\n"; |
$scrout.='<p>Copied metadata'; |
$r->print('<p>Copied metadata'); |
} else { |
} else { |
print $logfile "\nUnable to write metadata ".$copyfile.':'.$!."\n"; |
print $logfile "\nUnable to write metadata ".$copyfile.':'.$!."\n"; |
return |
return |
"<font color=red>Failed to write metadata copy, $!, FAIL</font>"; |
"<font color=red>Failed to write metadata copy, $!, FAIL</font>"; |
} |
} |
|
$r->rflush; |
# --------------------------------------------------- Send update notifications |
# --------------------------------------------------- Send update notifications |
|
|
my @subscribed=&get_subscribed_hosts($target); |
my @subscribed=&get_subscribed_hosts($target); |
foreach my $subhost (@subscribed) { |
foreach my $subhost (@subscribed) { |
$scrout.='<p>Notifying host '.$subhost.':'; |
$r->print('<p>Notifying host '.$subhost.':');$r->rflush; |
print $logfile "\nNotifying host ".$subhost.':'; |
print $logfile "\nNotifying host ".$subhost.':'; |
my $reply=&Apache::lonnet::critical('update:'.$target,$subhost); |
my $reply=&Apache::lonnet::critical('update:'.$target,$subhost); |
$scrout.=$reply; |
$r->print($reply.'<br />');$r->rflush; |
print $logfile $reply; |
print $logfile $reply; |
} |
} |
|
|
# ---------------------------------------- Send update notifications, meta only |
# ---------------------------------------- Send update notifications, meta only |
|
|
my @subscribedmeta=&get_subscribed_hosts("$target.meta"); |
my @subscribedmeta=&get_subscribed_hosts("$target.meta"); |
foreach my $subhost (@subscribedmeta) { |
foreach my $subhost (@subscribedmeta) { |
$scrout.='<p>Notifying host for metadata only '.$subhost.':'; |
$r->print('<p>Notifying host for metadata only '.$subhost.':');$r->rflush; |
print $logfile "\nNotifying host for metadata only ".$subhost.':'; |
print $logfile "\nNotifying host for metadata only ".$subhost.':'; |
my $reply=&Apache::lonnet::critical('update:'.$target.'.meta', |
my $reply=&Apache::lonnet::critical('update:'.$target.'.meta', |
$subhost); |
$subhost); |
$scrout.=$reply; |
$r->print($reply.'<br />');$r->rflush; |
|
print $logfile $reply; |
|
} |
|
|
|
# --------------------------------------------------- Notify subscribed courses |
|
my %courses=&coursedependencies($target); |
|
my $now=time; |
|
foreach (keys %courses) { |
|
$r->print('<p>Notifying course '.$_.':');$r->rflush; |
|
print $logfile "\nNotifying host ".$_.':'; |
|
my ($cdom,$cname)=split(/\_/,$_); |
|
my $reply=&Apache::lonnet::cput |
|
('versionupdate',{$target => $now},$cdom,$cname); |
|
$r->print($reply.'<br />');$r->rflush; |
print $logfile $reply; |
print $logfile $reply; |
} |
} |
|
|
# ------------------------------------------------ Provide link to new resource |
# ------------------------------------------------ Provide link to new resource |
unless ($batch) { |
unless ($batch) { |
my $thisdistarget=$target; |
my $thisdistarget=$target; |
$thisdistarget=~s/^$docroot//; |
$thisdistarget=~s/^$docroot//; |
|
|
my $thissrc=$source; |
my $thissrc=$source; |
$thissrc=~s/^\/home\/(\w+)\/public_html/\/priv\/$1/; |
$thissrc=~s/^\/home\/(\w+)\/public_html/\/priv\/$1/; |
|
|
my $thissrcdir=$thissrc; |
my $thissrcdir=$thissrc; |
$thissrcdir=~s/\/[^\/]+$/\//; |
$thissrcdir=~s/\/[^\/]+$/\//; |
|
|
|
|
return $warning.$scrout. |
$r->print( |
'<hr><a href="'.$thisdistarget.'"><font size="+2">'. |
'<hr><a href="'.$thisdistarget.'"><font size="+2">'. |
'View Published Version</font></a>'. |
'View Published Version</font></a>'. |
'<p><a href="'.$thissrc.'"><font size=+2>Back to Source</font></a>'. |
'<p><a href="'.$thissrc.'"><font size=+2>Back to Source</font></a>'. |
'<p><a href="'.$thissrcdir. |
'<p><a href="'.$thissrcdir. |
'"><font size="+2">Back to Source Directory</font></a>'; |
'"><font size="+2">Back to Source Directory</font></a>'); |
} else { |
} |
return $warning.$scrout; |
|
} |
|
} |
} |
|
|
######################################### |
######################################### |
|
|
sub batchpublish { |
sub batchpublish { |
my ($r,$srcfile,$targetfile)=@_; |
my ($r,$srcfile,$targetfile)=@_; |
|
$srcfile=~s/\/+/\//g; |
|
$targetfile=~s/\/+/\//g; |
my $thisdisfn=$srcfile; |
my $thisdisfn=$srcfile; |
$thisdisfn=~s/\/home\/korte\/public_html\///; |
$thisdisfn=~s/\/home\/korte\/public_html\///; |
$srcfile=~s/\/+/\//g; |
$srcfile=~s/\/+/\//g; |
Line 1466 sub batchpublish {
|
Line 1457 sub batchpublish {
|
# phase two takes |
# phase two takes |
# my ($source,$target,$style,$distarget,batch)=@_; |
# my ($source,$target,$style,$distarget,batch)=@_; |
# $ENV{'form.allmeta'},$ENV{'form.title'},$ENV{'form.author'},... |
# $ENV{'form.allmeta'},$ENV{'form.title'},$ENV{'form.author'},... |
$r->print( |
$r->print('<p>'); |
'<p>'.&phasetwo($srcfile,$targetfile,$thisembstyle,$thisdistarget,1).'</p>'); |
&phasetwo($r,$srcfile,$targetfile,$thisembstyle,$thisdistarget,1); |
|
$r->print('</p>'); |
return ''; |
return ''; |
} |
} |
|
|
Line 1475 sub batchpublish {
|
Line 1467 sub batchpublish {
|
|
|
sub publishdirectory { |
sub publishdirectory { |
my ($r,$fn,$thisdisfn)=@_; |
my ($r,$fn,$thisdisfn)=@_; |
|
$fn=~s/\/+/\//g; |
|
$thisdisfn=~s/\/+/\//g; |
my $resdir= |
my $resdir= |
$Apache::lonnet::perlvar{'lonDocRoot'}.'/res/'.$cudom.'/'.$cuname. |
$Apache::lonnet::perlvar{'lonDocRoot'}.'/res/'.$cudom.'/'.$cuname.'/'. |
$thisdisfn; |
$thisdisfn; |
$r->print('<h1>Directory <tt>'.$thisdisfn.'/</tt></h1>'. |
$r->print('<h1>Directory <tt>'.$thisdisfn.'</tt></h1>'. |
'Target: <tt>'.$resdir.'</tt><br />'); |
'Target: <tt>'.$resdir.'</tt><br />'); |
|
|
my $dirptr=16384; # Mask indicating a directory in stat.cmode. |
my $dirptr=16384; # Mask indicating a directory in stat.cmode. |
Line 1666 unless ($ENV{'form.phase'} eq 'two') {
|
Line 1660 unless ($ENV{'form.phase'} eq 'two') {
|
|
|
$r->print('<html><head><title>LON-CAPA Publishing</title></head>'); |
$r->print('<html><head><title>LON-CAPA Publishing</title></head>'); |
$r->print(&Apache::loncommon::bodytag('Resource Publication')); |
$r->print(&Apache::loncommon::bodytag('Resource Publication')); |
|
|
|
|
my $thisfn=$fn; |
my $thisfn=$fn; |
|
|
my $thistarget=$thisfn; |
my $thistarget=$thisfn; |
Line 1711 unless ($ENV{'form.phase'} eq 'two') {
|
Line 1707 unless ($ENV{'form.phase'} eq 'two') {
|
$r->print( |
$r->print( |
'<hr />'.&publish($thisfn,$thistarget,$thisembstyle)); |
'<hr />'.&publish($thisfn,$thistarget,$thisembstyle)); |
} else { |
} else { |
$r->print( |
$r->print('<hr />'); |
'<hr />'.&phasetwo($thisfn,$thistarget, |
&phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget); |
$thisembstyle,$thisdistarget)); |
|
} |
} |
|
|
} |
} |