[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm mydesk.tab
www
www at source.lon-capa.org
Fri Oct 21 15:26:23 EDT 2011
www Fri Oct 21 19:26:23 2011 EDT
Modified files:
/loncom/interface lonmenu.pm mydesk.tab
Log:
Further work on Bug #1320
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.352 loncom/interface/lonmenu.pm:1.353
--- loncom/interface/lonmenu.pm:1.352 Fri Oct 21 15:26:27 2011
+++ loncom/interface/lonmenu.pm Fri Oct 21 19:26:23 2011
@@ -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 @@
#
# 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 @@
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 @@
$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 @@
#
# 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 @@
#
$menuitems=(<<ENDMENUITEMS);
s&6&1&list.png&Directory&dir[_1]&golist('$esc_currdir')&List current directory
-s&6&2&rtrv.png&Retrieve&version[_1]&gocstr('/adm/retrieve','/~$uname/$cleandisfn')&Retrieve old version
-s&6&3&pub.png&Publish&resource[_3]&gocstr('/adm/publish','/~$uname/$cleandisfn')&Publish this resource
-s&7&1&del.png&Delete&resource[_2]&gocstr('/adm/cfile?action=delete','/~$uname/$cleandisfn')&Delete this resource
-s&7&2&prt.png&Print&printout[_1]&gocstr('/adm/printout','/~$uname/$cleandisfn')&Prepare a printable document
+s&6&2&rtrv.png&Retrieve&version[_1]&gocstr('/adm/retrieve','/priv/$udom/$uname/$cleandisfn')&Retrieve old version
+s&6&3&pub.png&Publish&resource[_3]&gocstr('/adm/publish','/priv/$udom/$uname/$cleandisfn')&Publish this resource
+s&7&1&del.png&Delete&resource[_2]&gocstr('/adm/cfile?action=delete','/priv/$udom/$uname/$cleandisfn')&Delete this resource
+s&7&2&prt.png&Print&printout[_1]&gocstr('/adm/printout','/priv/$udom/$uname/$cleandisfn')&Prepare a printable document
ENDMENUITEMS
}
if (ref($bread_crumbs) eq 'ARRAY') {
@@ -1001,6 +1003,7 @@
($env{'request.role'}=~/($match_domain)\/($match_username)$/);
}
$act =~ s/\$caname/$caname/g;
+ $act =~ s/\$cadom/$cadom/g;
my $home = &Apache::lonnet::homeserver($caname,$cadom);
my $allowed=0;
my @ids=&Apache::lonnet::current_machine_ids();
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.145 loncom/interface/mydesk.tab:1.146
--- loncom/interface/mydesk.tab:1.145 Mon Jan 17 01:35:32 2011
+++ loncom/interface/mydesk.tab Fri Oct 21 19:26:23 2011
@@ -61,7 +61,7 @@
scnd:/adm/grades:::Grades:vgr
scnd:/adm/parmset:::Settings:opa
scnd:/adm/roles:::Roles:
-scnd:/priv/[uname]/:::Construction Space:author
+scnd:/priv/[udom]/[uname]/:::Construction Space:author
scnd:/res/[udom]/[uname]/?launch=1:::Browse:author
@@ -180,9 +180,9 @@
5:3:popa:$crs:parm.png:course[_9]:parms[_1]:go('/adm/parmset');:Modify parameter settings (due dates, etc) for resources and the course:cmn
5:3:popa:$cmty:parm.png:communi-[_6]:ty parms[_1]:go('/adm/parmset');:Modify parameter settings (due dates, etc) for resources and the community:cmm
6:1:clear
-6:1:author:rau:cstr.png:con-[_1]:struct[_1]:go('/priv/$uname/');:Enter my construction space:set
-6:1:author:rca:cstr.png:co con-[_1]:struct[_2]:go('/priv/$caname/');:Enter construction space as a co-author:set
-6:1:author:raa:cstr.png:co con-[_1]:struct[_2]:go('/priv/$caname/');:Enter construction space as an assistant co-author:set
+6:1:author:rau:cstr.png:con-[_1]:struct[_1]:go('/priv/$udom/$uname/');:Enter my construction space:set
+6:1:author:rca:cstr.png:co con-[_1]:struct[_2]:go('/priv/$cadom/$caname/');:Enter construction space as a co-author:set
+6:1:author:raa:cstr.png:co con-[_1]:struct[_2]:go('/priv/$cadom/$caname/');:Enter construction space as an assistant co-author:set
6:1:pmau:$requested_domain:conf.png:domain[_1]:config[_1]:go('/adm/domainprefs');:Set domain configuration:dom
6:1:courseenv_canuse_pdfforms:any:pdfupload.png:upload[_1]:pdf form[_1]:go('/adm/pdfupload'):Upload a PDF Form with filled Form Fields:grd
6:1:community_canuse_pdfforms:any:pdfupload.png:upload[_1]:pdf form[_1]:go('/adm/pdfupload'):Upload a PDF Form with filled Form Fields:grd
More information about the LON-CAPA-cvs
mailing list