--- loncom/interface/lonuserutils.pm 2007/12/26 14:38:13 1.36
+++ loncom/interface/lonuserutils.pm 2008/01/05 05:22:42 1.42
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.36 2007/12/26 14:38:13 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.42 2008/01/05 05:22:42 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -76,7 +76,7 @@ sub modifystudent {
}
}
if ($result eq '') {
- $result = 'Unable to find section for this student';
+ $result = &mt('Unable to find section for this student');
} else {
$result =~ s/(ok:)+/ok/g;
}
@@ -333,17 +333,12 @@ sub print_upload_manager_header {
sub javascript_validations {
my ($mode,$krbdefdom,$curr_authtype,$curr_authfield,$domain,
$context,$groupslist)=@_;
-
my %param = (
kerb_def_dom => $krbdefdom,
curr_authtype => $curr_authtype,
);
- if ($mode eq 'createuser') {
- $param{'formname'} = 'cu';
- } elsif ($mode eq 'upload') {
+ if ($mode eq 'upload') {
$param{'formname'} = 'studentform';
- } elsif ($mode eq 'singlestudent') {
- $param{'formname'} = 'cu';
} elsif ($mode eq 'createcourse') {
$param{'formname'} = 'ccrs';
} elsif ($mode eq 'modifycourse') {
@@ -367,7 +362,7 @@ sub javascript_validations {
}
} elsif ($context eq 'domain') {
$setsection_call = 'setCourse()';
- $setsections_js = &dc_setcourse_js($param{'formname'},$mode);
+ $setsections_js = &dc_setcourse_js($param{'formname'},$mode,$context);
}
$finish = " var checkSec = $setsection_call\n".
" if (checkSec == 'ok') {\n".
@@ -389,8 +384,7 @@ sub javascript_validations {
role => 'The optional role field was not specified.',
continue => 'Continue adding users?',
);
-
- my $function_name =(<
';
}
if ($actionselect) {
- $output .= <<"END";
-$lt{'ac'}: $actionselect
-
+
END
my @allroles;
if ($env{'form.showrole'} eq 'Any') {
@@ -2588,7 +2626,7 @@ sub select_actions {
}
}
if ($options) {
- $output = ''."\n".
+ $output = ''."\n".
''."\n".$options."\n".'';
if ($choices{'dates'}) {
@@ -2625,13 +2663,29 @@ sub date_section_javascript {
} else {
$title = &mt('Date selector');
}
+ my %nopopup = &Apache::lonlocal::texthash (
+ revoke => "Check the boxes for any users for whom roles are to be revoked, and click 'Proceed'",
+ delete => "Check the boxes for any users for whom roles are to be deleted, and click 'Proceed'",
+ none => "Choose an action to take for selected users",
+ );
my $output = '