[LON-CAPA-cvs] cvs: loncom /interface lonindexer.pm

dseaton dseaton at source.lon-capa.org
Fri Oct 14 12:58:33 EDT 2011


dseaton		Fri Oct 14 16:58:33 2011 EDT

  Modified files:              
    /loncom/interface	lonindexer.pm 
  Log:
  Bug 4984
  
  
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.209 loncom/interface/lonindexer.pm:1.210
--- loncom/interface/lonindexer.pm:1.209	Mon Jul  4 09:24:58 2011
+++ loncom/interface/lonindexer.pm	Fri Oct 14 16:58:32 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.209 2011/07/04 09:24:58 foxr Exp $
+# $Id: lonindexer.pm,v 1.210 2011/10/14 16:58:32 dseaton Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -755,6 +755,7 @@
 sub get_list {
     my ($r,$uri)=@_;
     my @list=();
+    
     (my $luri = $uri) =~ s/\//_/g;
     if ($env{'form.updatedisplay'}) {
 	foreach (keys %hash) {
@@ -782,6 +783,14 @@
 	$hash{'dirlist_files_'.$luri} = join("\n", at list);
 	$hash{'dirlist_timestamp_files_'.$luri} = time;
     }
+#Checking for error messages associated with empty directories or inaccessible servers (See Bug 4984)
+    if($list[0] eq 'no_such_dir' || $list[0] eq 'no_such_host') { 
+        $r->print("<p class='LC_info'>" . &mt("Directory does not exist."). "</p>");
+    }
+    elsif($list[0] eq 'con_lost') {
+        $r->print("<p class='LC_info'>" . &mt("Directory temporarily not accessible."). "</p>");
+    }
+
     return @list=&match_ext($r, at list);    
 }
 




More information about the LON-CAPA-cvs mailing list