--- loncom/auth/lonroles.pm 2006/12/20 20:46:18 1.175
+++ loncom/auth/lonroles.pm 2007/09/10 11:44:00 1.178
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.175 2006/12/20 20:46:18 albertel Exp $
+# $Id: lonroles.pm,v 1.178 2007/09/10 11:44:00 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -438,19 +438,11 @@ ENDHEADER
}
# -------------------------------------------------------- Choice or no choice?
if ($nochoose) {
- $r->print("
".&mt('Sorry ...')." \n".
- &mt('This action is currently not authorized.').
+ $r->print("".&mt('Sorry ...')." \n".
+ &mt('This action is currently not authorized.').' '.
&Apache::loncommon::end_page());
return OK;
} else {
- if ($advanced) {
- $r->print(&mt("Your home server is ").
- $Apache::lonnet::hostname{&Apache::lonnet::homeserver
- ($env{'user.name'},$env{'user.domain'})}.
- " \n");
- $r->print(&mt(
- "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'};
}
@@ -461,9 +453,9 @@ ENDHEADER
}
if ($env{'user.adv'}) {
$r->print(
- ''.&mt('Show all roles').': '.&mt('Show all roles').': print(' checked="checked" '); }
- $r->print(' /> ');
+ $r->print(' /> ');
}
my (%roletext,%sortrole,%roleclass);
@@ -546,7 +538,7 @@ ENDHEADER
$switchserver='otherserver='.$home.'&role='.$trolecode;
}
#next if ($home eq 'no_host');
- $home = $Apache::lonnet::hostname{$home};
+ $home = &Apache::lonnet::hostname($home);
$ttype='Construction Space';
$twhere=&mt('User').': '.$trest.' '.&mt('Domain').
': '.$tdom.' '.
@@ -566,7 +558,7 @@ ENDHEADER
$switchserver='otherserver='.$home.'&role='.$trolecode;
}
#next if ($home eq 'no_host');
- $home = $Apache::lonnet::hostname{$home};
+ $home = &Apache::lonnet::hostname($home);
$ttype='Construction Space';
$twhere=&mt('Domain').': '.$tdom.' '.&mt('Server').
': '.$home;
@@ -648,7 +640,7 @@ ENDHEADER
unless (($advanced) || ($nochoose)) {
$r->print("".&mt('Select a Course to Enter')." \n");
}
- $r->print('');
+ $r->print(' ');
@@ -835,7 +827,7 @@ sub role_status {
sub build_roletext {
my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$tfont,$trole,$twhere,$tpstart,$tpend,$nochoose,$button,$switchserver) = @_;
- my $roletext=' ';
+ my $roletext=' ';
if (!$is_dc) {
- $roletext.=''.$tremark.
- ' '."\n";
+ $roletext.=''.$tremark.
+ ' '."\n";
}
return $roletext;
}
@@ -1032,10 +1024,9 @@ sub allcourses_row {
' ';
my $selectlink = &courselink($dcdom,$rowtype);
my $ccrole = &Apache::lonnet::plaintext('cc');
- $output.= ''.$ccrole.' '.
- ' '.$selectlink.' '.
- ' from '.&mt('Domain').' '.$dcdom.' ';
- $output .= ' '."\n";
+ $output.= ''.
+ &mt('[_1]: [_2] from domain [_3]',$ccrole,$selectlink,$dcdom).
+ ' '."\n";
return $output;
}