--- loncom/interface/londocs.pm 2004/12/23 17:50:42 1.161
+++ loncom/interface/londocs.pm 2005/03/02 22:26:36 1.169
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.161 2004/12/23 17:50:42 albertel Exp $
+# $Id: londocs.pm,v 1.169 2005/03/02 22:26:36 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -132,11 +132,17 @@ sub dumpbutton {
}
}
+sub clean {
+ my ($title)=@_;
+ $title=~s/[^\w\/\!\$\%\^\*\-\_\=\+\;\:\,\\\|\`\~]+/\_/gs;
+ return $title;
+}
# -------------------------------------------------------- Actually dump course
sub dumpcourse {
my $r=shift;
- $r->print('
Dump DOCS'.
+ my $html=&Apache::lonxml::xmlbegin();
+ $r->print($html.'Dump DOCS'.
&Apache::loncommon::bodytag('Dump Course DOCS to Construction Space').
'";
@@ -1387,7 +1489,7 @@ sub checkonthis {
if ($url=~/^\/res\//) {
my $result=&Apache::lonnet::repcopy(
&Apache::lonnet::filelocation('',$url));
- if ($result==OK) {
+ if ($result eq 'OK') {
$r->print(''.&mt('ok').'');
$r->rflush();
&Apache::lonnet::countacc($url);
@@ -1430,9 +1532,9 @@ sub checkonthis {
&checkonthis($r,$_,$level+1);
}
}
- } elsif ($result==HTTP_SERVICE_UNAVAILABLE) {
+ } elsif ($result eq 'HTTP_SERVICE_UNAVAILABLE') {
$r->print(''.&mt('connection down').'');
- } elsif ($result==HTTP_NOT_FOUND) {
+ } elsif ($result eq 'HTTP_NOT_FOUND') {
unless ($url=~/\$/) {
$r->print(''.&mt('not found').'');
} else {
@@ -1453,8 +1555,8 @@ sub verifycontent {
my $r=shift;
my $loaderror=&Apache::lonnet::overloaderror($r);
if ($loaderror) { return $loaderror; }
-
- $r->print('Verify Content'.
+ my $html=&Apache::lonxml::xmlbegin();
+ $r->print($html.'Verify Content'.
&Apache::loncommon::bodytag('Verify Course Documents'));
$hashtied=0;
undef %alreadyseen;
@@ -1482,7 +1584,8 @@ sub verifycontent {
sub checkversions {
my $r=shift;
- $r->print('Check Versions'.
+ my $html=&Apache::lonxml::xmlbegin();
+ $r->print($html.'Check Versions'.
&Apache::loncommon::bodytag('Check Course Document Versions'));
my $header='';
my $startsel='';
@@ -1817,7 +1920,7 @@ sub handler {
my $containertag;
my $uploadtag;
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['folderpath','pagepath','pagesymb']);
+ ['folderpath','pagepath','pagesymb','markedcopy_url','markedcopy_title']);
if ($ENV{'form.folderpath'}) {
my (@folderpath)=split('&',$ENV{'form.folderpath'});
$ENV{'form.foldername'}=&Apache::lonnet::unescape(pop(@folderpath));
@@ -1873,8 +1976,9 @@ sub handler {
my $now=time;
# print screen
+ my $html=&Apache::lonxml::xmlbegin();
$r->print(<
+$html
The LearningOnline Network with CAPA
ENDNEWSCRIPT
@@ -2017,7 +2137,9 @@ ENDNEWSCRIPT
my %lt=&Apache::lonlocal::texthash(
'uplm' => 'Upload a new main course document',
'upls' => 'Upload a new supplemental course document',
- 'impp' => 'Import a published document',
+ 'impp' => 'Import a document',
+ 'pubd' => 'Published documents',
+ 'copm' => 'All documents out of a published map',
'spec' => 'Special documents',
'upld' => 'Upload Document',
'srch' => 'Search',
@@ -2066,6 +2188,7 @@ ENDNEWSCRIPT