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

www www at source.lon-capa.org
Tue Oct 25 18:27:11 EDT 2011


www		Tue Oct 25 22:27:11 2011 EDT

  Modified files:              
    /loncom/interface	lonhelper.pm 
  Log:
  Bug #1320
  
  
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.183 loncom/interface/lonhelper.pm:1.184
--- loncom/interface/lonhelper.pm:1.183	Mon Oct 17 12:41:30 2011
+++ loncom/interface/lonhelper.pm	Tue Oct 25 22:27:11 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.183 2011/10/17 12:41:30 raeburn Exp $
+# $Id: lonhelper.pm,v 1.184 2011/10/25 22:27:11 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2975,19 +2975,11 @@
 
     # If the subdirectory is in local CSTR space
     my $metadir;
-    if ($subdir =~ m|/home/([^/]+)/public_html/(.*)|) {
+    if ($subdir =~ m|^/home/httpd/html/priv/[^/]+/[^/]+/(.*)$|) {
+        my $innerpath=$1;
 	my ($user,$domain)= 
-	    &Apache::loncacc::constructaccess($subdir,
-				     $Apache::lonnet::perlvar{'lonDefDomain'});
-	$metadir='/res/'.$domain.'/'.$user.'/'.$2;
-        ($listref,$listerror) =
-            &Apache::lonnet::dirlist($subdir,$domain,$user,undef,undef,'/');
-    } elsif ($subdir =~ m|^~([^/]+)/(.*)$|) {
-	$subdir='/home/'.$1.'/public_html/'.$2;
-	my ($user,$domain)= 
-	    &Apache::loncacc::constructaccess($subdir,
-				     $Apache::lonnet::perlvar{'lonDefDomain'});
-	$metadir='/res/'.$domain.'/'.$user.'/'.$2;
+	    &Apache::loncacc::constructaccess($subdir);
+	$metadir='/res/'.$domain.'/'.$user.'/'.$innerpath;
         ($listref,$listerror) =
             &Apache::lonnet::dirlist($subdir,$domain,$user,undef,undef,'/');
     } else {
@@ -3094,7 +3086,7 @@
     }
     my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'};
     my $subdirpart = $constructionSpaceDir;
-    $subdirpart =~ s/^\/home\/$uname\/public_html//;
+    $subdirpart =~ s/^\/home\/httpd\/html\/priv\/\Q$udom\E\/\Q$uname\E//;
     my $resdir = $docroot . '/res/' . $udom . '/' . $uname .
         $subdirpart;
 




More information about the LON-CAPA-cvs mailing list