[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm mydesk.tab /lonnet/perl lonnet.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Sun, 03 Feb 2008 05:08:10 -0000


raeburn		Sun Feb  3 00:08:10 2008 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm mydesk.tab 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  bug 5608.  CSTR icon/button/link in Main Menu for Assistant Co-author.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.233 loncom/interface/lonmenu.pm:1.234
--- loncom/interface/lonmenu.pm:1.233	Tue Jan 15 11:53:27 2008
+++ loncom/interface/lonmenu.pm	Sun Feb  3 00:07:58 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.233 2008/01/15 16:53:27 www Exp $
+# $Id: lonmenu.pm,v 1.234 2008/02/03 05:07:58 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -415,7 +415,7 @@
         ###
         my $editbutton = '';
         if ($env{'user.author'}) {
-            if ($env{'request.role'}=~/^(ca|au)/) {
+            if ($env{'request.role'}=~/^(aa|ca|au)/) {
                 # Set defaults for authors
                 my ($top,$bottom) = ('con-','struct');
                 my $action = "go('/priv/".$env{'user.name'}."');";
@@ -428,6 +428,11 @@
                     ($top,$bottom) = ('co con-','struct');
                     $action = "go('/priv/".$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."');";
+                    $desc = "Enter construction space as assistant co-author";
                 }
                 # Check that we are on the correct machine
                 my $home = &Apache::lonnet::homeserver($caname,$cadom);
@@ -1087,11 +1092,12 @@
         } elsif ($pro eq 'author') {
             if ($author) {
                 if ((($prt eq 'rca') && ($env{'request.role'}=~/^ca/)) ||
+                    (($prt eq 'raa') && ($env{'request.role'}=~/^aa/)) || 
                     (($prt eq 'rau') && ($env{'request.role'}=~/^au/))) {
                     # Check that we are on the correct machine
                     my $cadom=$requested_domain;
                     my $caname=$env{'user.name'};
-                    if ($prt eq 'rca') {
+                    if (($prt eq 'rca') || ($prt eq 'raa')) {
 		       ($cadom,$caname)=
                                ($env{'request.role'}=~/($match_domain)\/($match_username)$/);
                     }                       
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.90 loncom/interface/mydesk.tab:1.91
--- loncom/interface/mydesk.tab:1.90	Sun Dec 30 18:22:41 2007
+++ loncom/interface/mydesk.tab	Sun Feb  3 00:07:58 2008
@@ -73,6 +73,7 @@
 6:1:clear
 6:1:author:rau:cstr.gif:con-[_1]:struct[_1]:go('/priv/$uname/');:Enter my resource construction space:set
 6:1:author:rca:cstr.gif:co con-[_1]:struct[_2]:go('/priv/$caname/');:Enter construction space as a co-author:set
+6:1:author:raa:cstr.gif:co con-[_1]:struct[_2]:go('/priv/$caname/');:Enter construction space as an assistant co-author:set
 6:1:pmau:$requested_domain:conf.gif:domain[_1]:config[_1]:go('/adm/domainprefs');:Set domain configuration:dom
 6:2:clear
 6:2:pbre:$requested_domain:res.gif:resource[_1]:space[_1]:go('/res/$udom/?launch=1');:Browse published resources:cnt
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.940 loncom/lonnet/perl/lonnet.pm:1.941
--- loncom/lonnet/perl/lonnet.pm:1.940	Tue Jan 22 18:12:02 2008
+++ loncom/lonnet/perl/lonnet.pm	Sun Feb  3 00:08:05 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.940 2008/01/22 23:12:02 raeburn Exp $
+# $Id: lonnet.pm,v 1.941 2008/02/03 05:08:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3527,7 +3527,7 @@
     }
     foreach my $role (keys(%{$allroles})) {
         my %thesepriv;
-        if (($role=~/^au/) || ($role=~/^ca/)) { $author=1; }
+        if (($role=~/^au/) || ($role=~/^ca/) || ($role=~/^aa/)) { $author=1; }
         foreach my $item (split(/:/,$$allroles{$role})) {
             if ($item ne '') {
                 my ($privilege,$restrictions)=split(/&/,$item);