--- loncom/interface/lonhelper.pm 2003/09/16 20:00:57 1.46 +++ loncom/interface/lonhelper.pm 2003/09/25 20:39:32 1.47 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.46 2003/09/16 20:00:57 bowersj2 Exp $ +# $Id: lonhelper.pm,v 1.47 2003/09/25 20:39:32 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2308,9 +2308,17 @@ BUTTONS my @fileList; # If the subdirectory is in local CSTR space - if ($subdir =~ m|/home/([^/]+)/public_html|) { + my $metadir; + if ($subdir =~ m|/home/([^/]+)/public_html/(.*)|) { my $user = $1; my $domain = $Apache::lonnet::perlvar{'lonDefDomain'}; + $metadir='/res/'.$domain.'/'.$user.'/'.$2; + @fileList = &Apache::lonnet::dirlist($subdir, $domain, $user, ''); + } elsif ($subdir =~ m|^~([^/]+)/(.*)$|) { + $subdir='/home/'.$1.'/public_html/'.$2; + my $user = $1; + my $domain = $Apache::lonnet::perlvar{'lonDefDomain'}; + $metadir='/res/'.$domain.'/'.$user.'/'.$2; @fileList = &Apache::lonnet::dirlist($subdir, $domain, $user, ''); } else { # local library server resource space @@ -2349,7 +2357,7 @@ BUTTONS } # Get the title - my $title = Apache::lonpubdir::getTitleString($fileName); + my $title = Apache::lonpubdir::getTitleString(($metadir?$metadir:$subdir) .'/'. $file); # Netscape 4 is stupid and there's nowhere to put the # information on the input tag that the file is Published, @@ -2387,7 +2395,7 @@ BUTTONS $result .= "\n"; if (!$choices) { - $result .= 'There are no files available to select in this directory. Please go back and select another option.

'; + $result .= 'There are no files available to select in this directory ('.$subdir.'). Please go back and select another option.

'; } $result .= $buttons;