--- loncom/interface/lonmenu.pm 2011/10/21 15:26:27 1.352 +++ loncom/interface/lonmenu.pm 2011/10/21 19:26:23 1.353 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.352 2011/10/21 15:26:27 raeburn Exp $ +# $Id: lonmenu.pm,v 1.353 2011/10/21 19:26:23 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -447,7 +447,7 @@ sub innerregister { # # Set defaults for authors my ($top,$bottom) = ('con-','struct'); - my $action = "go('/priv/".$env{'user.name'}."');"; + my $action = "go('/priv/".$env{'user.domain'}.'/'.$env{'user.name'}."');"; my $cadom = $env{'request.role.domain'}; my $caname = $env{'user.name'}; my $desc = "Enter my construction space"; @@ -455,12 +455,12 @@ sub innerregister { if ($env{'request.role'} =~ /^ca/) { ($cadom,$caname)=($env{'request.role'}=~/($match_domain)\/($match_username)$/); ($top,$bottom) = ('co con-','struct'); - $action = "go('/priv/".$caname."');"; + $action = "go('/priv/".$cadom.'/'.$caname."');"; $desc = "Enter construction space as co-author"; } elsif ($env{'request.role'} =~ /^aa/) { ($cadom,$caname)=($env{'request.role'}=~/($match_domain)\/($match_username)$/); ($top,$bottom) = ('co con-','struct'); - $action = "go('/priv/".$caname."');"; + $action = "go('/priv/".$cadom.'/'.$caname."');"; $desc = "Enter construction space as assistant co-author"; } # Check that we are on the correct machine @@ -493,9 +493,9 @@ sub innerregister { $uploaded = &is_course_upload($file,$cnum,$cdom); } if (!$uploaded) { - $file=~s/^($match_domain)\/($match_username)/\/priv\/$2/; + $file=~s/^($match_domain)\/($match_username)/\/priv\/$1\/$2/; # Check that the user has permission to edit this resource - ($cfuname,$cfudom)=&Apache::loncacc::constructaccess($file,$1); + ($cfuname,$cfudom)=&Apache::loncacc::constructaccess($file); if (defined($cfudom)) { $home=&Apache::lonnet::homeserver($cfuname,$cfudom); my $allowed=0; @@ -576,9 +576,11 @@ sub innerregister { # # We are in construction space # - my ($uname,$thisdisfn) = - ($env{'request.filename'}=~m|^/home/([^/]+)/public_html/(.*)|); - my $currdir = '/priv/'.$uname.'/'.$thisdisfn; + + + my ($udom,$uname,$thisdisfn) = + ($env{'request.filename'}=~m|^/home/httpd/html/priv/([^/]+)/([^/]+)/(.*)$|); + my $currdir = '/priv/'.$udom.'/'.$uname.'/'.$thisdisfn; if ($currdir =~ m-/$-) { $is_const_dir = 1; } else { @@ -590,10 +592,10 @@ sub innerregister { # $menuitems=(<