--- loncom/interface/lonindexer.pm 2014/12/11 01:46:17 1.222
+++ loncom/interface/lonindexer.pm 2017/05/22 19:18:40 1.226
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.222 2014/12/11 01:46:17 raeburn Exp $
+# $Id: lonindexer.pm,v 1.226 2017/05/22 19:18:40 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -565,7 +565,7 @@ END
} else {
$r->print($reshome);
}
- $r->print("'>".&mt('Home').'');
+ $r->print("'>".&mt('Home directory').'');
}
$r->print('');
# ------------------------------------------------------ Remember where we were
@@ -709,7 +709,20 @@ sub scanDir {
return if ($c->aborted());
#This is a kludge, sorry aboot this
my ($strip,$dom,undef,$testdir,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);
- next if($strip =~ /.*\.meta$/ | $obs eq '1');
+ next if (($strip =~ /\.meta$/) || ($obs));
+ if ($dom ne 'domain') {
+ my ($udom,$uname);
+ if ($dom eq 'user') {
+ ($udom) = ($startdir =~ m{^/res/($match_domain)});
+ $uname = $strip;
+ } else {
+ ($udom,$uname) = ($startdir =~ m{^/res/($match_domain)/($match_courseid)});
+ }
+ if ($udom ne '' && $uname ne '') {
+ # Don't display "course author" directory.
+ next if (&Apache::lonnet::is_course($udom,$uname));
+ }
+ }
my (@fileparts) = split(/\./,$strip);
if ($hash{'display_attrs_9'} != 1) {
# if not all versions to be shown
@@ -989,6 +1002,9 @@ $r->print (''.
"\n");
my $quotable_curdir = &Apache::loncommon::escape_single($curdir);
+ my $quotable_startdir = &Apache::loncommon::escape_single($startdir);
+ my $quotable_listname = &Apache::loncommon::escape_single($listname);
+
$r->print ('');
@@ -1000,7 +1016,7 @@ $r->print (''.
+ 'onclick="set_wishlistlink('."'$plainname','$quotable_startdir$quotable_listname"."/'".')">'.
''.$tabtag);
$r->print(&Apache::loncommon::end_data_table_row());
@@ -1083,6 +1099,8 @@ $r->print ('\n");
my $quotable_filelink = &Apache::loncommon::escape_single($filelink);
+ my $quotable_startdir = Apache::loncommon::escape_single($startdir);
+ my $quotable_listname = &Apache::loncommon::escape_single($listname);
$r->print (" $listname ");
$quotable_filelink = &Apache::loncommon::escape_single($filelink.'.meta');
@@ -1096,7 +1114,7 @@ $r->print (''.
+ "','$quotable_startdir$quotable_listname'".')">'.
'');
if ($hash{'display_attrs_0'} == 1) {
@@ -1238,7 +1256,9 @@ $r->print (''.
"\n");
my $quotable_curdir = &Apache::loncommon::escape_single($curdir);
-
+ my $quotable_startdir = &Apache::loncommon::escape_single($startdir);
+ my $quotable_listname = &Apache::loncommon::escape_single($listname);
+
my $location = &Apache::loncommon::lonhttpdurl("/adm/lonIcons");
my $icon = "navmap.folder.".($nowOpen ? "open":"closed").'.gif';
$r->print (''.
+ 'onclick="set_wishlistlink('."'$listname','$quotable_startdir$quotable_listname"."/'".')">'.
'');
# Attributes