--- loncom/auth/lonroles.pm 2008/05/14 23:52:52 1.191
+++ loncom/auth/lonroles.pm 2008/05/15 01:00:37 1.192
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.191 2008/05/14 23:52:52 raeburn Exp $
+# $Id: lonroles.pm,v 1.192 2008/05/15 01:00:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -719,7 +719,7 @@ ENDHEADER
$r->print('
');
}
$r->print(''.&mt('No role specified').
- ' '.$tremark.
+ ' '.$tremark.
' '."\n");
$r->print('');
@@ -752,8 +752,7 @@ ENDHEADER
$output.=$roletext{'user.role.'.$_};
if ($_ =~ m-dc\./($match_domain)/-
&& $dcroles{$1}) {
- $output .= &allcourses_row($1,'recent').
- &allcoauthors_row($1,'recent');
+ $output .= &adhoc_roles_row($1,'recent');
}
} elsif ($numdc > 0) {
unless ($_ =~/^error\:/) {
@@ -763,9 +762,8 @@ ENDHEADER
}
if ($output) {
$r->print("".
- &mt('Recent Roles')." ");
+ &mt('Recent Roles')." ");
$r->print($output);
- $r->print("");
$doheaders ++;
}
}
@@ -787,13 +785,13 @@ ENDHEADER
unless ($nochoose) {
if ($env{'request.role'} ne 'cm') {
$r->print(' ');
+ &mt('Select').'" name="cm" />');
} else {
$r->print(' ');
}
}
$r->print(''.&mt('No role specified').
- ' '.$tremark.
+ ' '.$tremark.
' '."\n");
$r->print('');
@@ -857,8 +855,7 @@ sub print_rolerows {
if ($sortrole->{$which} =~ m-dc\./($match_domain)/-) {
if (ref($dcroles) eq 'HASH') {
if ($dcroles->{$1}) {
- $output .= &allcourses_row($1,'').
- &allcoauthors_row($1,'');
+ $output .= &adhoc_roles_row($1,'');
}
}
}
@@ -997,17 +994,17 @@ sub build_roletext {
} elsif ($tstatus eq 'is') {
$roletext.=' ';
+ $trolecode."','".$buttonname.'\');" />';
} elsif ($tryagain) {
$roletext.=
' ';
+ $trolecode."','".$buttonname.'\');" />';
} elsif ($advanced) {
$roletext.=
' ';
+ $trolecode."','".$buttonname.'\');" />';
} else {
$roletext.=' ';
}
@@ -1225,28 +1222,23 @@ sub display_cc_role {
return ($roletext);
}
-sub allcourses_row {
+sub adhoc_roles_row {
my ($dcdom,$rowtype) = @_;
my $output = ''.
- ' ';
+ ' '
+ .&mt('[_1]Ad hoc[_2] roles in domain [_3] --',
+ '',' ',$dcdom).' ';
my $selectlink = &courselink($dcdom,$rowtype);
my $ccrole = &Apache::lonnet::plaintext('cc');
- $output.= ''.
- &mt('[_1]: [_2] from domain [_3]',$ccrole,$selectlink,$dcdom).
- ' '."\n";
- return $output;
-}
-
-sub allcoauthors_row {
- my ($dcdom,$rowtype) = @_;
- my $output = ''.
- ' ';
my $carole = &Apache::lonnet::plaintext('ca');
my $inputlink=' ';
my $gobutton=' ';
$output.= ''.
- &mt('[_1]: [_2] in domain [_3] [_4]',$carole,$inputlink,$dcdom,$gobutton).
- ' '."\n";
+ &mt('[_1]: [_2]',$ccrole,$selectlink).
+ ' '.
+ &mt('[_1]: [_2] [_3]',$carole,$inputlink,$gobutton).
+ '
'.
+ ' '."\n";
return $output;
}