[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /publisher lonconstruct.pm lonpubdir.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Fri, 10 Dec 2004 18:26:49 -0000
raeburn Fri Dec 10 13:26:49 2004 EDT
Modified files:
/loncom loncapa_apache.conf
/loncom/publisher lonconstruct.pm lonpubdir.pm
Log:
Alternative fix to bug #3654. Re-instate use of publisher/publisher.html. recommend substitution with lonpubmenu.pm for 1.4 to eliminate inconsistent behavior of "Publish Resource" button in top frame, and "Publish Directory" button in main frame.
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.101 loncom/loncapa_apache.conf:1.102
--- loncom/loncapa_apache.conf:1.101 Fri Dec 10 09:57:47 2004
+++ loncom/loncapa_apache.conf Fri Dec 10 13:26:49 2004
@@ -1,7 +1,7 @@
##
## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
##
-## $Id: loncapa_apache.conf,v 1.101 2004/12/10 14:57:47 raeburn Exp $
+## $Id: loncapa_apache.conf,v 1.102 2004/12/10 18:26:49 raeburn Exp $
##
#
@@ -536,16 +536,6 @@
ErrorDocument 500 /adm/errorhandler
</Location>
-<Location /adm/pubmenu>
-PerlAccessHandler Apache::lonacc
-SetHandler perl-script
-PerlHandler Apache::lonpubmenu
-ErrorDocument 403 /adm/login
-ErrorDocument 404 /adm/notfound.html
-ErrorDocument 406 /adm/unauthorized
-ErrorDocument 500 /adm/errorhandler
-</Location>
-
<Location /adm/unauthorized>
PerlAccessHandler Apache::lonacc
SetHandler perl-script
Index: loncom/publisher/lonconstruct.pm
diff -u loncom/publisher/lonconstruct.pm:1.26 loncom/publisher/lonconstruct.pm:1.27
--- loncom/publisher/lonconstruct.pm:1.26 Fri Dec 10 09:57:47 2004
+++ loncom/publisher/lonconstruct.pm Fri Dec 10 13:26:49 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Page Wrapper for Construction
#
-# $Id: lonconstruct.pm,v 1.26 2004/12/10 14:57:47 raeburn Exp $
+# $Id: lonconstruct.pm,v 1.27 2004/12/10 18:26:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -97,10 +97,6 @@
return OK if $r->header_only;
my $lowerframe=$r->path_info;
- my $type='file';
- if ($lowerframe =~ /\/$/) {
- $type = 'dir';
- }
&Debug($r, "Initial URL for lower frame: ".$lowerframe);
$lowerframe=~s/^\//\/\~/;
&Debug($r, "Lower frame URL afer ~ subst: ".$lowerframe);
@@ -129,7 +125,7 @@
my $topsrc = '';
if ($ENV{'environment.remote'} ne 'off') {
$toprows = '110';
- $topsrc = '/adm/pubmenu?disp='.$type;
+ $topsrc = '/adm/localize/adm/publisher.html';
}
$r->print(<<ENDPAGE);
<html>
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.71 loncom/publisher/lonpubdir.pm:1.72
--- loncom/publisher/lonpubdir.pm:1.71 Tue Dec 7 17:40:09 2004
+++ loncom/publisher/lonpubdir.pm Fri Dec 10 13:26:49 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.71 2004/12/07 22:40:09 raeburn Exp $
+# $Id: lonpubdir.pm,v 1.72 2004/12/10 18:26:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -94,6 +94,8 @@
if ($ENV{'environment.remote'} eq 'off') {
&dircontrols($r,$uname,$udom,$thisdisfn); # Put out actions for directory,
# browse/upload + new file page.
+ } else {
+ &pubbuttons($r,$uname,$thisdisfn);
}
&resourceactions($r,$uname,$udom,$thisdisfn); #Put out form used for printing/deletion etc.
@@ -396,6 +398,22 @@
END
}
+sub pubbuttons {
+ my ($r,$uname,$thisdisfn) = @_;
+ $r->print('<form method="post" action="/adm/publish" target="_parent">'.
+ '<table><tr><td><input type="hidden" name="filename" value="/~'.
+ $uname.$thisdisfn.'/" />'.
+ '<input type="button" onClick="pubdir(this.form);" value="'.
+&mt('Publish Directory').'" />'.
+ '<input type="hidden" name="pubrec" value="" />'.
+ '<input type="hidden" name="forcerepub" value="NO" />'.
+ '<input type="button" onClick="pubrecdir(this.form);" value="'.
+&mt('Publish Directory and Sub Directories').'" /></td><td>'.
+'<input type="button" onClick="window.location='."'/~".
+ $uname.$thisdisfn."/default.meta'".'" value="'.
+&mt('Edit Directory Catalog Information').'" /></td></tr></table></form>');
+}
+
sub resourceactions {
my ($r,$uname,$udom,$thisdisfn) = @_;
$r->print(<<END);