--- loncom/auth/lonroles.pm 2005/06/06 22:39:59 1.122 +++ loncom/auth/lonroles.pm 2005/08/09 20:06:40 1.128 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.122 2005/06/06 22:39:59 raeburn Exp $ +# $Id: lonroles.pm,v 1.128 2005/08/09 20:06:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -50,7 +50,8 @@ sub redirect_user { my $swinfo=&Apache::lonmenu::rawconfig(); my $navwindow; if ($launch_nav eq 'on') { - $navwindow.=&Apache::lonnavmaps::launch_win('now'); + $navwindow.=&Apache::lonnavmaps::launch_win('now',undef,undef, + ($url eq '/adm/whatsnew')); } else { $navwindow.=&Apache::lonnavmaps::close(); } @@ -227,7 +228,7 @@ ENDENTERKEY my $tadv=0; my $msg=&mt('Entering course ...'); - if (($cnum) && ($role ne 'ca')) { + if (($cnum) && ($role ne 'ca') && ($role ne 'aa')) { my ($furl,$ferr)= &Apache::lonuserstate::readmap($cdom.'/'.$cnum); if (($env{'form.orgurl'}) && @@ -260,24 +261,24 @@ ENDENTERKEY if ($role eq 'cc' && $env{'course.' . $courseid . '.course.helper.not.run'}) { $furl = "/adm/helper/course.initialization.helper"; + # Send the user to the course they selected + } elsif (($env{'request.course.fn'}) + && ($role eq 'cc' && ($env{'environment.course_init_display'} ne 'firstres'))) { + $msg = &mt('Entering course ....'); + &redirect_user($r,&mt('New in course'), + '/adm/whatsnew',$msg, + $env{'environment.remotenavmap'}); + return OK; } - # Send the user to the course they selected - if (($env{'request.course.fn'}) && ($role eq 'cc' && ($env{'environment.course_init_display'} ne 'firstres')) { - $msg = &mt('Entering course ....'); - &redirect_user($r,&mt('New in course'), - '/adm/whatsnew',$msg, - $env{'environment.remotenavmap'}); - } else { - &redirect_user($r,&mt('Entering Course'), + &redirect_user($r,&mt('Entering Course'), $furl,$msg, $env{'environment.remotenavmap'}); - } - return OK; + return OK; } } # # Send the user to the construction space they selected - if ($role =~ /^(au|ca)$/) { + if ($role =~ /^(au|ca|aa)$/) { my $redirect_url = '/priv/'; if ($role eq 'au') { $redirect_url.=$env{'user.name'}; @@ -343,7 +344,7 @@ ENDHEADER # --------------------------------------------------------------- Error Header? if ($error) { $r->print("
Access : ". + $r->print("Access : ". Apache::lonnet::plaintext($priv)."\n"); $r->print("Resource: ".&Apache::lonenc::check_encrypt($fn)."\n"); $r->print("Action : $msg\n
"); @@ -387,7 +388,7 @@ ENDHEADER ($env{'user.name'},$env{'user.domain'})}. "
\n"); $r->print(&mt( - "Author and Co-Author roles may not be available on servers other than your home server.")); + "Author and Co-Author roles are not available on servers other than their respective home servers.")); } if (($ENV{'REDIRECT_QUERY_STRING'}) && ($fn)) { $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'}; @@ -460,7 +461,7 @@ ENDHEADER my $trole; if ($role =~ /^cr\//) { my ($rdummy,$rdomain,$rauthor,$rrole)=split(/\//,$role); - $tremark.='
'.&mt('Defined by ').$rauthor. + $tremark.='
'.&mt('Defined by ').$rauthor. &mt(' at ').$rdomain.'.'; $trole=$rrole; } else { @@ -471,7 +472,7 @@ ENDHEADER my ($tdom,$trest,$tsection)= split(/\//,Apache::lonnet::declutter($where)); # First, Co-Authorship roles - if ($role eq 'ca') { + if (($role eq 'ca') || ($role eq 'aa')) { my $home = &Apache::lonnet::homeserver($trest,$tdom); my $allowed=0; my @ids=&Apache::lonnet::current_machine_ids(); @@ -619,8 +620,8 @@ ENDHEADER } } if ($output) { - $r->print("". - &mt('Recent Roles')." "); + $r->print(""); $doheaders ++; @@ -645,8 +646,8 @@ ENDHEADER } if ($output) { if ($doheaders > 0) { - $r->print(" ". + &mt('Recent Roles')." "); $r->print($output); $r->print("". - " "); + $r->print("".&mt($type)." ". + " "); } $r->print($output); } @@ -678,7 +679,7 @@ ENDHEADER } # ------------------------------------------------------------ Privileges Info if (($advanced) && (($env{'user.error.msg'}) || ($error))) { - $r->print('".&mt($type)." Current Privileges
'); + $r->print('Current Privileges
'); foreach $envkey (sort keys %env) { if ($envkey=~/^user\.priv\.$env{'request.role'}\./) { @@ -954,7 +955,7 @@ sub allcourses_row { my $dcdom = shift; my $ccrole = Apache::lonnet::plaintext('cc'); my $selectlink = &courselink($dcdom); - my $output = ''. + my $output = ' '. ' '.