version 1.124, 2003/07/05 10:07:12
|
version 1.127, 2003/07/25 02:04:51
|
Line 82 invocation by F<loncapa_apache.conf>:
|
Line 82 invocation by F<loncapa_apache.conf>:
|
ErrorDocument 500 /adm/errorhandler |
ErrorDocument 500 /adm/errorhandler |
</Location> |
</Location> |
|
|
|
=head1 OVERVIEW |
|
|
|
Authors can only write-access the C</~authorname/> space. They can |
|
copy resources into the resource area through the publication step, |
|
and move them back through a recover step. Authors do not have direct |
|
write-access to their resource space. |
|
|
|
During the publication step, several events will be |
|
triggered. Metadata is gathered, where a wizard manages default |
|
entries on a hierarchical per-directory base: The wizard imports the |
|
metadata (including access privileges and royalty information) from |
|
the most recent published resource in the current directory, and if |
|
that is not available, from the next directory above, etc. The Network |
|
keeps all previous versions of a resource and makes them available by |
|
an explicit version number, which is inserted between the file name |
|
and extension, for example C<foo.2.html>, while the most recent |
|
version does not carry a version number (C<foo.html>). Servers |
|
subscribing to a changed resource are notified that a new version is |
|
available. |
|
|
=head1 DESCRIPTION |
=head1 DESCRIPTION |
|
|
B<lonpublisher> takes the proper steps to add resources to the LON-CAPA |
B<lonpublisher> takes the proper steps to add resources to the LON-CAPA |
Line 815 sub publish {
|
Line 835 sub publish {
|
return ('<font color="red">No write permission to user directory, FAIL</font>',1); |
return ('<font color="red">No write permission to user directory, FAIL</font>',1); |
} |
} |
print $logfile |
print $logfile |
"\n\n================= Publish ".localtime()." Phase One ================\n"; |
"\n\n================= Publish ".localtime()." Phase One ================\n".$ENV{'user.name'}.'@'.$ENV{'user.domain'}."\n"; |
|
|
if (($style eq 'ssi') || ($style eq 'rat') || ($style eq 'prv')) { |
if (($style eq 'ssi') || ($style eq 'rat') || ($style eq 'prv')) { |
# ------------------------------------------------------- This needs processing |
# ------------------------------------------------------- This needs processing |
Line 910 sub publish {
|
Line 930 sub publish {
|
$metadatafields{'author'}=~s/\s+/ /g; |
$metadatafields{'author'}=~s/\s+/ /g; |
$metadatafields{'author'}=~s/\s+$//; |
$metadatafields{'author'}=~s/\s+$//; |
$metadatafields{'owner'}=$cuname.'@'.$cudom; |
$metadatafields{'owner'}=$cuname.'@'.$cudom; |
|
$metadatafields{'modifyinguser'}=$ENV{'user.name'}.'@'. |
|
$ENV{'user.domain'}; |
|
$metadatafields{'authorspace'}=$cuname.'@'.$cudom; |
|
|
# ------------------------------------------------ Check out directory hierachy |
# ------------------------------------------------ Check out directory hierachy |
|
|
Line 1231 sub phasetwo {
|
Line 1254 sub phasetwo {
|
return 0; |
return 0; |
} |
} |
print $logfile |
print $logfile |
"\n================= Publish ".localtime()." Phase Two ================\n"; |
"\n================= Publish ".localtime()." Phase Two ================\n".$ENV{'user.name'}.'@'.$ENV{'user.domain'}."\n"; |
|
|
%metadatafields=(); |
%metadatafields=(); |
%metadatakeys=(); |
%metadatakeys=(); |
Line 1338 sub phasetwo {
|
Line 1361 sub phasetwo {
|
closedir(DIR); |
closedir(DIR); |
$maxversion++; |
$maxversion++; |
$r->print('<p>Creating old version '.$maxversion.'</p>'); |
$r->print('<p>Creating old version '.$maxversion.'</p>'); |
print $logfile "\nCreating old version ".$maxversion; |
print $logfile "\nCreating old version ".$maxversion."\n"; |
|
|
my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct; |
my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct; |
|
|
Line 1766 __END__
|
Line 1789 __END__
|
|
|
=back |
=back |
|
|
|
=back |
|
|
=cut |
=cut |
|
|