--- loncom/interface/lonindexer.pm 2020/09/03 15:49:27 1.213.4.9
+++ 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.213.4.9 2020/09/03 15:49:27 raeburn Exp $
+# $Id: lonindexer.pm,v 1.226 2017/05/22 19:18:40 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -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
@@ -1088,13 +1101,8 @@ $r->print ('print (" $listname ");
+ $r->print (" $listname ");
$quotable_filelink = &Apache::loncommon::escape_single($filelink.'.meta');
&Apache::loncommon::inhibit_menu_check(\$quotable_filelink);
$r->print (" (".&mt('metadata').") ");
@@ -1356,8 +1364,8 @@ sub coursecontext {
$r->print(
&mt('Already in this course:').'
'
.&mt('[_1] in folder/map [_2]',
- &Apache::lonnet::gettitle($resource),
- &Apache::lonnet::gettitle($map))
+ &Apache::lonnet::gettitle($resource),
+ &Apache::lonnet::gettitle($map))
.'
');
}
}