version 1.73, 2008/10/15 14:12:41
|
version 1.75, 2008/12/06 20:32:37
|
Line 403 sub javascript_validations {
|
Line 403 sub javascript_validations {
|
name => 'The optional name field was not specified.', |
name => 'The optional name field was not specified.', |
snum => 'The optional ID number field was not specified.', |
snum => 'The optional ID number field was not specified.', |
section => 'The optional section field was not specified.', |
section => 'The optional section field was not specified.', |
email => 'The optional email address field was not specified.', |
email => 'The optional e-mail address field was not specified.', |
role => 'The optional role field was not specified.', |
role => 'The optional role field was not specified.', |
domain => 'The optional domain field was not specified.', |
domain => 'The optional domain field was not specified.', |
continue => 'Continue adding users?', |
continue => 'Continue adding users?', |
Line 3636 sub upfile_drop_add {
|
Line 3636 sub upfile_drop_add {
|
if ($entries{$fields{'username'}} |
if ($entries{$fields{'username'}} |
ne &LONCAPA::clean_username($entries{$fields{'username'}})) { |
ne &LONCAPA::clean_username($entries{$fields{'username'}})) { |
$r->print('<br />'. |
$r->print('<br />'. |
&mt('<b>[_1]</b>: Unacceptable username for user [_2] [_3] [_4] [_5]', |
&mt('[_1]: Unacceptable username for user [_2] [_3] [_4] [_5]', |
$entries{$fields{'username'}},$fname,$mname,$lname,$gen). |
'<b>'.$entries{$fields{'username'}}.'</b>',$fname,$mname,$lname,$gen). |
'</b>'); |
'</b>'); |
next; |
next; |
} else { |
} else { |
Line 3657 sub upfile_drop_add {
|
Line 3657 sub upfile_drop_add {
|
$entries{$fields{'sec'}} =~ s/\W//g; |
$entries{$fields{'sec'}} =~ s/\W//g; |
my $item = $entries{$fields{'sec'}}; |
my $item = $entries{$fields{'sec'}}; |
if ($item eq "none" || $item eq 'all') { |
if ($item eq "none" || $item eq 'all') { |
$r->print('<br />'.&mt('<b>[_1]</b>: Unable to enroll user [_2] [_3] [_4] [_5] in a section named "[_6]" - this is a reserved word.',$username,$fname,$mname,$lname,$gen,$item)); |
$r->print('<br />'.&mt('[_1]: Unable to enroll user [_2] [_3] [_4] [_5] in a section named "[_6]" - this is a reserved word.','<b>'.$username.'</b>',$fname,$mname,$lname,$gen,$item)); |
next; |
next; |
} elsif (exists($curr_groups{$item})) { |
} elsif (exists($curr_groups{$item})) { |
$r->print('<br />'.&mt('<b>[_1]</b>: Unable to enroll user [_2] [_3] [_4] [_5] in a section named "[_6]" - this is a course group.',$username,$fname,$mname,$lname,$gen,$item).' '.&mt('Section names and group names must be distinct.')); |
$r->print('<br />'.&mt('[_1]: Unable to enroll user [_2] [_3] [_4] [_5] in a section named "[_6]" - this is a course group.','<b>'.$username.'</b>',$fname,$mname,$lname,$gen,$item).' '.&mt('Section names and group names must be distinct.')); |
next; |
next; |
} else { |
} else { |
push(@secs,$item); |
push(@secs,$item); |
Line 3672 sub upfile_drop_add {
|
Line 3672 sub upfile_drop_add {
|
if (ref($userlist{$username.':'.$userdomain}) eq 'ARRAY') { |
if (ref($userlist{$username.':'.$userdomain}) eq 'ARRAY') { |
my $currsec = $userlist{$username.':'.$userdomain}[$secidx]; |
my $currsec = $userlist{$username.':'.$userdomain}[$secidx]; |
if ($currsec ne $env{'request.course.sec'}) { |
if ($currsec ne $env{'request.course.sec'}) { |
$r->print('<br />'.&mt('<b>[_1]</b>: Unable to enroll user [_2] [_3] [_4] [_5] in a section named "[_6]".',$username,$fname,$mname,$lname,$gen,$secs[0]).'<br />'); |
$r->print('<br />'.&mt('[_1]: Unable to enroll user [_2] [_3] [_4] [_5] in a section named "[_6]".','<b>'.$username.'</b>',$fname,$mname,$lname,$gen,$secs[0]).'<br />'); |
if ($currsec eq '') { |
if ($currsec eq '') { |
$r->print(&mt('This user already has an active/future student role in the course, unaffiliated to any section.')); |
$r->print(&mt('This user already has an active/future student role in the course, unaffiliated to any section.')); |
|
|
Line 3722 sub upfile_drop_add {
|
Line 3722 sub upfile_drop_add {
|
} |
} |
if ($role eq '') { |
if ($role eq '') { |
my $rolestr = join(', ',@permitted_roles); |
my $rolestr = join(', ',@permitted_roles); |
$r->print('<br />'. |
$r->print('<br />' |
&mt('<b>[_1]</b>: You do not have permission to add the requested role [_2] for the user.',$entries{$fields{'username'}},$entries{$fields{'role'}}).'<br />'.&mt('Allowable role(s) is/are: [_1].',$rolestr)."\n"); |
.&mt('[_1]: You do not have permission to add the requested role [_2] for the user.' |
|
,'<b>'.$entries{$fields{'username'}}.'</b>' |
|
,$entries{$fields{'role'}}) |
|
.'<br />' |
|
.&mt('Allowable role(s) is/are: [_1].',$rolestr)."\n" |
|
); |
next; |
next; |
} |
} |
} |
} |
Line 3883 sub upfile_drop_add {
|
Line 3888 sub upfile_drop_add {
|
} else { |
} else { |
if ($context eq 'course') { |
if ($context eq 'course') { |
$r->print('<br />'. |
$r->print('<br />'. |
&mt('<b>[_1]</b>: Unable to enroll. No password specified.',$username) |
&mt('[_1]: Unable to enroll. No password specified.','<b>'.$username.'</b>') |
); |
); |
} elsif ($context eq 'author') { |
} elsif ($context eq 'author') { |
$r->print('<br />'. |
$r->print('<br />'. |
&mt('<b>[_1]</b>: Unable to add co-author. No password specified.',$username) |
&mt('[_1]: Unable to add co-author. No password specified.','<b>'.$username.'</b>') |
); |
); |
} else { |
} else { |
$r->print('<br />'. |
$r->print('<br />'. |
&mt('<b>[_1]</b>: Unable to add user. No password specified.',$username) |
&mt('[_1]: Unable to add user. No password specified.','<b>'.$username.'</b>') |
); |
); |
} |
} |
} |
} |
Line 3994 sub user_change_result {
|
Line 3999 sub user_change_result {
|
if ($userresult =~ /^error:(.+)$/) { |
if ($userresult =~ /^error:(.+)$/) { |
my $error = $1; |
my $error = $1; |
$r->print('<br />'. |
$r->print('<br />'. |
&mt('<b>[_1]</b>: Unable to add/modify: [_2]',$username.':'.$userdomain,$error)); |
&mt('[_1]: Unable to add/modify: [_2]','<b>'.$username.':'.$userdomain.'</b>',$error)); |
} |
} |
} else { |
} else { |
$counts->{'user'} ++; |
$counts->{'user'} ++; |
Line 4004 sub user_change_result {
|
Line 4009 sub user_change_result {
|
if ($authresult =~ /^error:(.+)$/) { |
if ($authresult =~ /^error:(.+)$/) { |
my $error = $1; |
my $error = $1; |
$r->print('<br />'. |
$r->print('<br />'. |
&mt('<b>[_1]</b>: Unable to modify authentication: [_2]',$username.':'.$userdomain,$error)); |
&mt('[_1]: Unable to modify authentication: [_2]','<b>'.$username.':'.$userdomain.'</b>',$error)); |
} |
} |
} else { |
} else { |
$counts->{'auth'} ++; |
$counts->{'auth'} ++; |
Line 4014 sub user_change_result {
|
Line 4019 sub user_change_result {
|
if ($roleresult =~ /^error:(.+)$/) { |
if ($roleresult =~ /^error:(.+)$/) { |
my $error = $1; |
my $error = $1; |
$r->print('<br />'. |
$r->print('<br />'. |
&mt('<b>[_1]</b>: Unable to add role: [_2]',$username.':'.$userdomain,$error)); |
&mt('[_1]: Unable to add role: [_2]','<b>'.$username.':'.$userdomain.'</b>',$error)); |
} |
} |
} else { |
} else { |
$counts->{'role'} ++; |
$counts->{'role'} ++; |
Line 4284 sub update_user_list {
|
Line 4289 sub update_user_list {
|
$r->print('<p><b>'.&mt("$result_text{'ok'}{$choice} role(s) for [quant,_1,user,users,no users].",$count).'</b></p>'); |
$r->print('<p><b>'.&mt("$result_text{'ok'}{$choice} role(s) for [quant,_1,user,users,no users].",$count).'</b></p>'); |
if ($count > 0) { |
if ($count > 0) { |
if ($choice eq 'revoke' || $choice eq 'drop') { |
if ($choice eq 'revoke' || $choice eq 'drop') { |
$r->print('<p>'.&mt('Re-enabling will re-activate data for the role.</p>')); |
$r->print('<p>'.&mt('Re-enabling will re-activate data for the role.').'</p>'); |
} |
} |
# Flush the course logs so reverse user roles immediately updated |
# Flush the course logs so reverse user roles immediately updated |
&Apache::lonnet::flushcourselogs(); |
&Apache::lonnet::flushcourselogs(); |