version 1.153, 2013/07/15 14:55:14
|
version 1.157, 2013/12/06 12:11:09
|
Line 642 sub upload_manager_javascript_forward_as
|
Line 642 sub upload_manager_javascript_forward_as
|
$numbuttons ++; |
$numbuttons ++; |
} |
} |
if (!$can_assign->{'int'}) { |
if (!$can_assign->{'int'}) { |
my $warning = &mt('You may not specify an initial password for each user, as this is only available when new users use LON-CAPA internal authentication.').'\n' |
my $warning = &mt('You may not specify an initial password for each user, as this is only available when new users use LON-CAPA internal authentication.').'\n'. |
&mt('Your current role does not have rights to create users with that authentication type.'); |
&mt('Your current role does not have rights to create users with that authentication type.'); |
$auth_update = <<"END"; |
$auth_update = <<"END"; |
// Currently the initial password field is only supported for internal auth |
// Currently the initial password field is only supported for internal auth |
Line 1988 sub get_cols_array {
|
Line 1988 sub get_cols_array {
|
} |
} |
if (($context eq 'course') && ($mode ne 'autoenroll') && |
if (($context eq 'course') && ($mode ne 'autoenroll') && |
($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'})) { |
($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'})) { |
push(@cols,'photos'); |
push(@cols,'photo'); |
} |
} |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
push (@cols,'extent'); |
push (@cols,'extent'); |
Line 2119 sub get_column_names {
|
Line 2119 sub get_column_names {
|
if ($context eq 'domain' && $env{'form.roletype'} eq 'course') { |
if ($context eq 'domain' && $env{'form.roletype'} eq 'course') { |
$lt{'extent'} = &mt('course(s): description, section(s), status'); |
$lt{'extent'} = &mt('course(s): description, section(s), status'); |
} elsif ($context eq 'domain' && $env{'form.roletype'} eq 'community') { |
} elsif ($context eq 'domain' && $env{'form.roletype'} eq 'community') { |
$lt{'extent'} = &mt('communities: description, section(s), status'); |
$lt{'extent'} = &mt('community(s): description, section(s), status'); |
} elsif (($context eq 'author') || |
} elsif (($context eq 'author') || |
($context eq 'domain' && $env{'form.roletype'} eq 'author')) { |
($context eq 'domain' && $env{'form.roletype'} eq 'author')) { |
$lt{'extent'} = &mt('author'); |
$lt{'extent'} = &mt('author'); |
Line 2468 sub show_users_list {
|
Line 2468 sub show_users_list {
|
if ($mode eq 'pickauthor') { |
if ($mode eq 'pickauthor') { |
@sortable = ('username','fullname','email','status'); |
@sortable = ('username','fullname','email','status'); |
} |
} |
if (!grep(/^\Q$sortby\E$/,@sortable)) { |
my %is_sortable; |
|
map { $is_sortable{$_} => 1; } @sortable; |
|
unless ($is_sortable{$sortby}) { |
$sortby = 'username'; |
$sortby = 'username'; |
} |
} |
my $setting = $env{'form.roletype'}; |
my $setting = $env{'form.roletype'}; |
Line 2712 END
|
Line 2714 END
|
} |
} |
} |
} |
foreach my $item (@cols) { |
foreach my $item (@cols) { |
$output .= "<th><a href=\"javascript:document.$formname.sortby.value='$item';document.$formname.submit();\">$lt{$item}</a></th>\n"; |
$output .= "<th>"; |
|
if ($is_sortable{$item}) { |
|
$output .= "<a href=\"javascript:document.$formname.sortby.value='$item';document.$formname.submit();\">$lt{$item}</a>"; |
|
} else { |
|
$output .= $lt{$item}; |
|
} |
|
$output .= "</th>\n"; |
} |
} |
my %role_types = &role_type_names(); |
my %role_types = &role_type_names(); |
$output .= &Apache::loncommon::end_data_table_header_row(); |
$output .= &Apache::loncommon::end_data_table_header_row(); |
Line 4263 sub upfile_drop_add {
|
Line 4271 sub upfile_drop_add {
|
if ($entries{$fields{'username'}} =~ /\s/) { |
if ($entries{$fields{'username'}} =~ /\s/) { |
$nowhitespace = ' - '.&mt('usernames may not contain spaces.'); |
$nowhitespace = ' - '.&mt('usernames may not contain spaces.'); |
} |
} |
$r->print('<br />'. |
$r->print( |
&mt('[_1]: Unacceptable username for user [_2] [_3] [_4] [_5]', |
'<br />'. |
'<b>'.$entries{$fields{'username'}}.'</b>',$fname,$mname,$lname,$gen). |
&mt('Unacceptable username [_1] for user [_2] [_3] [_4] [_5]', |
$nowhitespace); |
'"<b>'.$entries{$fields{'username'}}.'</b>"', |
|
$fname,$mname,$lname,$gen). |
|
$nowhitespace); |
next; |
next; |
} else { |
} else { |
$entries{$fields{'domain'}} =~ s/^\s+|\s+$//g; |
$entries{$fields{'domain'}} =~ s/^\s+|\s+$//g; |
if ($entries{$fields{'domain'}} |
if ($entries{$fields{'domain'}} |
ne &LONCAPA::clean_domain($entries{$fields{'domain'}})) { |
ne &LONCAPA::clean_domain($entries{$fields{'domain'}})) { |
$r->print('<br />'. '<b>'.$entries{$fields{'domain'}}. |
$r->print( |
'</b>: '.&mt('Unacceptable domain for user [_1] [_2] [_3] [_4]',$fname,$mname,$lname,$gen)); |
'<br />'. |
next; |
&mt('Unacceptable domain [_1] for user [_2] [_3] [_4] [_5]', |
|
'"<b>'.$entries{$fields{'domain'}}.'</b>"', |
|
$fname,$mname,$lname,$gen)); |
|
next; |
} |
} |
my $username = $entries{$fields{'username'}}; |
my $username = $entries{$fields{'username'}}; |
my $userdomain = $entries{$fields{'domain'}}; |
my $userdomain = $entries{$fields{'domain'}}; |