--- loncom/publisher/lonpubdir.pm 2003/07/05 10:07:12 1.35 +++ loncom/publisher/lonpubdir.pm 2003/08/03 01:20:02 1.37 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Directory Lister # -# $Id: lonpubdir.pm,v 1.35 2003/07/05 10:07:12 www Exp $ +# $Id: lonpubdir.pm,v 1.37 2003/08/03 01:20:02 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -165,6 +165,7 @@ sub getEffectiveUrl { $fn=~s|^/~(\w+)|/home/$1/public_html|; } } + $fn=~s/\/+/\//g; return $fn; } # @@ -189,6 +190,12 @@ sub startpage { $r->print(&Apache::loncommon::bodytag(undef,undef,undef,1)); my $pubdirscript=(< +// Store directory location for menu bar to find + +parent.lastknownpriv='/~$uname/$thisdisfn/'; + +// Confirmation dialogues + function pubdir(theform) { if (confirm('Publish complete directory?')) { theform.submit(); @@ -311,7 +318,7 @@ sub putresource { $thisdisfn.'/'.$filename.'" target=cat>Retrieve'; } my $editlink=''; - if ($filename=~/\.(xml|html|htm|xhtml|xhtm)$/) { + if ($filename=~/\.(xml|html|htm|xhtml|xhtm|sty)$/) { $editlink=' (Edit)'; } if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library)$/) {