--- loncom/interface/lonsource.pm 2011/10/25 19:11:52 1.26 +++ loncom/interface/lonsource.pm 2011/10/31 01:16:59 1.27 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Source Code handler # -# $Id: lonsource.pm,v 1.26 2011/10/25 19:11:52 www Exp $ +# $Id: lonsource.pm,v 1.27 2011/10/31 01:16:59 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -90,7 +90,8 @@ sub copy_stage { my ($role,$author_name,$domain)=©_author(); # Construct path to copy and filter out any possibly nasty stuff - my $path_to_new_file = '/home/httpd/html/priv/'.$domain.'/'.$author_name.'/'.$newpath.'/'.$listname; + my $path_to_new_file = $r->dir_config('lonDocRoot'). + "/priv/$domain/$author_name/$newpath/$listname"; $path_to_new_file=~s/\.\.//g; $path_to_new_file=~s/\~//g; $path_to_new_file=~s/\/+/\//g; @@ -166,7 +167,7 @@ sub copy_file { #Figure out if we are author or co-author my ($role,$author_name,$domain)=©_author(); - my $path = '/home/httpd/html/priv/'.$domain.'/'.$author_name.'/'; + my $path = $r->dir_config('lonDocRoot')."/priv/$domain/$author_name/"; my @directories = split(/\//,$newpath); foreach my $now_checking (@directories) {