version 1.160.6.25, 2013/09/22 01:54:13
|
version 1.160.6.26, 2013/09/29 06:55:58
|
Line 97 i.e., blogs, aboutme page, and portfolio
|
Line 97 i.e., blogs, aboutme page, and portfolio
|
used by course owners to request creation of a course, and to display/store |
used by course owners to request creation of a course, and to display/store |
default quota sizes for authoring spaces. |
default quota sizes for authoring spaces. |
|
|
|
|
Outputs: 1 |
Outputs: 1 |
|
|
$datatable - HTML containing form elements which allow settings to be changed. |
$datatable - HTML containing form elements which allow settings to be changed. |
Line 408 sub handler {
|
Line 407 sub handler {
|
} |
} |
} elsif ($phase eq 'display') { |
} elsif ($phase eq 'display') { |
my $js = &recaptcha_js(). |
my $js = &recaptcha_js(). |
&credits_js(); |
&credits_js(); |
if ((keys(%servers) > 1) || (keys(%existing) > 0)) { |
if ((keys(%servers) > 1) || (keys(%existing) > 0)) { |
my ($othertitle,$usertypes,$types) = |
my ($othertitle,$usertypes,$types) = |
&Apache::loncommon::sorted_inst_types($dom); |
&Apache::loncommon::sorted_inst_types($dom); |
Line 422 sub handler {
|
Line 421 sub handler {
|
} else { |
} else { |
# check if domconfig user exists for the domain. |
# check if domconfig user exists for the domain. |
my $servadm = $r->dir_config('lonAdmEMail'); |
my $servadm = $r->dir_config('lonAdmEMail'); |
my ($configuserok,$author_ok,$switchserver) = |
my ($configuserok,$author_ok,$switchserver) = |
&config_check($dom,$confname,$servadm); |
&config_check($dom,$confname,$servadm); |
unless ($configuserok eq 'ok') { |
unless ($configuserok eq 'ok') { |
&Apache::lonconfigsettings::print_header($r,$phase,$context); |
&Apache::lonconfigsettings::print_header($r,$phase,$context); |
Line 2978 sub print_loadbalancing {
|
Line 2977 sub print_loadbalancing {
|
} |
} |
my ($othertitle,$usertypes,$types) = |
my ($othertitle,$usertypes,$types) = |
&Apache::loncommon::sorted_inst_types($dom); |
&Apache::loncommon::sorted_inst_types($dom); |
my $rownum = 6; |
my $rownum = 8; |
if (ref($types) eq 'ARRAY') { |
if (ref($types) eq 'ARRAY') { |
$rownum += scalar(@{$types}); |
$rownum += scalar(@{$types}); |
} |
} |
Line 3157 sub loadbalancing_rules {
|
Line 3156 sub loadbalancing_rules {
|
if (ref($currrules) eq 'HASH') { |
if (ref($currrules) eq 'HASH') { |
$current = $currrules->{$type}; |
$current = $currrules->{$type}; |
} |
} |
if (($type eq '_LC_external') || ($type eq '_LC_internetdom')) { |
if (($type eq '_LC_external') || ($type eq '_LC_internetdom') || ($type eq '_LC_ipchange')) { |
if ($dom ne &Apache::lonnet::host_domain($lonhost)) { |
if ($dom ne &Apache::lonnet::host_domain($lonhost)) { |
$current = ''; |
$current = ''; |
} |
} |
Line 3178 sub loadbalancing_titles {
|
Line 3177 sub loadbalancing_titles {
|
'_LC_author' => &mt('Users from [_1] with author role',$dom), |
'_LC_author' => &mt('Users from [_1] with author role',$dom), |
'_LC_internetdom' => &mt('Users not from [_1], but from [_2]',$dom,$intdom), |
'_LC_internetdom' => &mt('Users not from [_1], but from [_2]',$dom,$intdom), |
'_LC_external' => &mt('Users not from [_1]',$intdom), |
'_LC_external' => &mt('Users not from [_1]',$intdom), |
|
'_LC_ipchangesso' => &mt('SSO users from [_1], with IP mismatch',$dom), |
|
'_LC_ipchange' => &mt('Non-SSO users with IP mismatch'), |
); |
); |
my @alltypes = ('_LC_adv','_LC_author','_LC_internetdom','_LC_external'); |
my @alltypes = ('_LC_adv','_LC_author','_LC_internetdom','_LC_external','_LC_ipchangesso','_LC_ipchange'); |
if (ref($types) eq 'ARRAY') { |
if (ref($types) eq 'ARRAY') { |
unshift(@alltypes,@{$types},'default'); |
unshift(@alltypes,@{$types},'default'); |
} |
} |
Line 3204 sub loadbalancing_titles {
|
Line 3205 sub loadbalancing_titles {
|
sub loadbalance_rule_row { |
sub loadbalance_rule_row { |
my ($type,$title,$current,$servers,$currbalancer,$lonhost,$dom, |
my ($type,$title,$current,$servers,$currbalancer,$lonhost,$dom, |
$targets_div_style,$homedom_div_style,$css_class,$balnum,$num,$islast) = @_; |
$targets_div_style,$homedom_div_style,$css_class,$balnum,$num,$islast) = @_; |
my @rulenames = ('default','homeserver'); |
my @rulenames; |
my %ruletitles = &offloadtype_text(); |
my %ruletitles = &offloadtype_text(); |
if ($type eq '_LC_external') { |
if (($type eq '_LC_ipchangesso') || ($type eq '_LC_ipchange')) { |
push(@rulenames,'externalbalancer'); |
@rulenames = ('balancer','offloadedto'); |
} else { |
} else { |
push(@rulenames,'specific'); |
@rulenames = ('default','homeserver'); |
|
if ($type eq '_LC_external') { |
|
push(@rulenames,'externalbalancer'); |
|
} else { |
|
push(@rulenames,'specific'); |
|
} |
|
push(@rulenames,'none'); |
} |
} |
push(@rulenames,'none'); |
|
my $style = $targets_div_style; |
my $style = $targets_div_style; |
if (($type eq '_LC_external') || ($type eq '_LC_internetdom')) { |
if (($type eq '_LC_external') || ($type eq '_LC_internetdom') || ($type eq '_LC_ipchange')) { |
$style = $homedom_div_style; |
$style = $homedom_div_style; |
} |
} |
my $space; |
my $space; |
Line 3278 sub offloadtype_text {
|
Line 3284 sub offloadtype_text {
|
'externalbalancer' => "Offloads to Load Balancer in user's domain", |
'externalbalancer' => "Offloads to Load Balancer in user's domain", |
'specific' => 'Offloads to specific server', |
'specific' => 'Offloads to specific server', |
'none' => 'No offload', |
'none' => 'No offload', |
|
'balancer' => 'Session hosted on Load Balancer, after re-authentication', |
|
'offloadedto' => 'Session hosted on offload server, after re-authentication', |
); |
); |
return %ruletitles; |
return %ruletitles; |
} |
} |
Line 3961 sub print_scantronformat {
|
Line 3969 sub print_scantronformat {
|
} |
} |
$datatable .= '<td>'.$errorstr.'</td><td> '; |
$datatable .= '<td>'.$errorstr.'</td><td> '; |
} elsif ($scantronurl) { |
} elsif ($scantronurl) { |
my $link = &Apache::loncommon::modal_link($scantronurl,&mt('Custom bubblesheet format file'),600,500, |
my $link = &Apache::loncommon::modal_link($scantronurl,&mt('Custom bubblesheet format file'),600,500, |
undef,undef,undef,undef,'background-color:#ffffff'); |
undef,undef,undef,undef,'background-color:#ffffff'); |
$datatable .= '<td><span class="LC_nobreak">'. |
$datatable .= '<td><span class="LC_nobreak">'. |
$link. |
$link. |
Line 5520 sub publishlogo {
|
Line 5528 sub publishlogo {
|
if ($fname=~m|/|) { |
if ($fname=~m|/|) { |
($fnamepath,$file) = ($fname =~ m|^(.*)/([^/]+)$|); |
($fnamepath,$file) = ($fname =~ m|^(.*)/([^/]+)$|); |
} |
} |
my @parts=split(/\//,"$filepath/$relpath/$fnamepath"); |
my @parts=split(/\//,"$filepath/$relpath/$fnamepath"); |
my $count; |
my $count; |
for ($count=5;$count<=$#parts;$count++) { |
for ($count=5;$count<=$#parts;$count++) { |
$filepath.="/$parts[$count]"; |
$filepath.="/$parts[$count]"; |
Line 5786 sub modify_quotas {
|
Line 5794 sub modify_quotas {
|
%limithash,$toolregexp,%conditions,$resulttext,%changes); |
%limithash,$toolregexp,%conditions,$resulttext,%changes); |
if ($action eq 'quotas') { |
if ($action eq 'quotas') { |
$context = 'tools'; |
$context = 'tools'; |
} else { |
} else { |
$context = $action; |
$context = $action; |
} |
} |
if ($context eq 'requestcourses') { |
if ($context eq 'requestcourses') { |
Line 7980 sub modify_helpsettings {
|
Line 7988 sub modify_helpsettings {
|
} elsif ($domconfig{'helpsettings'}{$item} ne $env{'form.'.$item}) { |
} elsif ($domconfig{'helpsettings'}{$item} ne $env{'form.'.$item}) { |
$changes{$item} = 1; |
$changes{$item} = 1; |
} |
} |
} |
} |
if (($env{'form.'.$item} eq '0') || ($env{'form.'.$item} eq '1')) { |
if (($env{'form.'.$item} eq '0') || ($env{'form.'.$item} eq '1')) { |
$helphash{'helpsettings'}{$item} = $env{'form.'.$item}; |
$helphash{'helpsettings'}{$item} = $env{'form.'.$item}; |
} |
} |
Line 8055 sub modify_coursedefaults {
|
Line 8063 sub modify_coursedefaults {
|
} |
} |
foreach my $item (@numbers) { |
foreach my $item (@numbers) { |
my ($currdef,$newdef); |
my ($currdef,$newdef); |
my $newdef = $env{'form.'.$item}; |
$newdef = $env{'form.'.$item}; |
if ($item eq 'anonsurvey_threshold') { |
if ($item eq 'anonsurvey_threshold') { |
$currdef = $domconfig{'coursedefaults'}{$item}; |
$currdef = $domconfig{'coursedefaults'}{$item}; |
$newdef =~ s/\D//g; |
$newdef =~ s/\D//g; |
Line 8139 sub modify_coursedefaults {
|
Line 8147 sub modify_coursedefaults {
|
$resulttext .= '<li>'.&mt('Course/Community users can create/upload PDF forms set to "off"').'</li>'; |
$resulttext .= '<li>'.&mt('Course/Community users can create/upload PDF forms set to "off"').'</li>'; |
} |
} |
} elsif ($item eq 'anonsurvey_threshold') { |
} elsif ($item eq 'anonsurvey_threshold') { |
$resulttext .= '<li>'.&mt('Responder count required for display of anonymous survey submissions set to [_1].',$defaultshash{'coursedefaults'}{'anonsurvey_threshold'}).'</li>'; |
$resulttext .= '<li>'.&mt('Responder count required for display of anonymous survey submissions set to [_1].',$defaultshash{'coursedefaults'}{'anonsurvey_threshold'}).'</li>'; |
} elsif ($item eq 'uploadquota') { |
} elsif ($item eq 'uploadquota') { |
if (ref($defaultshash{'coursedefaults'}{'uploadquota'}) eq 'HASH') { |
if (ref($defaultshash{'coursedefaults'}{'uploadquota'}) eq 'HASH') { |
$resulttext .= '<li>'.&mt('Default quota for content uploaded to a course/community via Course Editor set as follows:').'<ul>'. |
$resulttext .= '<li>'.&mt('Default quota for content uploaded to a course/community via Course Editor set as follows:').'<ul>'. |
Line 8566 sub modify_loadbalancing {
|
Line 8574 sub modify_loadbalancing {
|
} |
} |
my $putresult = &Apache::lonnet::put_dom('configuration', |
my $putresult = &Apache::lonnet::put_dom('configuration', |
\%defaultshash,$dom); |
\%defaultshash,$dom); |
|
|
if ($putresult eq 'ok') { |
if ($putresult eq 'ok') { |
if (keys(%changes) > 0) { |
if (keys(%changes) > 0) { |
if (ref($changes{'delete'}) eq 'ARRAY') { |
if (ref($changes{'delete'}) eq 'ARRAY') { |
Line 8617 sub modify_loadbalancing {
|
Line 8624 sub modify_loadbalancing {
|
my $balancetext; |
my $balancetext; |
if ($rule eq '') { |
if ($rule eq '') { |
$balancetext = $ruletitles{'default'}; |
$balancetext = $ruletitles{'default'}; |
} elsif (($rule eq 'homeserver') || ($rule eq 'externalbalancer')) { |
} elsif (($rule eq 'homeserver') || ($rule eq 'externalbalancer') || |
|
($rule eq 'balancer') || ($rule eq 'offloadedto')) { |
$balancetext = $ruletitles{$rule}; |
$balancetext = $ruletitles{$rule}; |
} else { |
} else { |
$balancetext = &mt('offload to [_1]',$defaultshash{'loadbalancing'}{$balancer}{'rules'}{$type}); |
$balancetext = &mt('offload to [_1]',$defaultshash{'loadbalancing'}{$balancer}{'rules'}{$type}); |
} |
} |
$resulttext .= '<li>'.&mt('Load Balancer: [_1] -- balancing for [_2] set to - "[_3]"',$balancer,$titles->{$type},$balancetext).'</li>'; |
$resulttext .= '<li>'.&mt('Load Balancer: [_1] -- balancing for [_2] set to - "[_3]"',$balancer,$titles->{$type},$balancetext).'</li>'; |
} |
} |
} |
} |
} |
} |
Line 8682 sub recurse_cat_deletes {
|
Line 8690 sub recurse_cat_deletes {
|
delete($coursecategories->{$subitem}); |
delete($coursecategories->{$subitem}); |
$deletions->{$subitem} = 1; |
$deletions->{$subitem} = 1; |
&recurse_cat_deletes($subitem,$coursecategories,$deletions); |
&recurse_cat_deletes($subitem,$coursecategories,$deletions); |
} |
} |
} |
} |
} |
} |
return; |
return; |
Line 8920 function showSpares(balancer,ishomedom,b
|
Line 8928 function showSpares(balancer,ishomedom,b
|
} else { |
} else { |
document.getElementById('balanceruletitle_'+balnum+'_'+insttypes[k]).style.display='none'; |
document.getElementById('balanceruletitle_'+balnum+'_'+insttypes[k]).style.display='none'; |
document.getElementById('balancerule_'+balnum+'_'+insttypes[k]).style.display='none'; |
document.getElementById('balancerule_'+balnum+'_'+insttypes[k]).style.display='none'; |
|
|
} |
} |
} else { |
} else { |
document.getElementById('balanceruletitle_'+balnum+'_'+insttypes[k]).style.display='block'; |
document.getElementById('balanceruletitle_'+balnum+'_'+insttypes[k]).style.display='block'; |
Line 8937 function showSpares(balancer,ishomedom,b
|
Line 8944 function showSpares(balancer,ishomedom,b
|
if ((currBalancers.indexOf(alltargets[m]) == -1) && (alltargets[m] != balancer)) { |
if ((currBalancers.indexOf(alltargets[m]) == -1) && (alltargets[m] != balancer)) { |
idx ++; |
idx ++; |
item.options[idx] = new Option(alltargets[m],alltargets[m],false,false); |
item.options[idx] = new Option(alltargets[m],alltargets[m],false,false); |
|
|
} |
} |
} |
} |
} |
} |
Line 9010 function singleServerToggle(balnum,type)
|
Line 9016 function singleServerToggle(balnum,type)
|
|
|
function balanceruleChange(formname,balnum,type) { |
function balanceruleChange(formname,balnum,type) { |
if (type == '_LC_external') { |
if (type == '_LC_external') { |
return; |
return; |
} |
} |
var typesRules = getIndicesByName(formname,'loadbalancing_rules_'+balnum+'_'+type); |
var typesRules = getIndicesByName(formname,'loadbalancing_rules_'+balnum+'_'+type); |
for (var i=0; i<typesRules.length; i++) { |
for (var i=0; i<typesRules.length; i++) { |