--- loncom/auth/lonroles.pm 2005/06/05 07:10:32 1.120
+++ loncom/auth/lonroles.pm 2005/06/19 00:41:32 1.125
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.120 2005/06/05 07:10:32 albertel Exp $
+# $Id: lonroles.pm,v 1.125 2005/06/19 00:41:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -227,7 +227,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,17 +260,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
- &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'};
@@ -464,7 +471,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();
@@ -511,9 +518,6 @@ ENDHEADER
$sortkey=$role;
} elsif ($trest) {
$ttype='Course';
- if ($tsection) {
- $ttype.='
'.&mt('Section/Group').': '.$tsection;
- }
my $tcourseid=$tdom.'_'.$trest;
if ($env{'course.'.$tcourseid.'.description'}) {
$twhere=$env{'course.'.$tcourseid.'.description'};
@@ -538,6 +542,10 @@ ENDHEADER
$sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey;
}
}
+ if ($tsection) {
+ $twhere.='
'.&mt('Section/Group').': '.$tsection;
+ }
+
if ($role ne 'st') { $twhere.="
".&mt('Domain').":".$tdom; }
} elsif ($tdom) {
$ttype='Domain';
@@ -583,7 +591,7 @@ ENDHEADER
}
$r->print('
'); } - $r->print(' | '.&mt('User Role').' | '.&mt('Extent'). + $r->print(' | '.&mt('User Role').' | '.&mt('Extent'). ' | '.&mt('Start').' | '.&mt('End').' | '. &mt('Remarks and Calendar Announcements').' | |
---|---|---|---|---|---|---|---|---|
". + $r->print(" | ||||||||
". &mt('Recent Roles')." | "); $r->print($output); $r->print("||||||||
".&mt($type)." | ".&mt($type)." | "); } $r->print($output); } @@ -660,7 +668,7 @@ ENDHEADER $r->print(''); } } - $r->print(' | '.&mt('No role specified'). + $r->print(' | '.&mt('No role specified'). ' | '.$tremark. ' | '."\n"); @@ -789,8 +797,7 @@ sub build_roletext { $roletext.=''.$trole. - ' | '.$ttype. - ' | '.$twhere. + ' | '.$twhere. ' | '.$tpstart. ' | '.$tpend. ' | '.$tremark. @@ -953,11 +960,11 @@ sub allcourses_row { 'onClick="verifyCoursePick(this)">'. ' | '. ''. - $ccrole.' | '.&mt('Course').' | '. + $ccrole.''. ''.&mt('All courses').': '.
$selectlink.''.
' '.&mt('Domain').':'.$dcdom.''. - ' | '. + ' | '. &mt('Course Coordinator access to all courses in domain'). ': '.$dcdom.' | '."\n"; return $output;