version 1.160.6.88, 2018/09/14 22:43:14
|
version 1.160.6.89, 2018/09/15 15:15:32
|
Line 4631 sub loadbalancing_titles {
|
Line 4631 sub loadbalancing_titles {
|
'_LC_ipchange' => &mt('Non-SSO users with IP mismatch'), |
'_LC_ipchange' => &mt('Non-SSO users with IP mismatch'), |
); |
); |
my @alltypes = ('_LC_adv','_LC_author','_LC_internetdom','_LC_external','_LC_ipchangesso','_LC_ipchange'); |
my @alltypes = ('_LC_adv','_LC_author','_LC_internetdom','_LC_external','_LC_ipchangesso','_LC_ipchange'); |
|
my @available; |
if (ref($types) eq 'ARRAY') { |
if (ref($types) eq 'ARRAY') { |
unshift(@alltypes,@{$types},'default'); |
@available = @{$types}; |
} |
} |
|
unless (grep(/^default$/,@available)) { |
|
push(@available,'default'); |
|
} |
|
unshift(@alltypes,@available); |
my %titles; |
my %titles; |
foreach my $type (@alltypes) { |
foreach my $type (@alltypes) { |
if ($type =~ /^_LC_/) { |
if ($type =~ /^_LC_/) { |
Line 5009 sub print_selfcreation {
|
Line 5014 sub print_selfcreation {
|
my %radiohash; |
my %radiohash; |
my $numinrow = 4; |
my $numinrow = 4; |
map { $radiohash{'cancreate_'.$_} = 1; } @selfcreate; |
map { $radiohash{'cancreate_'.$_} = 1; } @selfcreate; |
|
my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); |
if ($position eq 'top') { |
if ($position eq 'top') { |
my %choices = &Apache::lonlocal::texthash ( |
my %choices = &Apache::lonlocal::texthash ( |
cancreate_login => 'Institutional Login', |
cancreate_login => 'Institutional Login', |
Line 5023 sub print_selfcreation {
|
Line 5029 sub print_selfcreation {
|
($datatable,$itemcount) = &radiobutton_prefs(\%radiohash,\@toggles,\%defaultchecked, |
($datatable,$itemcount) = &radiobutton_prefs(\%radiohash,\@toggles,\%defaultchecked, |
\%choices,$itemcount,$onclick); |
\%choices,$itemcount,$onclick); |
$$rowtotal += $itemcount; |
$$rowtotal += $itemcount; |
|
|
my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); |
|
|
|
if (ref($usertypes) eq 'HASH') { |
if (ref($usertypes) eq 'HASH') { |
if (keys(%{$usertypes}) > 0) { |
if (keys(%{$usertypes}) > 0) { |
$datatable .= &insttypes_row($createsettings,$types,$usertypes, |
$datatable .= &insttypes_row($createsettings,$types,$usertypes, |
$dom,$numinrow,$othertitle, |
$dom,$numinrow,$othertitle, |
'statustocreate',$$rowtotal); |
'statustocreate',$rowtotal); |
$$rowtotal ++; |
$$rowtotal ++; |
} |
} |
} |
} |
Line 5075 sub print_selfcreation {
|
Line 5079 sub print_selfcreation {
|
$$rowtotal ++; |
$$rowtotal ++; |
} elsif ($position eq 'middle') { |
} elsif ($position eq 'middle') { |
my %domconf = &Apache::lonnet::get_dom('configuration',['usermodification'],$dom); |
my %domconf = &Apache::lonnet::get_dom('configuration',['usermodification'],$dom); |
my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); |
my @posstypes; |
$usertypes->{'default'} = $othertitle; |
|
if (ref($types) eq 'ARRAY') { |
if (ref($types) eq 'ARRAY') { |
push(@{$types},'default'); |
@posstypes = @{$types}; |
$usertypes->{'default'} = $othertitle; |
} |
foreach my $status (@{$types}) { |
unless (grep(/^default$/,@posstypes)) { |
$datatable .= &modifiable_userdata_row('selfcreate',$status,$domconf{'usermodification'}, |
push(@posstypes,'default'); |
$numinrow,$$rowtotal,$usertypes); |
} |
$$rowtotal ++; |
my %usertypeshash; |
} |
if (ref($usertypes) eq 'HASH') { |
|
%usertypeshash = %{$usertypes}; |
|
} |
|
$usertypeshash{'default'} = $othertitle; |
|
foreach my $status (@posstypes) { |
|
$datatable .= &modifiable_userdata_row('selfcreate',$status,$domconf{'usermodification'}, |
|
$numinrow,$$rowtotal,\%usertypeshash); |
|
$$rowtotal ++; |
} |
} |
} else { |
} else { |
my %choices = &Apache::lonlocal::texthash ( |
my %choices = &Apache::lonlocal::texthash ( |
Line 5102 sub print_selfcreation {
|
Line 5112 sub print_selfcreation {
|
my $onclick = "toggleDisplay(this.form,'emailoptions');"; |
my $onclick = "toggleDisplay(this.form,'emailoptions');"; |
my $additional = '<div id="emailoptions" style="display: '.$display.'">'; |
my $additional = '<div id="emailoptions" style="display: '.$display.'">'; |
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); |
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); |
my $usertypes = {}; |
my (@ordered,%usertypeshash); |
my $order = []; |
if (ref($domdefaults{'inststatusguest'}) eq 'ARRAY') { |
if ((ref($domdefaults{'inststatustypes'}) eq 'HASH') && (ref($domdefaults{'inststatusguest'}) eq 'ARRAY')) { |
@ordered = @{$domdefaults{'inststatusguest'}}; |
$usertypes = $domdefaults{'inststatustypes'}; |
} |
$order = $domdefaults{'inststatusguest'}; |
if (@ordered) { |
} |
unless (grep(/^default$/,@ordered)) { |
if (ref($order) eq 'ARRAY') { |
push(@ordered,'default'); |
push(@{$order},'default'); |
} |
if (@{$order} > 1) { |
if (ref($usertypes) eq 'HASH') { |
$usertypes->{'default'} = &mt('Other users'); |
%usertypeshash = %{$usertypes}; |
$additional .= '<table><tr>'; |
} |
foreach my $status (@{$order}) { |
$usertypeshash{'default'} = $othertitle; |
$additional .= '<th>'.$usertypes->{$status}.'</th>'; |
$additional .= '<table><tr>'; |
} |
foreach my $status (@ordered) { |
$additional .= '</tr><tr>'; |
$additional .= '<th>'.$usertypeshash{$status}.'</th>'; |
foreach my $status (@{$order}) { |
} |
$additional .= '<td>'.&email_as_username($rowtotal,$processing,$status).'</td>'; |
$additional .= '</tr><tr>'; |
} |
foreach my $status (@ordered) { |
$additional .= '</tr></table>'; |
$additional .= '<td>'.&email_as_username($rowtotal,$processing,$status).'</td>'; |
} else { |
|
$usertypes->{'default'} = &mt('All users'); |
|
$additional .= &email_as_username($rowtotal,$processing); |
|
} |
} |
|
$additional .= '</tr></table>'; |
|
} else { |
|
$usertypeshash{'default'} = $othertitle; |
|
$additional .= &email_as_username($rowtotal,$processing); |
} |
} |
$additional .= '</div>'."\n"; |
$additional .= '</div>'."\n"; |
|
|
Line 5135 sub print_selfcreation {
|
Line 5146 sub print_selfcreation {
|
$$rowtotal ++; |
$$rowtotal ++; |
my ($infofields,$infotitles) = &Apache::loncommon::emailusername_info(); |
my ($infofields,$infotitles) = &Apache::loncommon::emailusername_info(); |
$numinrow = 1; |
$numinrow = 1; |
if (ref($order) eq 'ARRAY') { |
foreach my $status (@ordered) { |
foreach my $status (@{$order}) { |
$datatable .= &modifiable_userdata_row('cancreate','emailusername_'.$status,$settings, |
$datatable .= &modifiable_userdata_row('cancreate','emailusername_'.$status,$settings, |
$numinrow,$$rowtotal,\%usertypeshash,$infofields,$infotitles); |
$numinrow,$$rowtotal,$usertypes,$infofields,$infotitles); |
$$rowtotal ++; |
$$rowtotal ++; |
|
} |
|
} |
} |
my ($emailrules,$emailruleorder) = |
my ($emailrules,$emailruleorder) = |
&Apache::lonnet::inst_userrules($dom,'email'); |
&Apache::lonnet::inst_userrules($dom,'email'); |