$lt{'rev'} $lt{'del'} $lt{'rol'} $lt{'ext'} $lt{'sta'} $lt{'end'}
END
- foreach my $area (sort keys(%rolesdump)) {
+ foreach my $area (sort { my $a1=join('_',(split('_',$a))[1,0]);
+ my $b1=join('_',(split('_',$b))[1,0]);
+ return $a1 cmp $b1;
+ } keys(%rolesdump)) {
next if ($area =~ /^rolesdef/);
my $role = $rolesdump{$area};
my $thisrole=$area;
@@ -330,11 +374,11 @@ END
&Apache::lonnet::coursedescription($1.'_'.$2);
my $carea;
if (defined($coursedata{'description'})) {
- $carea='Course: '.$coursedata{'description'}.
- ' Domain: '.$coursedom.(' 'x8).
+ $carea=&mt('Course').': '.$coursedata{'description'}.
+ ' '.&mt('Domain').': '.$coursedom.(' 'x8).
&Apache::loncommon::syllabuswrapper('Syllabus',$coursedir,$coursedom);
} else {
- $carea='Unavailable course: '.$area;
+ $carea=&mt('Unavailable course').': '.$area;
}
$inccourses{$1.'_'.$2}=1;
if ((&Apache::lonnet::allowed('c'.$role_code,$1.'/'.$2)) ||
@@ -396,7 +440,7 @@ END
if ($active) {
$row.=' ';
} else {
- $row.='expired or revoked';
+ $row.=&mt('expired or revoked');
}
}
$row.='';
@@ -439,15 +483,20 @@ END
$currentauth=~/^localauth:/
) { # bad authentication scheme
if (&Apache::lonnet::allowed('mau',$ENV{'request.role.domain'})) {
+ my %lt=&Apache::lonlocal::texthash(
+ 'err' => "ERROR",
+ 'uuas' => "This user has an unrecognized authentication scheme",
+ 'sldb' => "Please specify login data below",
+ 'ld' => "Login Data"
+ );
$r->print(<
-ERROR:
-This user has an unrecognized authentication scheme ($currentauth).
-Please specify login data below.
-Login Data
+$lt{'err'}:
+$lt{'uuas'} ($currentauth). $lt{'sldb'}.
+$lt{'ld'}
$generalrule
$authformkrb
$authformint
@@ -457,14 +506,18 @@ ENDBADAUTH
} else {
# This user is not allowed to modify the users
# authentication scheme, so just notify them of the problem
+ my %lt=&Apache::lonlocal::texthash(
+ 'err' => "ERROR",
+ 'uuas' => "This user has an unrecognized authentication scheme",
+ 'adcs' => "Please alert a domain coordinator of this situation"
+ );
$r->print(<
- ERROR:
-This user has an unrecognized authentication scheme ($currentauth).
-Please alert a domain coordinator of this situation.
+ $lt{'err'}:
+$lt{'uuas'} ($currentauth). $lt{'adcs'}.
ENDBADAUTH
}
@@ -494,22 +547,26 @@ ENDBADAUTH
$authformcurrent.=' (will override current values) ';
if (&Apache::lonnet::allowed('mau',$ENV{'request.role.domain'})) {
# Current user has login modification privileges
+ my %lt=&Apache::lonlocal::texthash(
+ 'ccld' => "Change Current Login Data",
+ 'enld' => "Enter New Login Data"
+ );
$r->print(<
-Change Current Login Data
+$lt{'ccld'}
$generalrule
$authformnop
$authformcurrent
-Enter New Login Data
+$lt{'enld'}
$authform_other
ENDOTHERAUTHS
}
} ## End of "check for bad authentication type" logic
} ## End of new user/old user logic
- $r->print('Add Roles ');
+ $r->print(''.&mt('Add Roles').' ');
#
# Co-Author
#
@@ -518,20 +575,31 @@ ENDOTHERAUTHS
# No sense in assigning co-author role to yourself
my $cuname=$ENV{'user.name'};
my $cudom=$ENV{'request.role.domain'};
+ my %lt=&Apache::lonlocal::texthash(
+ 'cs' => "Construction Space",
+ 'act' => "Activate",
+ 'rol' => "Role",
+ 'ext' => "Extent",
+ 'sta' => "Start",
+ 'end' => "End".
+ 'cau' => "Co-Author",
+ 'ssd' => "Set Start Date",
+ 'sed' => "Set End Date"
+ );
$r->print(<Construction Space
-Activate Role Extent
-Start End
+$lt{'cs'}
+$lt{'act'} $lt{'rol'} $lt{'ext'}
+$lt{'sta'} $lt{'end'}
-Co-Author
+$lt{'cau'}
$cudom\_$cuname
Set Start Date
+"javascript:pjump('date_start','Start Date Co-Author',document.cu.start_$cudom\_$cuname\_ca.value,'start_$cudom\_$cuname\_ca','cu.pres','dateset')">$lt{'ssd'}
Set End Date
+"javascript:pjump('date_end','End Date Co-Author',document.cu.end_$cudom\_$cuname\_ca.value,'end_$cudom\_$cuname\_ca','cu.pres','dateset')">$lt{'sed'}
ENDCOAUTH
@@ -539,14 +607,18 @@ ENDCOAUTH
#
# Domain level
#
- $r->print('Domain Level '.
- 'Activate Role Extent '.
- 'Start End ');
+ $r->print(''.&mt('Domain Level').' '.
+ ''.&mt('Activate').' '.&mt('Role').' '.&mt('Extent').' '.
+ ''.&mt('Start').' '.&mt('End').' ');
foreach ( sort( keys(%incdomains))) {
my $thisdomain=$_;
- foreach ('dc','li','dg','au') {
+ foreach ('dc','li','dg','au','sc') {
if (&Apache::lonnet::allowed('c'.$_,$thisdomain)) {
my $plrole=&Apache::lonnet::plaintext($_);
+ my %lt=&Apache::lonlocal::texthash(
+ 'ssd' => "Set Start Date",
+ 'sed' => "Set End Date"
+ );
$r->print(<
@@ -554,10 +626,10 @@ ENDCOAUTH
$thisdomain
Set Start Date
+"javascript:pjump('date_start','Start Date $plrole',document.cu.start_$thisdomain\_$_.value,'start_$thisdomain\_$_','cu.pres','dateset')">$lt{'ssd'}
Set End Date
+"javascript:pjump('date_end','End Date $plrole',document.cu.end_$thisdomain\_$_.value,'end_$thisdomain\_$_','cu.pres','dateset')">$lt{'sed'}
ENDDROW
}
@@ -568,7 +640,7 @@ ENDDROW
# Course level
#
$r->print(&course_level_table(%inccourses));
- $r->print(" \n");
+ $r->print(" \n");
$r->print("