version 1.288, 2017/01/23 22:46:44
|
version 1.289, 2017/01/23 23:50:11
|
Line 3024 sub print_contacts {
|
Line 3024 sub print_contacts {
|
if (exists($settings->{'helpform'}{'maxsize'})) { |
if (exists($settings->{'helpform'}{'maxsize'})) { |
$maxsize = $settings->{'helpform'}{'maxsize'}; |
$maxsize = $settings->{'helpform'}{'maxsize'}; |
} else { |
} else { |
$maxsize = '1.0'; |
$maxsize = '1.0'; |
} |
} |
} else { |
} else { |
if (ref($fields) eq 'ARRAY') { |
if (ref($fields) eq 'ARRAY') { |
Line 3041 sub print_contacts {
|
Line 3041 sub print_contacts {
|
$to{'adminemail'} = $Apache::lonnet::perlvar{'lonAdmEMail'}; |
$to{'adminemail'} = $Apache::lonnet::perlvar{'lonAdmEMail'}; |
$checked{'errormail'}{'adminemail'} = ' checked="checked" '; |
$checked{'errormail'}{'adminemail'} = ' checked="checked" '; |
$checked{'packagesmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'packagesmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'requestsmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'requestsmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'updatesmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'updatesmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'idconflictsmail'}{'adminemail'} = ' checked="checked" '; |
$checked{'idconflictsmail'}{'adminemail'} = ' checked="checked" '; |
Line 3117 sub print_contacts {
|
Line 3117 sub print_contacts {
|
if ($position eq 'middle') { |
if ($position eq 'middle') { |
my %choices; |
my %choices; |
$choices{'reporterrors'} = &mt('E-mail error reports to [_1]', |
$choices{'reporterrors'} = &mt('E-mail error reports to [_1]', |
&Apache::loncommon::modal_link('http://loncapa.org/core.html', |
&Apache::loncommon::modal_link('http://loncapa.org/core.html', |
&mt('LON-CAPA core group - MSU'),600,500)); |
&mt('LON-CAPA core group - MSU'),600,500)); |
$choices{'reportupdates'} = &mt('E-mail record of completed LON-CAPA updates to [_1]', |
$choices{'reportupdates'} = &mt('E-mail record of completed LON-CAPA updates to [_1]', |
&Apache::loncommon::modal_link('http://loncapa.org/core.html', |
&Apache::loncommon::modal_link('http://loncapa.org/core.html', |
&mt('LON-CAPA core group - MSU'),600,500)); |
&mt('LON-CAPA core group - MSU'),600,500)); |
Line 3134 sub print_contacts {
|
Line 3134 sub print_contacts {
|
'<td>'.&mt('Extra helpdesk form fields:').'<br />'. |
'<td>'.&mt('Extra helpdesk form fields:').'<br />'. |
&mt('(e-mail, subject, and description always shown)'). |
&mt('(e-mail, subject, and description always shown)'). |
'</td><td class="LC_left_item">'; |
'</td><td class="LC_left_item">'; |
if ((ref($fields) eq 'ARRAY') && (ref($fieldtitles) eq 'HASH') && |
if ((ref($fields) eq 'ARRAY') && (ref($fieldtitles) eq 'HASH') && |
(ref($fieldoptions) eq 'HASH') && (ref($possoptions) eq 'HASH')) { |
(ref($fieldoptions) eq 'HASH') && (ref($possoptions) eq 'HASH')) { |
$datatable .= '<table><tr><th>'.&mt('Field').'</th><th>'.&mt('Status').'</th></tr>'; |
$datatable .= '<table><tr><th>'.&mt('Field').'</th><th>'.&mt('Status').'</th></tr>'; |
foreach my $field (@{$fields}) { |
foreach my $field (@{$fields}) { |
Line 3188 sub contacts_javascript {
|
Line 3188 sub contacts_javascript {
|
function screenshotSize(field) { |
function screenshotSize(field) { |
if (document.getElementById('help_screenshotsize')) { |
if (document.getElementById('help_screenshotsize')) { |
if (field.value == 'no') { |
if (field.value == 'no') { |
document.getElementById('help_screenshotsize').style.display="none"; |
document.getElementById('help_screenshotsize').style.display="none"; |
} else { |
} else { |
document.getElementById('help_screenshotsize').style.display=""; |
document.getElementById('help_screenshotsize').style.display=""; |
} |
} |
Line 3497 function helpdeskAccess(num) {
|
Line 3497 function helpdeskAccess(num) {
|
function toggleHelpdeskItem(num,field) { |
function toggleHelpdeskItem(num,field) { |
if (document.getElementById('helproles_'+num+'_'+field)) { |
if (document.getElementById('helproles_'+num+'_'+field)) { |
if (document.getElementById('helproles_'+num+'_'+field).className.match(/(?:^|\\s)LC_hidden(?!\\S)/)) { |
if (document.getElementById('helproles_'+num+'_'+field).className.match(/(?:^|\\s)LC_hidden(?!\\S)/)) { |
document.getElementById('helproles_'+num+'_'+field).className = |
document.getElementById('helproles_'+num+'_'+field).className = |
document.getElementById('helproles_'+num+'_'+field).className.replace(/(?:^|\\s)LC_hidden(?!\\S)/g ,''); |
document.getElementById('helproles_'+num+'_'+field).className.replace(/(?:^|\\s)LC_hidden(?!\\S)/g ,''); |
if (document.getElementById('helproles_'+num+'_'+field+'_vis')) { |
if (document.getElementById('helproles_'+num+'_'+field+'_vis')) { |
document.getElementById('helproles_'+num+'_'+field+'_vis').value = '$html_js_lt{hide}'; |
document.getElementById('helproles_'+num+'_'+field+'_vis').value = '$html_js_lt{hide}'; |
Line 3623 sub radiobutton_prefs {
|
Line 3623 sub radiobutton_prefs {
|
} else { |
} else { |
$datatable .= '<td class="LC_right_item">'; |
$datatable .= '<td class="LC_right_item">'; |
} |
} |
$datatable .= |
$datatable .= |
'<span class="LC_nobreak">'. |
'<span class="LC_nobreak">'. |
'<label><input type="radio" name="'. |
'<label><input type="radio" name="'. |
$item.'" '.$checkedon{$item}.' value="1"'.$onclick.' />'.&mt('Yes'). |
$item.'" '.$checkedon{$item}.' value="1"'.$onclick.' />'.&mt('Yes'). |
Line 4009 sub print_coursedefaults {
|
Line 4009 sub print_coursedefaults {
|
'canuse_pdfforms' => 'off', |
'canuse_pdfforms' => 'off', |
'uselcmath' => 'on', |
'uselcmath' => 'on', |
'usejsme' => 'on', |
'usejsme' => 'on', |
'canclone' => 'none', |
'canclone' => 'none', |
); |
); |
@toggles = ('canuse_pdfforms','uselcmath','usejsme'); |
@toggles = ('canuse_pdfforms','uselcmath','usejsme'); |
($datatable,$itemcount) = &radiobutton_prefs($settings,\@toggles,\%defaultchecked, |
($datatable,$itemcount) = &radiobutton_prefs($settings,\@toggles,\%defaultchecked, |
Line 4048 sub print_coursedefaults {
|
Line 4048 sub print_coursedefaults {
|
$currcanclone = $settings->{'canclone'}; |
$currcanclone = $settings->{'canclone'}; |
} |
} |
} |
} |
} |
} |
foreach my $option (@cloneoptions) { |
foreach my $option (@cloneoptions) { |
my ($checked,$additional); |
my ($checked,$additional); |
if ($currcanclone eq $option) { |
if ($currcanclone eq $option) { |
Line 4117 sub print_coursedefaults {
|
Line 4117 sub print_coursedefaults {
|
foreach my $type (@types) { |
foreach my $type (@types) { |
if (ref($settings->{'postsubmit'}->{'timeout'}) eq 'HASH') { |
if (ref($settings->{'postsubmit'}->{'timeout'}) eq 'HASH') { |
if ($settings->{'postsubmit'}->{'timeout'}->{$type} =~ /^\d+$/) { |
if ($settings->{'postsubmit'}->{'timeout'}->{$type} =~ /^\d+$/) { |
$deftimeout{$type} = $settings->{'postsubmit'}->{'timeout'}->{$type}; |
$deftimeout{$type} = $settings->{'postsubmit'}->{'timeout'}->{$type}; |
} else { |
} else { |
$deftimeout{$type} = $staticdefaults{'postsubmit'}; |
$deftimeout{$type} = $staticdefaults{'postsubmit'}; |
} |
} |
Line 4932 sub spares_row {
|
Line 4932 sub spares_row {
|
<span class="LC_nobreak">'. |
<span class="LC_nobreak">'. |
&mt('[_1] when busy, offloads to:' |
&mt('[_1] when busy, offloads to:' |
,'<b>'.$server.'</b>').'</span><br />'. |
,'<b>'.$server.'</b>').'</span><br />'. |
'<span class="LC_nobreak">'."\n". |
'<span class="LC_nobreak">'."\n". |
'<label><input type="checkbox" name="offloadnow" value="'.$server.'"'.$checkednow.' />'. |
'<label><input type="checkbox" name="offloadnow" value="'.$server.'"'.$checkednow.' />'. |
' '.&mt('Switch active users on next access').'</label></span>'. |
' '.&mt('Switch active users on next access').'</label></span>'. |
"\n"; |
"\n"; |
Line 5426 sub contact_titles {
|
Line 5426 sub contact_titles {
|
'errormail' => 'Error reports to be e-mailed to', |
'errormail' => 'Error reports to be e-mailed to', |
'packagesmail' => 'Package update alerts to be e-mailed to', |
'packagesmail' => 'Package update alerts to be e-mailed to', |
'helpdeskmail' => "Helpdesk requests for this domain's users", |
'helpdeskmail' => "Helpdesk requests for this domain's users", |
'otherdomsmail' => 'Helpdesk requests for other (unconfigured) domains', |
'otherdomsmail' => 'Helpdesk requests for other (unconfigured) domains', |
'lonstatusmail' => 'E-mail from nightly status check (warnings/errors)', |
'lonstatusmail' => 'E-mail from nightly status check (warnings/errors)', |
'requestsmail' => 'E-mail from course requests requiring approval', |
'requestsmail' => 'E-mail from course requests requiring approval', |
'updatesmail' => 'E-mail from nightly check of LON-CAPA module integrity/updates', |
'updatesmail' => 'E-mail from nightly check of LON-CAPA module integrity/updates', |
Line 5447 sub helpform_fields {
|
Line 5447 sub helpform_fields {
|
'cc' => 'Cc e-mail', |
'cc' => 'Cc e-mail', |
'course' => 'Course Details', |
'course' => 'Course Details', |
'section' => 'Sections', |
'section' => 'Sections', |
'screenshot' => 'File upload', |
'screenshot' => 'File upload', |
); |
); |
my @fields = ('username','phone','user','course','section','cc','screenshot'); |
my @fields = ('username','phone','user','course','section','cc','screenshot'); |
my %possoptions = ( |
my %possoptions = ( |
username => ['yes','no','req'], |
username => ['yes','no','req'], |
phone => ['yes','no','req'], |
phone => ['yes','no','req'], |
user => ['yes','no'], |
user => ['yes','no'], |
cc => ['yes','no'], |
cc => ['yes','no'], |
course => ['yes','no'], |
course => ['yes','no'], |
section => ['yes','no'], |
section => ['yes','no'], |
screenshot => ['yes','no'], |
screenshot => ['yes','no'], |
Line 6766 sub serverstatus_pages {
|
Line 6766 sub serverstatus_pages {
|
|
|
sub defaults_javascript { |
sub defaults_javascript { |
my ($settings) = @_; |
my ($settings) = @_; |
return unless (ref($settings) eq 'HASH'); |
return unless (ref($settings) eq 'HASH'); |
if ((ref($settings->{'inststatusorder'}) eq 'ARRAY') && (ref($settings->{'inststatustypes'}) eq 'HASH')) { |
if ((ref($settings->{'inststatusorder'}) eq 'ARRAY') && (ref($settings->{'inststatustypes'}) eq 'HASH')) { |
my $maxnum = scalar(@{$settings->{'inststatusorder'}}); |
my $maxnum = scalar(@{$settings->{'inststatusorder'}}); |
if ($maxnum eq '') { |
if ($maxnum eq '') { |
Line 7557 sub modify_login {
|
Line 7557 sub modify_login {
|
} elsif ($currheadtagurls{$lonhost}) { |
} elsif ($currheadtagurls{$lonhost}) { |
$loginhash{'login'}{'headtag'}{$lonhost}{'url'} = $currheadtagurls{$lonhost}; |
$loginhash{'login'}{'headtag'}{$lonhost}{'url'} = $currheadtagurls{$lonhost}; |
if ($currexempt{$lonhost}) { |
if ($currexempt{$lonhost}) { |
if ((!exists($possexempt{$lonhost})) || ($possexempt{$lonhost} ne $currexempt{$lonhost})) { |
if ((!exists($possexempt{$lonhost})) || ($possexempt{$lonhost} ne $currexempt{$lonhost})) { |
$changes{'headtag'}{$lonhost} = 1; |
$changes{'headtag'}{$lonhost} = 1; |
} |
} |
} elsif ($possexempt{$lonhost}) { |
} elsif ($possexempt{$lonhost}) { |
Line 7789 sub modify_login {
|
Line 7789 sub modify_login {
|
return $resulttext; |
return $resulttext; |
} |
} |
|
|
|
|
sub check_exempt_addresses { |
sub check_exempt_addresses { |
my ($iplist) = @_; |
my ($iplist) = @_; |
$iplist =~ s/^\s+//; |
$iplist =~ s/^\s+//; |
Line 8700 sub modify_quotas {
|
Line 8699 sub modify_quotas {
|
my $newpos = $env{'form.'.$itemid}; |
my $newpos = $env{'form.'.$itemid}; |
$newpos =~ s/\D+//g; |
$newpos =~ s/\D+//g; |
foreach my $item ('subject','title','publisher','author') { |
foreach my $item ('subject','title','publisher','author') { |
next if ((($item eq 'author') || ($item eq 'publisher')) && |
next if ((($item eq 'author') || ($item eq 'publisher')) && |
($type eq 'templates')); |
($type eq 'templates')); |
$confhash{$type}{$key}{$item} = $env{'form.'.$type.'_'.$item.'_'.$i}; |
$confhash{$type}{$key}{$item} = $env{'form.'.$type.'_'.$item.'_'.$i}; |
if ($domconfig{$action}{$type}{$key}{$item} ne $confhash{$type}{$key}{$item}) { |
if ($domconfig{$action}{$type}{$key}{$item} ne $confhash{$type}{$key}{$item}) { |
Line 8869 sub modify_quotas {
|
Line 8868 sub modify_quotas {
|
} |
} |
} elsif ($confhash{'validation'}{'dc'} ne '') { |
} elsif ($confhash{'validation'}{'dc'} ne '') { |
$changes{'validation'}{'dc'} = $confhash{'validation'}{'dc'}; |
$changes{'validation'}{'dc'} = $confhash{'validation'}{'dc'}; |
} |
} |
} else { |
} else { |
if (ref($domconfig{'requestcourses'}) eq 'HASH') { |
if (ref($domconfig{'requestcourses'}) eq 'HASH') { |
if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') { |
if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') { |
Line 10170 sub modify_directorysrch {
|
Line 10169 sub modify_directorysrch {
|
my %title = ( available => 'Institutional directory search available', |
my %title = ( available => 'Institutional directory search available', |
localonly => 'Other domains can search institution', |
localonly => 'Other domains can search institution', |
lcavailable => 'LON-CAPA directory search available', |
lcavailable => 'LON-CAPA directory search available', |
lclocalonly => 'Other domains can search LON-CAPA domain', |
lclocalonly => 'Other domains can search LON-CAPA domain', |
searchby => 'Search types', |
searchby => 'Search types', |
searchtypes => 'Search latitude'); |
searchtypes => 'Search latitude'); |
my @offon = ('off','on'); |
my @offon = ('off','on'); |
Line 10264 sub modify_directorysrch {
|
Line 10263 sub modify_directorysrch {
|
} |
} |
} |
} |
if (exists($currdirsrch{'lcavailable'})) { |
if (exists($currdirsrch{'lcavailable'})) { |
if ($currdirsrch{'lcavailable'} ne $env{'form.dirsrch_domavailable'}) { |
if ($currdirsrch{'lcavailable'} ne $env{'form.dirsrch_domavailable'}) { |
$changes{'lcavailable'} = 1; |
$changes{'lcavailable'} = 1; |
} |
} |
} else { |
} else { |
if ($env{'form.dirsrch_lcavailable'} eq '1') { |
if ($env{'form.dirsrch_lcavailable'} eq '1') { |
$changes{'lcavailable'} = 1; |
$changes{'lcavailable'} = 1; |
} |
} |
} |
} |
if (exists($currdirsrch{'localonly'})) { |
if (exists($currdirsrch{'localonly'})) { |
if ($currdirsrch{'localonly'} ne $env{'form.dirsrch_instlocalonly'}) { |
if ($currdirsrch{'localonly'} ne $env{'form.dirsrch_instlocalonly'}) { |
$changes{'localonly'} = 1; |
$changes{'localonly'} = 1; |
} |
} |
} else { |
} else { |
if ($env{'form.dirsrch_instlocalonly'} eq '1') { |
if ($env{'form.dirsrch_instlocalonly'} eq '1') { |
$changes{'localonly'} = 1; |
$changes{'localonly'} = 1; |
} |
} |
} |
} |
if (exists($currdirsrch{'lclocalonly'})) { |
if (exists($currdirsrch{'lclocalonly'})) { |
if ($currdirsrch{'lclocalonly'} ne $env{'form.dirsrch_domlocalonly'}) { |
if ($currdirsrch{'lclocalonly'} ne $env{'form.dirsrch_domlocalonly'}) { |
$changes{'lclocalonly'} = 1; |
$changes{'lclocalonly'} = 1; |
} |
} |
} else { |
} else { |
if ($env{'form.dirsrch_domlocalonly'} eq '1') { |
if ($env{'form.dirsrch_domlocalonly'} eq '1') { |
$changes{'lclocalonly'} = 1; |
$changes{'lclocalonly'} = 1; |
Line 10303 sub modify_directorysrch {
|
Line 10302 sub modify_directorysrch {
|
} |
} |
if ($changes{'lclocalonly'}) { |
if ($changes{'lclocalonly'}) { |
$resulttext .= '<li>'.&mt("$title{'lclocalonly'} set to: $otherdoms[$env{'form.dirsrch_domlocalonly'}]").'</li>'; |
$resulttext .= '<li>'.&mt("$title{'lclocalonly'} set to: $otherdoms[$env{'form.dirsrch_domlocalonly'}]").'</li>'; |
} |
} |
if (ref($changes{'cansearch'}) eq 'ARRAY') { |
if (ref($changes{'cansearch'}) eq 'ARRAY') { |
my $chgtext; |
my $chgtext; |
if (ref($usertypes) eq 'HASH') { |
if (ref($usertypes) eq 'HASH') { |
Line 10386 sub modify_contacts {
|
Line 10385 sub modify_contacts {
|
} else { |
} else { |
$contacts_hash{contacts}{$type}{$item} = 0; |
$contacts_hash{contacts}{$type}{$item} = 0; |
} |
} |
} |
} |
$others{$type} = $env{'form.'.$type.'_others'}; |
$others{$type} = $env{'form.'.$type.'_others'}; |
$contacts_hash{contacts}{$type}{'others'} = $others{$type}; |
$contacts_hash{contacts}{$type}{'others'} = $others{$type}; |
if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) { |
if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) { |
Line 10444 sub modify_contacts {
|
Line 10443 sub modify_contacts {
|
if ($others{$type} ne $currsetting{$type}{'others'}) { |
if ($others{$type} ne $currsetting{$type}{'others'}) { |
push(@{$changes{$type}},'others'); |
push(@{$changes{$type}},'others'); |
} |
} |
if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) { |
if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) { |
if ($bcc{$type} ne $currsetting{$type}{'bcc'}) { |
if ($bcc{$type} ne $currsetting{$type}{'bcc'}) { |
push(@{$changes{$type}},'bcc'); |
push(@{$changes{$type}},'bcc'); |
} |
} |
Line 10522 sub modify_contacts {
|
Line 10521 sub modify_contacts {
|
} |
} |
} |
} |
} |
} |
} |
} |
} |
} |
foreach my $item (@toggles) { |
foreach my $item (@toggles) { |
if (($env{'form.'.$item} == 1) && ($currsetting{$item} == 0)) { |
if (($env{'form.'.$item} == 1) && ($currsetting{$item} == 0)) { |
Line 10553 sub modify_contacts {
|
Line 10552 sub modify_contacts {
|
foreach my $type (@mailings) { |
foreach my $type (@mailings) { |
if (ref($changes{$type}) eq 'ARRAY') { |
if (ref($changes{$type}) eq 'ARRAY') { |
if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) { |
if (($type eq 'helpdeskmail') || ($type eq 'otherdomsmail')) { |
$resulttext .= '<li>'.$titles->{$type}.' -- '.&mt('sent to').': '; |
$resulttext .= '<li>'.$titles->{$type}.' -- '.&mt('sent to').': '; |
} else { |
} else { |
$resulttext .= '<li>'.$titles->{$type}.': '; |
$resulttext .= '<li>'.$titles->{$type}.': '; |
} |
} |
Line 10572 sub modify_contacts {
|
Line 10571 sub modify_contacts {
|
if ($bcc{$type} ne '') { |
if ($bcc{$type} ne '') { |
my $bcctext; |
my $bcctext; |
if (@text) { |
if (@text) { |
$bcctext = ' '.&mt('with Bcc to'); |
$bcctext = ' '.&mt('with Bcc to'); |
} else { |
} else { |
$bcctext = '(Bcc)'; |
$bcctext = '(Bcc)'; |
} |
} |
Line 10580 sub modify_contacts {
|
Line 10579 sub modify_contacts {
|
} elsif (!@text) { |
} elsif (!@text) { |
$resulttext .= &mt('No one'); |
$resulttext .= &mt('No one'); |
} |
} |
if ($includestr{$type} ne '') { |
if ($includestr{$type} ne '') { |
if ($includeloc{$type} eq 'b') { |
if ($includeloc{$type} eq 'b') { |
$resulttext .= '<br />'.&mt('Text automatically added to e-mail body:').' '.$includestr{$type}; |
$resulttext .= '<br />'.&mt('Text automatically added to e-mail body:').' '.$includestr{$type}; |
} elsif ($includeloc{$type} eq 's') { |
} elsif ($includeloc{$type} eq 's') { |
Line 10618 sub modify_contacts {
|
Line 10617 sub modify_contacts {
|
next; |
next; |
} |
} |
if ($contacts_hash{'contacts'}{'helpform'}{$field} eq 'yes') { |
if ($contacts_hash{'contacts'}{'helpform'}{$field} eq 'yes') { |
push(@optional,$field); |
push(@optional,$field); |
} elsif ($contacts_hash{'contacts'}{'helpform'}{$field} eq 'no') { |
} elsif ($contacts_hash{'contacts'}{'helpform'}{$field} eq 'no') { |
push(@unused,$field); |
push(@unused,$field); |
} elsif ($contacts_hash{'contacts'}{'helpform'}{$field} eq 'req') { |
} elsif ($contacts_hash{'contacts'}{'helpform'}{$field} eq 'req') { |
push(@required,$field); |
push(@required,$field); |
} |
} |
} |
} |
if (@optional) { |
if (@optional) { |
Line 12501 sub modify_helpsettings {
|
Line 12500 sub modify_helpsettings {
|
$identifier = 'custhelp'.$num; |
$identifier = 'custhelp'.$num; |
my %newprivs = &Apache::lonuserutils::custom_role_update($rolename,$identifier); |
my %newprivs = &Apache::lonuserutils::custom_role_update($rolename,$identifier); |
my %currprivs; |
my %currprivs; |
($currprivs{'s'},$currprivs{'d'},$currprivs{'c'}) = |
($currprivs{'s'},$currprivs{'d'},$currprivs{'c'}) = |
split(/\_/,$existing{'rolesdef_'.$rolename}); |
split(/\_/,$existing{'rolesdef_'.$rolename}); |
foreach my $level ('c','d','s') { |
foreach my $level ('c','d','s') { |
if ($newprivs{$level} ne $currprivs{$level}) { |
if ($newprivs{$level} ne $currprivs{$level}) { |
Line 12543 sub modify_helpsettings {
|
Line 12542 sub modify_helpsettings {
|
if ($access eq 'status') { |
if ($access eq 'status') { |
my @statuses = &Apache::loncommon::get_env_multiple('form.'.$prefix.'_status'); |
my @statuses = &Apache::loncommon::get_env_multiple('form.'.$prefix.'_status'); |
if (scalar(@statuses) == 0) { |
if (scalar(@statuses) == 0) { |
$helphash{'helpsettings'}{'adhoc'}{$rolename}{'access'} = 'none'; |
$helphash{'helpsettings'}{'adhoc'}{$rolename}{'access'} = 'none'; |
} else { |
} else { |
my (@shownstatus,$numtypes); |
my (@shownstatus,$numtypes); |
$helphash{'helpsettings'}{'adhoc'}{$rolename}{$access} = []; |
$helphash{'helpsettings'}{'adhoc'}{$rolename}{$access} = []; |
Line 12616 sub modify_helpsettings {
|
Line 12615 sub modify_helpsettings {
|
if (ref($current{'adhoc'}{$rolename}) eq 'HASH') { |
if (ref($current{'adhoc'}{$rolename}) eq 'HASH') { |
if ($current{'adhoc'}{$rolename}{'order'} ne $idx) { |
if ($current{'adhoc'}{$rolename}{'order'} ne $idx) { |
$changes{'customrole'}{$rolename}{'order'} = 1; |
$changes{'customrole'}{$rolename}{'order'} = 1; |
$newsettings{$rolename}{'order'} = $idx+1; |
$newsettings{$rolename}{'order'} = $idx+1; |
} |
} |
} |
} |
} |
} |
Line 12814 sub modify_coursedefaults {
|
Line 12813 sub modify_coursedefaults {
|
$changes{$item} = 1; |
$changes{$item} = 1; |
} |
} |
} elsif ($item =~ /^(uploadquota|mysqltables)_/) { |
} elsif ($item =~ /^(uploadquota|mysqltables)_/) { |
my $setting = $1; |
my $setting = $1; |
unless (($currdef eq '') && ($newdef == $staticdefaults{$setting})) { |
unless (($currdef eq '') && ($newdef == $staticdefaults{$setting})) { |
$changes{$setting} = 1; |
$changes{$setting} = 1; |
} |
} |
Line 12829 sub modify_coursedefaults {
|
Line 12828 sub modify_coursedefaults {
|
} |
} |
} |
} |
my $newclone; |
my $newclone; |
if ($env{'form.canclone'} =~ /^(none|domain|instcode)$/) { |
if ($env{'form.canclone'} =~ /^(none|domain|instcode)$/) { |
$newclone = $env{'form.canclone'}; |
$newclone = $env{'form.canclone'}; |
} |
} |
if ($newclone eq 'instcode') { |
if ($newclone eq 'instcode') { |
Line 12852 sub modify_coursedefaults {
|
Line 12851 sub modify_coursedefaults {
|
$newclone eq ''; |
$newclone eq ''; |
} |
} |
} elsif ($newclone ne '') { |
} elsif ($newclone ne '') { |
$defaultshash{'coursedefaults'}{'canclone'} = $newclone; |
$defaultshash{'coursedefaults'}{'canclone'} = $newclone; |
} |
} |
if ($newclone ne $currclone) { |
if ($newclone ne $currclone) { |
$changes{'canclone'} = 1; |
$changes{'canclone'} = 1; |
} |
} |
Line 12871 sub modify_coursedefaults {
|
Line 12870 sub modify_coursedefaults {
|
$defaultshash{'coursedefaults'}{'coursecredits'}{$type} = $credits{$type}; |
$defaultshash{'coursedefaults'}{'coursecredits'}{$type} = $credits{$type}; |
} |
} |
} else { |
} else { |
if ($env{'form.coursecredits'} eq '1') { |
if ($env{'form.coursecredits'} eq '1') { |
foreach my $type (@types) { |
foreach my $type (@types) { |
unless ($type eq 'community') { |
unless ($type eq 'community') { |
if ($domconfig{'coursedefaults'}{'coursecredits'}{$type} ne $credits{$type}) { |
if ($domconfig{'coursedefaults'}{'coursecredits'}{$type} ne $credits{$type}) { |
$changes{'coursecredits'} = 1; |
$changes{'coursecredits'} = 1; |
} |
} |
$defaultshash{'coursedefaults'}{'coursecredits'}{$type} = $credits{$type}; |
$defaultshash{'coursedefaults'}{'coursecredits'}{$type} = $credits{$type}; |
Line 12917 sub modify_coursedefaults {
|
Line 12916 sub modify_coursedefaults {
|
} |
} |
if (exists($currtimeout{$type})) { |
if (exists($currtimeout{$type})) { |
if ($timeout ne $currtimeout{$type}) { |
if ($timeout ne $currtimeout{$type}) { |
$changes{'postsubmit'} = 1; |
$changes{'postsubmit'} = 1; |
} |
} |
} elsif ($timeout ne '') { |
} elsif ($timeout ne '') { |
$changes{'postsubmit'} = 1; |
$changes{'postsubmit'} = 1; |
Line 12946 sub modify_coursedefaults {
|
Line 12945 sub modify_coursedefaults {
|
if ($changes{$item}) { |
if ($changes{$item}) { |
$domdefaults{$item}=$defaultshash{'coursedefaults'}{$item}; |
$domdefaults{$item}=$defaultshash{'coursedefaults'}{$item}; |
} |
} |
} |
} |
if ($changes{'coursecredits'}) { |
if ($changes{'coursecredits'}) { |
if (ref($defaultshash{'coursedefaults'}{'coursecredits'}) eq 'HASH') { |
if (ref($defaultshash{'coursedefaults'}{'coursecredits'}) eq 'HASH') { |
foreach my $type (keys(%{$defaultshash{'coursedefaults'}{'coursecredits'}})) { |
foreach my $type (keys(%{$defaultshash{'coursedefaults'}{'coursecredits'}})) { |
Line 13009 sub modify_coursedefaults {
|
Line 13008 sub modify_coursedefaults {
|
if ($env{'form.'.$item} eq '1') { |
if ($env{'form.'.$item} eq '1') { |
$resulttext .= '<li>'.&mt('Molecule editor uses JSME (HTML5), if supported by browser.').'</li>'; |
$resulttext .= '<li>'.&mt('Molecule editor uses JSME (HTML5), if supported by browser.').'</li>'; |
} else { |
} else { |
$resulttext .= '<li>'.&mt('Molecule editor uses JME (Java), if supported by client OS.').'</li>'; |
$resulttext .= '<li>'.&mt('Molecule editor uses JME (Java), if supported by client OS.').'</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>'; |
Line 13044 sub modify_coursedefaults {
|
Line 13043 sub modify_coursedefaults {
|
$resulttext .= '<li>'.&mt('Submit button(s) remain enabled on page after student makes submission.'); |
$resulttext .= '<li>'.&mt('Submit button(s) remain enabled on page after student makes submission.'); |
} else { |
} else { |
$resulttext .= '<li>'.&mt('Submit button(s) disabled on page after student makes submission').'; '; |
$resulttext .= '<li>'.&mt('Submit button(s) disabled on page after student makes submission').'; '; |
if (ref($defaultshash{'coursedefaults'}{'postsubmit'}) eq 'HASH') { |
if (ref($defaultshash{'coursedefaults'}{'postsubmit'}) eq 'HASH') { |
$resulttext .= &mt('durations:').'<ul>'; |
$resulttext .= &mt('durations:').'<ul>'; |
foreach my $type (@types) { |
foreach my $type (@types) { |
$resulttext .= '<li>'; |
$resulttext .= '<li>'; |
Line 13075 sub modify_coursedefaults {
|
Line 13074 sub modify_coursedefaults {
|
} |
} |
$resulttext .= '</ul>'; |
$resulttext .= '</ul>'; |
} |
} |
$resulttext .= '</li>'; |
$resulttext .= '</li>'; |
} |
} |
} elsif ($item eq 'coursecredits') { |
} elsif ($item eq 'coursecredits') { |
if (ref($defaultshash{'coursedefaults'}{'coursecredits'}) eq 'HASH') { |
if (ref($defaultshash{'coursedefaults'}{'coursecredits'}) eq 'HASH') { |
Line 13103 sub modify_coursedefaults {
|
Line 13102 sub modify_coursedefaults {
|
} elsif ($defaultshash{'coursedefaults'}{'canclone'} eq 'domain') { |
} elsif ($defaultshash{'coursedefaults'}{'canclone'} eq 'domain') { |
$resulttext .= '<li>'.&mt('By default, a course requester can clone any course from his/her domain.').'</li>'; |
$resulttext .= '<li>'.&mt('By default, a course requester can clone any course from his/her domain.').'</li>'; |
} else { |
} else { |
$resulttext .= '<li>'.&mt('By default, only course owner and coordinators may clone a course.').'</li>'; |
$resulttext .= '<li>'.&mt('By default, only course owner and coordinators may clone a course.').'</li>'; |
} |
} |
} |
} |
} |
} |
Line 13558 sub modify_usersessions {
|
Line 13557 sub modify_usersessions {
|
} |
} |
} |
} |
unless ($changes{'offloadnow'}) { |
unless ($changes{'offloadnow'}) { |
foreach my $lonhost (keys(%{$defaultshash{'usersessions'}{'offloadnow'}})) { |
foreach my $lonhost (keys(%{$defaultshash{'usersessions'}{'offloadnow'}})) { |
unless ($domconfig{'usersessions'}{'offloadnow'}{$lonhost}) { |
unless ($domconfig{'usersessions'}{'offloadnow'}{$lonhost}) { |
$changes{'offloadnow'} = 1; |
$changes{'offloadnow'} = 1; |
last; |
last; |
Line 14076 sub modify_loadbalancing {
|
Line 14075 sub modify_loadbalancing {
|
} |
} |
if ($rule eq 'specific') { |
if ($rule eq 'specific') { |
my $specifiedhost = $env{'form.loadbalancing_singleserver_'.$i.'_'.$type}; |
my $specifiedhost = $env{'form.loadbalancing_singleserver_'.$i.'_'.$type}; |
if (exists($servers{$specifiedhost})) { |
if (exists($servers{$specifiedhost})) { |
$rule = $specifiedhost; |
$rule = $specifiedhost; |
} |
} |
} |
} |
Line 14152 sub modify_loadbalancing {
|
Line 14151 sub modify_loadbalancing {
|
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') || |
($type eq '_LC_ipchange') || ($type eq '_LC_ipchangesso')) { |
($type eq '_LC_ipchange') || ($type eq '_LC_ipchangesso')) { |
if (($type eq '_LC_ipchange') || ($type eq '_LC_ipchangesso')) { |
if (($type eq '_LC_ipchange') || ($type eq '_LC_ipchangesso')) { |
foreach my $sparetype (@sparestypes) { |
foreach my $sparetype (@sparestypes) { |
if (ref($defaultshash{'loadbalancing'}{$balancer}{'targets'}{$sparetype}) eq 'ARRAY') { |
if (ref($defaultshash{'loadbalancing'}{$balancer}{'targets'}{$sparetype}) eq 'ARRAY') { |
Line 14879 function updateCaptcha(caller,context) {
|
Line 14878 function updateCaptcha(caller,context) {
|
privtext.innerHTML = "$lt{'priv'}"; |
privtext.innerHTML = "$lt{'priv'}"; |
versionitem.type = 'text'; |
versionitem.type = 'text'; |
versionitem.size = '3'; |
versionitem.size = '3'; |
versiontext.innerHTML = "$lt{'ver'}"; |
versiontext.innerHTML = "$lt{'ver'}"; |
} else { |
} else { |
pubitem.type = 'hidden'; |
pubitem.type = 'hidden'; |
privitem.type = 'hidden'; |
privitem.type = 'hidden'; |
Line 14952 sub captcha_phrases {
|
Line 14951 sub captcha_phrases {
|
original => 'original (CAPTCHA)', |
original => 'original (CAPTCHA)', |
recaptcha => 'successor (ReCAPTCHA)', |
recaptcha => 'successor (ReCAPTCHA)', |
notused => 'unused', |
notused => 'unused', |
ver => 'ReCAPTCHA version (1 or 2)', |
ver => 'ReCAPTCHA version (1 or 2)', |
); |
); |
} |
} |
|
|