--- loncom/publisher/lonpubmenu.pm 2005/03/10 03:50:49 1.2
+++ loncom/publisher/lonpubmenu.pm 2015/06/09 21:23:27 1.7
@@ -1,6 +1,8 @@
# The LearningOnline Network with CAPA
# Construction Space Buttons for Top Frame
#
+# $Id: lonpubmenu.pm,v 1.7 2015/06/09 21:23:27 damieng Exp $
+#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -27,14 +29,18 @@
package Apache::lonpubmenu;
use Apache::lonlocal;
+use Apache::lonnet;
use Apache::loncommon;
sub handler {
my $r = shift;
- my %lt=&Apache::lonlocal::texthash(
+ my %js_lt=&Apache::lonlocal::texthash(
cnpd => 'Cannot publish directory',
cnrd => 'Cannot retrieve directory',
mcdi => 'Must create new subdirectory inside a directory',
+ );
+ &js_escape(\%js_lt);
+ my %html_lt=&Apache::lonlocal::texthash(
pubr => 'Publish this Resource',
pubd => 'Publish this Directory',
rtrv => 'Retrieve Old Version',
@@ -42,7 +48,7 @@ sub handler {
list => 'List Directory',
uplo => 'Upload file',
dele => 'Delete',
- edit => 'Edit Catalog Information',
+ edit => 'Edit Metadata',
sela => 'Select Action',
nfil => 'New file',
nhtm => 'New HTML file',
@@ -60,17 +66,15 @@ sub handler {
go => 'Go',
prnt => 'Print'
);
+ &html_escape(\%html_lt);
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['disp']);
- my $disp = $ENV{'form.disp'};
+ my $disp = $env{'form.disp'};
# set defaults for parent directory in case frameloc is unable to determine directory
- my $defaultdir = '/priv/'.$ENV{'user.name'}.'/';
- if ($ENV{'request.role'} =~ m#^ca\./[^/]+/([^/]+)#) {
+ my $defaultdir = '/priv/'.$env{'user.name'}.'/';
+ if ($env{'request.role'} =~ m#^ca\./[^/]+/([^/]+)#) {
$defaultdir = '/priv/'.$1.'/';
}
- $r->print(<<"ENDONE");
-
-
-LON-CAPA Publishing Frame
+ my $js=
-
-
+$start_page
@@ -243,14 +249,14 @@ END
');
} else {
$r->print('
');
}
@@ -260,7 +266,7 @@ END
|
|
@@ -268,7 +274,7 @@ END
method="post" enctype="multipart/form-data">
-
+
|
@@ -276,7 +282,7 @@ END
-
+
|
@@ -289,13 +295,13 @@ ENDTWO
-
+
|
ENDDIR
@@ -304,14 +310,14 @@ ENDDIR
|
|
ENDFILE
@@ -322,26 +328,26 @@ ENDFILE
+
@@ -350,8 +356,7 @@ ENDPROBOPS
-
-
+$end_page
ENDPAGE
}
|
---|