--- loncom/interface/londocs.pm 2002/11/18 15:21:31 1.37
+++ loncom/interface/londocs.pm 2002/12/04 14:02:49 1.38
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.37 2002/11/18 15:21:31 www Exp $
+# $Id: londocs.pm,v 1.38 2002/12/04 14:02:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -35,6 +35,7 @@ use Apache::loncommon;
use Apache::lonratedt;
use Apache::lonratsrv;
use Apache::lonxml;
+use HTML::Entities;
use GDBM_File;
my $iconpath;
@@ -118,20 +119,25 @@ sub editor {
}
$#Apache::lonratedt::order--;
} elsif ($cmd eq 'up') {
+ if (($idx) && (defined($Apache::lonratedt::order[$idx-1]))) {
my $i=$Apache::lonratedt::order[$idx-1];
$Apache::lonratedt::order[$idx-1]=
$Apache::lonratedt::order[$idx];
$Apache::lonratedt::order[$idx]=$i;
+ }
} elsif ($cmd eq 'down') {
+ if (defined($Apache::lonratedt::order[$idx+1])) {
my $i=$Apache::lonratedt::order[$idx+1];
$Apache::lonratedt::order[$idx+1]=
$Apache::lonratedt::order[$idx];
$Apache::lonratedt::order[$idx]=$i;
+ }
} elsif ($cmd eq 'rename') {
my ($rtitle,@rrest)=split(/\:/,
$Apache::lonratedt::resources[
$Apache::lonratedt::order[$idx]]);
- my $comment=$ENV{'form.title'};
+ my $comment=
+ &HTML::Entities::decode($ENV{'form.title'});
$comment=~s/\\<\;/g;
$comment=~s/\>/\>\;/g;
$comment=~s/\:/\:/g;
@@ -185,6 +191,21 @@ sub editor {
sub entryline {
my ($index,$title,$url,$folder,$allowed)=@_;
+ $title=~s/\&colon\;/\:/g;
+ $title=&HTML::Entities::encode(&HTML::Entities::decode(
+ &Apache::lonnet::unescape($title)),'\"\<\>\&\'');
+ my $renametitle=$title;
+ my $foldertitle=$title;
+ if ($title=~
+ /^(\d+)\_\_\_\&\;\&\;\&\;\_\_\_(\w+)\_\_\_\&\;\&\;\&\;\_\_\_(\w+)\_\_\_\&\;\&\;\&\;\_\_\_(.*)$/
+ ) {
+ $foldertitle=&Apache::lontexconvert::msgtexconverted($4);
+ $renametitle=$4;
+ $title=''.localtime($1).' '.
+ &Apache::loncommon::plainname($2,$3).':
'.
+ $foldertitle;
+ }
+ $renametitle=~s/\"\;/\\\"/g;
my $line='