[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 25 Feb 2003 19:30:51 -0000
www Tue Feb 25 14:30:51 2003 EDT
Modified files:
/loncom/interface londocs.pm
Log:
Bug #1228 - add symb to link in DOCS
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.49 loncom/interface/londocs.pm:1.50
--- loncom/interface/londocs.pm:1.49 Fri Feb 14 14:35:54 2003
+++ loncom/interface/londocs.pm Tue Feb 25 14:30:51 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.49 2003/02/14 19:35:54 www Exp $
+# $Id: londocs.pm,v 1.50 2003/02/25 19:30:51 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -188,7 +188,7 @@
my ($name,$url)=split(/\:/,$Apache::lonratedt::resources[$_]);
unless ($name) { $name=(split(/\//,$url))[-1]; }
unless ($name) { $name='NO RESOURCE'; $url='/adm/notfound.html'; }
- $r->print(&entryline($idx,$name,$url,$folder,$allowed));
+ $r->print(&entryline($idx,$name,$url,$folder,$allowed,$_));
$idx++;
}
$r->print('</table>');
@@ -198,7 +198,7 @@
# --------------------------------------------------------------- An entry line
sub entryline {
- my ($index,$title,$url,$folder,$allowed)=@_;
+ my ($index,$title,$url,$folder,$allowed,$residx)=@_;
$title=~s/\&colon\;/\:/g;
$title=&HTML::Entities::encode(&HTML::Entities::decode(
&Apache::lonnet::unescape($title)),'\"\<\>\&\'');
@@ -249,6 +249,16 @@
}
}
$url=~s/^http\&colon\;\/\//\/adm\/wrapper\/ext\//;
+ if ($residx) {
+ $url.=(($url=~/\?/)?'&':'?').'symb='.
+ &Apache::lonnet::escape(&Apache::lonnet::symbclean(
+ &Apache::lonnet::declutter('uploaded/'.
+ $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}.'/'.
+ $ENV{'course.'.$ENV{'request.course.id'}.'.num'}.'/'.$folder.
+ '.sequence').
+ '___'.$residx.'___'.
+ &Apache::lonnet::declutter($url)));
+ }
if ($isfolder) { $url.='&foldername='.
&Apache::lonnet::escape($foldertitle); }
$line.='<td bgcolor="#FFFFBB"><a href="'.$url.'" target="cat_'.$folder.