'.$domservers{$lonhost}.' '.
' '.
&mt('Yes').' '.
''.
- ''.&mt('SSO').' '.
- ''.&mt('Non-SSO').' '.
+ ' '.
+ ''.
' ';
@@ -1705,6 +1755,7 @@ sub login_choices {
current => "Current",
samllanding => "Dual login?",
samloptions => "Options",
+ alttext => "Alt text",
);
return %choices;
}
@@ -1893,8 +1944,11 @@ sub commblocktype_text {
'printout' => 'Printouts',
'passwd' => 'Change Password',
'grades' => 'Gradebook',
+ 'search' => 'Course search',
+ 'wishlist' => 'Stored links',
+ 'annotate' => 'Annotations',
);
- my $typeorder = ['com','chat','boards','port','groups','blogs','about','printout','grades','passwd'];
+ my $typeorder = ['com','chat','boards','port','groups','blogs','about','wishlist','printout','grades','search','annotate','passwd'];
return ($typeorder,\%types);
}
@@ -2047,7 +2101,7 @@ sub display_color_options {
$css_class = $itemcount%2?' class="LC_odd_row"':'';
$datatable .= ''.
''.$choices->{$img};
- my ($imgfile,$img_import,$login_hdr_pick,$logincolors);
+ my ($imgfile,$img_import,$login_hdr_pick,$logincolors,$alttext);
if ($role eq 'login') {
if ($img eq 'login') {
$login_hdr_pick =
@@ -2055,8 +2109,13 @@ sub display_color_options {
$logincolors =
&login_text_colors($img,$role,$logintext,$phase,$choices,
$designs,$defaults);
- } elsif ($img ne 'domlogo') {
- $datatable.= &logo_display_options($img,$defaults,$designs);
+ } else {
+ if ($img ne 'domlogo') {
+ $datatable.= &logo_display_options($img,$defaults,$designs);
+ }
+ if (ref($designs->{'alttext'}) eq 'HASH') {
+ $alttext = $designs->{'alttext'}{$img};
+ }
}
}
$datatable .= ' ';
@@ -2148,6 +2207,11 @@ sub display_color_options {
$datatable .=' ';
}
}
+ if (($role eq 'login') && ($img ne 'login')) {
+ $datatable .= (' ' x2).' '.$choices->{'alttext'}.':'.
+ ' '.
+ ' ';
+ }
$datatable .= ' ';
}
$itemcount ++;
@@ -2319,7 +2383,7 @@ sub print_quotas {
@options = ('norequest','approval','automatic');
%titles = &authorrequest_titles();
} else {
- @usertools = ('aboutme','blog','webdav','portfolio');
+ @usertools = ('aboutme','blog','webdav','portfolio','timezone');
%titles = &tool_titles();
}
if (ref($types) eq 'ARRAY') {
@@ -2423,9 +2487,12 @@ sub print_quotas {
}
} else {
my $checked = 'checked="checked" ';
+ if ($item eq 'timezone') {
+ $checked = '';
+ }
if (ref($settings) eq 'HASH') {
if (ref($settings->{$item}) eq 'HASH') {
- if ($settings->{$item}->{$type} == 0) {
+ if (!$settings->{$item}->{$type}) {
$checked = '';
} elsif ($settings->{$item}->{$type} == 1) {
$checked = 'checked="checked" ';
@@ -3362,8 +3429,8 @@ ENDSCRIPT
sub lti_javascript {
- my ($settings) = @_;
- my $togglejs = <i_toggle_js();
+ my ($dom,$settings) = @_;
+ my $togglejs = <i_toggle_js($dom);
unless (ref($settings) eq 'HASH') {
return $togglejs;
}
@@ -3383,6 +3450,7 @@ sub lti_javascript {
push(@jsarray,$ordered{$item});
}
my $jstext = ' var lti = Array('."'".join("','",@jsarray)."'".');'."\n";
+ my $linkprot_js = &Apache::courseprefs::linkprot_javascript();
return <<"ENDSCRIPT";
@@ -3436,12 +3507,17 @@ ENDSCRIPT
}
sub lti_toggle_js {
+ my ($dom) = @_;
my %lcauthparmtext = &Apache::lonlocal::texthash (
localauth => 'Local auth argument',
krb => 'Kerberos domain',
);
my $crsincalert = &mt('"User\'s identity sent" needs to be set to "Yes" first,[_1] before setting "Course\'s identity sent" to "Yes"',"\n");
&js_escape(\$crsincalert);
+ my %servers = &Apache::lonnet::get_servers($dom,'library');
+ my $primary = &Apache::lonnet::domain($dom,'primary');
+ my $course_servers = "'".join("','",keys(%servers))."'";
+
return <<"ENDSCRIPT";
@@ -3685,6 +3880,41 @@ function toggleLastActiveDays(form) {
ENDSCRIPT
}
+sub autoenroll_javascript {
+ return <<"ENDSCRIPT";
+
+
+ENDSCRIPT
+}
+
sub saml_javascript {
return <<"ENDSCRIPT";
+
+ENDSCRIPT
+ } else {
+return <<"ENDSCRIPT";
+
@@ -11066,17 +11599,27 @@ ENDSCRIPT
}
sub passwords_javascript {
- my %intalert = &Apache::lonlocal::texthash (
- authcheck => 'Warning: disallowing login for an authenticated user if the stored cost is less than the default will require a password reset by/for the user.',
- authcost => 'Warning: bcrypt encryption cost for internal authentication must be an integer.',
- passmin => 'Warning: minimum password length must be a positive integer greater than 6.',
- passmax => 'Warning: maximum password length must be a positive integer (or blank).',
- passexp => 'Warning: days before password expiration must be a positive integer (or blank).',
- passnum => 'Warning: number of previous passwords to save must be a positive integer (or blank).',
- );
+ my ($prefix) = @_;
+ my %intalert;
+ if ($prefix eq 'passwords') {
+ %intalert = &Apache::lonlocal::texthash (
+ authcheck => 'Warning: disallowing login for an authenticated user if the stored cost is less than the default will require a password reset by/for the user.',
+ authcost => 'Warning: bcrypt encryption cost for internal authentication must be an integer.',
+ passmin => 'Warning: minimum password length must be a positive integer greater than 6.',
+ passmax => 'Warning: maximum password length must be a positive integer (or blank).',
+ passexp => 'Warning: days before password expiration must be a positive integer (or blank).',
+ passnum => 'Warning: number of previous passwords to save must be a positive integer (or blank).',
+ );
+ } elsif ($prefix eq 'secrets') {
+ %intalert = &Apache::lonlocal::texthash (
+ passmin => 'Warning: minimum secret length must be a positive integer greater than 6.',
+ passmax => 'Warning: maximum secret length must be a positive integer (or blank).',
+ );
+ }
&js_escape(\%intalert);
my $defmin = $Apache::lonnet::passwdmin;
- my $intauthjs = <<"ENDSCRIPT";
+ my $intauthjs;
+ if ($prefix eq 'passwords') { $intauthjs = <<"ENDSCRIPT";
function warnIntAuth(field) {
if (field.name == 'intauth_check') {
@@ -11096,11 +11639,17 @@ function warnIntAuth(field) {
return;
}
-function warnIntPass(field) {
+ENDSCRIPT
+
+ }
+
+ $intauthjs .= <<"ENDSCRIPT";
+
+function warnInt$prefix(field) {
field.value.replace(/^\s+/,'');
field.value.replace(/\s+\$/,'');
var regexdigit=/^\\d+\$/;
- if (field.name == 'passwords_min') {
+ if (field.name == '${prefix}_min') {
if (field.value == '') {
alert('$intalert{passmin}');
field.value = '$defmin';
@@ -11120,7 +11669,7 @@ function warnIntPass(field) {
field.value = '';
}
if (field.value != '') {
- if (field.name == 'passwords_expire') {
+ if (field.name == '${prefix}_expire') {
var regexpposnum=/^\\d+(|\\.\\d*)\$/;
if (!regexpposnum.test(field.value)) {
alert('$intalert{passexp}');
@@ -11134,10 +11683,10 @@ function warnIntPass(field) {
}
} else {
if (!regexdigit.test(field.value)) {
- if (field.name == 'passwords_max') {
+ if (field.name == '${prefix}_max') {
alert('$intalert{passmax}');
} else {
- if (field.name == 'passwords_numsaved') {
+ if (field.name == '${prefix}_numsaved') {
alert('$intalert{passnum}');
}
}
@@ -11768,7 +12317,7 @@ sub modify_login {
my ($r,$dom,$confname,$lastactref,%domconfig) = @_;
my ($resulttext,$errors,$colchgtext,%changes,%colchanges,%newfile,%newurl,
%curr_loginvia,%loginhash,@currlangs,@newlangs,$addedfile,%title,@offon,
- %currsaml,%saml,%samltext,%samlimg,%samlalt,%samlurl,%samltitle,%samlnotsso);
+ %currsaml,%saml,%samltext,%samlimg,%samlalt,%samlurl,%samltitle,%samlwindow,%samlnotsso);
%title = ( coursecatalog => 'Display course catalog',
adminmail => 'Display administrator E-mail address',
helpdesk => 'Display "Contact Helpdesk" link',
@@ -11792,6 +12341,7 @@ sub modify_login {
$samlalt{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'alt'};
$samlimg{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'img'};
$samltitle{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'title'};
+ $samlwindow{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'window'};
$samlnotsso{$lonhost} = $domconfig{login}{'saml'}{$lonhost}{'notsso'};
}
}
@@ -12049,10 +12599,13 @@ sub modify_login {
if ($env{'form.saml_img_'.$lonhost.'.filename'}) {
push(@newsamlimgs,$lonhost);
}
- foreach my $item ('text','alt','url','title','notsso') {
+ foreach my $item ('text','alt','url','title','window','notsso') {
$env{'form.saml_'.$item.'_'.$lonhost} =~ s/^\s+|\s+$//g;
}
if ($saml{$lonhost}) {
+ if ($env{'form.saml_window_'.$lonhost} ne '1') {
+ $env{'form.saml_window_'.$lonhost} = '';
+ }
if (grep(/^\Q$lonhost\E$/,@delsamlimg)) {
#FIXME Need to obsolete published image
delete($currsaml{$lonhost}{'img'});
@@ -12070,13 +12623,16 @@ sub modify_login {
if ($env{'form.saml_title_'.$lonhost} ne $samltitle{$lonhost}) {
$changes{'saml'}{$lonhost} = 1;
}
+ if ($env{'form.saml_window_'.$lonhost} ne $samlwindow{$lonhost}) {
+ $changes{'saml'}{$lonhost} = 1;
+ }
if ($env{'form.saml_notsso_'.$lonhost} ne $samlnotsso{$lonhost}) {
$changes{'saml'}{$lonhost} = 1;
}
} else {
$changes{'saml'}{$lonhost} = 1;
}
- foreach my $item ('text','alt','url','title','notsso') {
+ foreach my $item ('text','alt','url','title','window','notsso') {
$currsaml{$lonhost}{$item} = $env{'form.saml_'.$item.'_'.$lonhost};
}
} else {
@@ -12277,19 +12833,22 @@ sub modify_login {
alt => 'Alt text for button image',
url => 'SSO URL',
title => 'Tooltip for SSO link',
+ window => 'Pop-up window if iframe',
notsso => 'Text for non-SSO log-in',
);
foreach my $lonhost (sort(keys(%{$changes{$item}}))) {
if (ref($currsaml{$lonhost}) eq 'HASH') {
$resulttext .= ''.&mt("$title{$item} in use for [_1]","$lonhost ").
'';
- foreach my $key ('text','img','alt','url','title','notsso') {
+ foreach my $key ('text','img','alt','url','title','window','notsso') {
if ($currsaml{$lonhost}{$key} eq '') {
$resulttext .= ''.&mt("$notlt{$key} not in use").' ';
} else {
my $value = "'$currsaml{$lonhost}{$key}'";
if ($key eq 'img') {
$value = ' ';
+ } elsif ($key eq 'window') {
+ $value = 'On';
}
$resulttext .= ''.&mt("$notlt{$key} set to: [_1]",
$value).' ';
@@ -12620,8 +13179,10 @@ sub modify_ipaccess {
} else {
$resulttext .= ''.&mt('No courses allowed').' ';
}
+ $resulttext .= ' ';
}
}
+ $resulttext .= '';
} else {
$errors .= ''.&mt('Failed to save changes').' ';
}
@@ -12785,13 +13346,18 @@ sub modify_colors {
$domconfig->{$role} = {};
}
foreach my $img (@images) {
- if (($role eq 'login') && (($img eq 'img') || ($img eq 'logo'))) {
- if (defined($env{'form.login_showlogo_'.$img})) {
- $confhash->{$role}{'showlogo'}{$img} = 1;
- } else {
- $confhash->{$role}{'showlogo'}{$img} = 0;
+ if ($role eq 'login') {
+ if (($img eq 'img') || ($img eq 'logo')) {
+ if (defined($env{'form.login_showlogo_'.$img})) {
+ $confhash->{$role}{'showlogo'}{$img} = 1;
+ } else {
+ $confhash->{$role}{'showlogo'}{$img} = 0;
+ }
}
- }
+ if ($env{'form.login_alt_'.$img} ne '') {
+ $confhash->{$role}{'alttext'}{$img} = $env{'form.login_alt_'.$img};
+ }
+ }
if ( ! $env{'form.'.$role.'_'.$img.'.filename'}
&& !defined($domconfig->{$role}{$img})
&& !$env{'form.'.$role.'_del_'.$img}
@@ -12866,15 +13432,29 @@ sub modify_colors {
$changes{$role}{'images'}{$img} = 1;
}
}
- if (($role eq 'login') && (($img eq 'logo') || ($img eq 'img'))) {
- if (ref($domconfig->{'login'}{'showlogo'}) eq 'HASH') {
- if ($confhash->{$role}{'showlogo'}{$img} ne
- $domconfig->{$role}{'showlogo'}{$img}) {
- $changes{$role}{'showlogo'}{$img} = 1;
+ if ($role eq 'login') {
+ if (($img eq 'logo') || ($img eq 'img')) {
+ if (ref($domconfig->{'login'}{'showlogo'}) eq 'HASH') {
+ if ($confhash->{$role}{'showlogo'}{$img} ne
+ $domconfig->{$role}{'showlogo'}{$img}) {
+ $changes{$role}{'showlogo'}{$img} = 1;
+ }
+ } else {
+ if ($confhash->{$role}{'showlogo'}{$img} == 0) {
+ $changes{$role}{'showlogo'}{$img} = 1;
+ }
}
- } else {
- if ($confhash->{$role}{'showlogo'}{$img} == 0) {
- $changes{$role}{'showlogo'}{$img} = 1;
+ }
+ if ($img ne 'login') {
+ if (ref($domconfig->{$role}{'alttext'}) eq 'HASH') {
+ if ($confhash->{$role}{'alttext'}{$img} ne
+ $domconfig->{$role}{'alttext'}{$img}) {
+ $changes{$role}{'alttext'}{$img} = 1;
+ }
+ } else {
+ if ($confhash->{$role}{'alttext'}{$img} ne '') {
+ $changes{$role}{'alttext'}{$img} = 1;
+ }
}
}
}
@@ -12985,6 +13565,11 @@ sub default_change_checker {
if ($confhash->{$role}{'showlogo'}{$img} == 0) {
$changes->{$role}{'showlogo'}{$img} = 1;
}
+ if (ref($confhash->{$role}{'alttext'}) eq 'HASH') {
+ if ($confhash->{$role}{'alttext'}{$img} ne '') {
+ $changes->{$role}{'alttext'}{$img} = 1;
+ }
+ }
}
}
if ($confhash->{$role}{'font'}) {
@@ -13023,6 +13608,13 @@ sub display_colorchgs {
} else {
$resulttext .= ''.&mt("$choices{$item} set to not be displayed").' ';
}
+ } elsif (($role eq 'login') && ($key eq 'alttext')) {
+ if ($confhash->{$role}{$key}{$item} ne '') {
+ $resulttext .= ''.&mt("$choices{$key} for $choices{$item} set to [_1].",
+ $confhash->{$role}{$key}{$item}).' ';
+ } else {
+ $resulttext .= ''.&mt("$choices{$key} for $choices{$item} deleted.").' ';
+ }
} elsif ($confhash->{$role}{$item} eq '') {
$resulttext .= ''.&mt("$choices{$item} set to default").' ';
} else {
@@ -13421,7 +14013,7 @@ sub modify_quotas {
@usertools = ('author');
%titles = &authorrequest_titles();
} else {
- @usertools = ('aboutme','blog','webdav','portfolio');
+ @usertools = ('aboutme','blog','webdav','portfolio','timezone');
%titles = &tool_titles();
}
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom,1);
@@ -15338,6 +15930,137 @@ sub modify_lti {
my %menutitles = <imenu_titles();
+ my (%currltisec,%secchanges,%newltisec,%newltienc,%keyset,%newkeyset);
+ $newltisec{'private'}{'keys'} = [];
+ $newltisec{'encrypt'} = {};
+ $newltisec{'rules'} = {};
+ $newltisec{'linkprot'} = {};
+ if (ref($domconfig{'ltisec'}) eq 'HASH') {
+ %currltisec = %{$domconfig{'ltisec'}};
+ if (ref($currltisec{'linkprot'}) eq 'HASH') {
+ foreach my $id (keys(%{$currltisec{'linkprot'}})) {
+ unless ($id =~ /^\d+$/) {
+ delete($currltisec{'linkprot'}{$id});
+ }
+ }
+ }
+ if (ref($currltisec{'private'}) eq 'HASH') {
+ if (ref($currltisec{'private'}{'keys'}) eq 'ARRAY') {
+ $newltisec{'private'}{'keys'} = $currltisec{'private'}{'keys'};
+ map { $keyset{$_} = 1; } @{$currltisec{'private'}{'keys'}};
+ }
+ }
+ }
+ foreach my $item ('crs','dom','consumers') {
+ my $formelement;
+ if ($item eq 'consumers') {
+ $formelement = 'form.ltisec_'.$item;
+ } else {
+ $formelement = 'form.ltisec_'.$item.'linkprot';
+ }
+ if ($env{$formelement}) {
+ $newltisec{'encrypt'}{$item} = 1;
+ if (ref($currltisec{'encrypt'}) eq 'HASH') {
+ unless ($currltisec{'encrypt'}{$item}) {
+ $secchanges{'encrypt'} = 1;
+ }
+ } else {
+ $secchanges{'encrypt'} = 1;
+ }
+ } elsif (ref($currltisec{'encrypt'}) eq 'HASH') {
+ if ($currltisec{'encrypt'}{$item}) {
+ $secchanges{'encrypt'} = 1;
+ }
+ }
+ }
+ unless (exists($currltisec{'rules'})) {
+ $currltisec{'rules'} = {};
+ }
+ &password_rule_changes('secrets',$newltisec{'rules'},$currltisec{'rules'},\%secchanges);
+
+ my @ids=&Apache::lonnet::current_machine_ids();
+ my %servers = &Apache::lonnet::get_servers($dom,'library');
+
+ foreach my $hostid (keys(%servers)) {
+ if (($hostid ne '') && (grep(/^\Q$hostid\E$/,@ids))) {
+ my $newkey;
+ my $keyitem = 'form.ltisec_privkey_'.$hostid;
+ if (exists($env{$keyitem})) {
+ $env{$keyitem} =~ s/(`)/'/g;
+ if ($keyset{$hostid}) {
+ if ($env{'form.ltisec_changeprivkey_'.$hostid}) {
+ if ($env{$keyitem} ne '') {
+ $secchanges{'private'} = 1;
+ $newkeyset{$hostid} = $env{$keyitem};
+ }
+ }
+ } elsif ($env{$keyitem} ne '') {
+ unless (grep(/^\Q$hostid\E$/,@{$newltisec{'private'}{'keys'}})) {
+ push(@{$newltisec{'private'}{'keys'}},$hostid);
+ }
+ $secchanges{'private'} = 1;
+ $newkeyset{$hostid} = $env{$keyitem};
+ }
+ }
+ }
+ }
+
+ my (%linkprotchg,$linkprotoutput,$is_home);
+ my $proterror = &Apache::courseprefs::process_linkprot($dom,'',$currltisec{'linkprot'},
+ \%linkprotchg,'domain');
+ my $home = &Apache::lonnet::domain($dom,'primary');
+ unless (($home eq 'no_host') || ($home eq '')) {
+ my @ids=&Apache::lonnet::current_machine_ids();
+ foreach my $id (@ids) { if ($id eq $home) { $is_home=1; } }
+ }
+
+ if (keys(%linkprotchg)) {
+ $secchanges{'linkprot'} = 1;
+ my %oldlinkprot;
+ if (ref($currltisec{'linkprot'}) eq 'HASH') {
+ %oldlinkprot = %{$currltisec{'linkprot'}};
+ }
+ foreach my $id (keys(%linkprotchg)) {
+ if (ref($linkprotchg{$id}) eq 'HASH') {
+ foreach my $inner (keys(%{$linkprotchg{$id}})) {
+ if (($inner eq 'secret') || ($inner eq 'key')) {
+ if ($is_home) {
+ $newltienc{$id}{$inner} = $linkprotchg{$id}{$inner};
+ }
+ }
+ }
+ } else {
+ $newltisec{'linkprot'}{$id} = $linkprotchg{$id};
+ }
+ }
+ $linkprotoutput = &Apache::courseprefs::store_linkprot($dom,'','domain',\%linkprotchg,\%oldlinkprot);
+ if (keys(%linkprotchg)) {
+ %{$newltisec{'linkprot'}} = %linkprotchg;
+ }
+ }
+ if (ref($currltisec{'linkprot'}) eq 'HASH') {
+ foreach my $id (%{$currltisec{'linkprot'}}) {
+ next if ($id !~ /^\d+$/);
+ unless (exists($linkprotchg{$id})) {
+ if (ref($currltisec{'linkprot'}{$id}) eq 'HASH') {
+ foreach my $inner (keys(%{$currltisec{'linkprot'}{$id}})) {
+ if (($inner eq 'secret') || ($inner eq 'key')) {
+ if ($is_home) {
+ $newltienc{$id}{$inner} = $currltisec{'linkprot'}{$id}{$inner};
+ }
+ } else {
+ $newltisec{'linkprot'}{$id}{$inner} = $currltisec{'linkprot'}{$id}{$inner};
+ }
+ }
+ } else {
+ $newltisec{'linkprot'}{$id} = $currltisec{'linkprot'}{$id};
+ }
+ }
+ }
+ }
+ if ($proterror) {
+ $errors .= ''.$proterror.' ';
+ }
my (@items,%deletions,%itemids);
if ($env{'form.lti_add'}) {
my $consumer = $env{'form.lti_consumer_add'};
@@ -15403,14 +16126,14 @@ sub modify_lti {
}
if ($confhash{$itemid}{'requser'}) {
if ($env{'form.lti_mapuser_'.$idx} eq 'sourcedid') {
- $confhash{$itemid}{'mapuser'} = 'lis_person_sourcedid';
+ $confhash{$itemid}{'mapuser'} = 'lis_person_sourcedid';
} elsif ($env{'form.lti_mapuser_'.$idx} eq 'email') {
$confhash{$itemid}{'mapuser'} = 'lis_person_contact_email_primary';
} elsif ($env{'form.lti_mapuser_'.$idx} eq 'other') {
my $mapuser = $env{'form.lti_customuser_'.$idx};
$mapuser =~ s/(`)/'/g;
- $mapuser =~ s/^\s+|\s+$//g;
- $confhash{$itemid}{'mapuser'} = $mapuser;
+ $mapuser =~ s/^\s+|\s+$//g;
+ $confhash{$itemid}{'mapuser'} = $mapuser;
}
my @possmakeuser = &Apache::loncommon::get_env_multiple('form.lti_makeuser_'.$idx);
my @makeuser;
@@ -15641,15 +16364,121 @@ sub modify_lti {
}
}
my %ltihash = (
- $action => { %confhash }
- );
- my $putresult = &Apache::lonnet::put_dom('configuration',\%ltihash,
- $dom);
+ $action => { %confhash }
+ );
+ my %ltienchash = (
+ $action => { %encconfig }
+ );
+ if (keys(%secchanges)) {
+ $ltihash{'ltisec'} = \%newltisec;
+ if ($secchanges{'linkprot'}) {
+ if ($is_home) {
+ $ltienchash{'linkprot'} = \%newltienc;
+ }
+ }
+ }
+ my $putresult = &Apache::lonnet::put_dom('configuration',\%ltihash,$dom);
if ($putresult eq 'ok') {
- my %ltienchash = (
- $action => { %encconfig }
- );
+ my %keystore;
+ if (keys(%secchanges)) {
+ if ($secchanges{'private'}) {
+ my $who = &escape($env{'user.name'}.':'.$env{'user.domain'});
+ foreach my $hostid (keys(%newkeyset)) {
+ my $storehash = {
+ key => $newkeyset{$hostid},
+ who => $env{'user.name'}.':'.$env{'user.domain'},
+ };
+ $keystore{$hostid} = &Apache::lonnet::store_dom($storehash,'lti','private',
+ $dom,$hostid);
+ }
+ }
+ if (ref($lastactref) eq 'HASH') {
+ if (($secchanges{'encrypt'}) || ($secchanges{'private'})) {
+ $lastactref->{'domdefaults'} = 1;
+ }
+ }
+ }
&Apache::lonnet::put_dom('encconfig',\%ltienchash,$dom,undef,1);
+ if ((keys(%changes) == 0) && (keys(%secchanges) == 0)) {
+ return &mt('No changes made.');
+ }
+ $resulttext = &mt('Changes made:').'';
+ if (keys(%secchanges) > 0) {
+ foreach my $item (keys(%secchanges)) {
+ if ($item eq 'encrypt') {
+ my %encrypted = (
+ crs => {
+ on => &mt('Encryption of stored link protection secrets defined in courses enabled'),
+ off => &mt('Encryption of stored link protection secrets defined in courses disabled'),
+ },
+ dom => {
+ on => &mt('Encryption of stored link protection secrets defined in domain enabled'),
+ off => &mt('Encryption of stored link protection secrets defined in domain disabled'),
+ },
+ consumers => {
+ on => &mt('Encryption of stored consumer secrets defined in domain enabled'),
+ off => &mt('Encryption of stored consumer secrets defined in domain disabled'),
+ },
+ );
+ foreach my $type ('crs','dom','consumers') {
+ my $shown = $encrypted{$type}{'off'};
+ if (ref($newltisec{$item}) eq 'HASH') {
+ if ($newltisec{$item}{$type}) {
+ $shown = $encrypted{$type}{'on'};
+ }
+ }
+ $resulttext .= ''.$shown.' ';
+ }
+ } elsif ($item eq 'rules') {
+ my %titles = &Apache::lonlocal::texthash(
+ min => 'Minimum password length',
+ max => 'Maximum password length',
+ chars => 'Required characters',
+ );
+ foreach my $rule ('min','max') {
+ if ($newltisec{rules}{$rule} eq '') {
+ if ($rule eq 'min') {
+ $resulttext .= ''.&mt('[_1] not set.',$titles{$rule});
+ ' '.&mt('Default of [_1] will be used',
+ $Apache::lonnet::passwdmin).' ';
+ } else {
+ $resulttext .= ''.&mt('[_1] set to none',$titles{$rule}).' ';
+ }
+ } else {
+ $resulttext .= ''.&mt('[_1] set to [_2]',$titles{$rule},$newltisec{rules}{$rule}).' ';
+ }
+ }
+ if (ref($newltisec{'rules'}{'chars'}) eq 'ARRAY') {
+ if (@{$newltisec{'rules'}{'chars'}} > 0) {
+ my %rulenames = &Apache::lonlocal::texthash(
+ uc => 'At least one upper case letter',
+ lc => 'At least one lower case letter',
+ num => 'At least one number',
+ spec => 'At least one non-alphanumeric',
+ );
+ my $needed = ''.
+ join(' ',map {$rulenames{$_} } @{$newltisec{'rules'}{'chars'}}).
+ ' ';
+ $resulttext .= ''.&mt('[_1] set to: [_2]',$titles{'chars'},$needed).' ';
+ } else {
+ $resulttext .= ''.&mt('[_1] set to none',$titles{'chars'}).' ';
+ }
+ } else {
+ $resulttext .= ''.&mt('[_1] set to none',$titles{'chars'}).' ';
+ }
+ } elsif ($item eq 'private') {
+ if (keys(%newkeyset)) {
+ foreach my $hostid (sort(keys(%newkeyset))) {
+ if ($keystore{$hostid} eq 'ok') {
+ $resulttext .= ''.&mt('Encryption key for storage of shared secrets saved for [_1]',$hostid).' ';
+ }
+ }
+ }
+ } elsif ($item eq 'linkprot') {
+ $resulttext .= $linkprotoutput;
+ }
+ }
+ }
if (keys(%changes) > 0) {
my $cachetime = 24*60*60;
my %ltiall = %confhash;
@@ -15664,7 +16493,6 @@ sub modify_lti {
if (ref($lastactref) eq 'HASH') {
$lastactref->{'lti'} = 1;
}
- $resulttext = &mt('Changes made:').'';
my %bynum;
foreach my $itemid (sort(keys(%changes))) {
my $position = $confhash{$itemid}{'order'};
@@ -15841,10 +16669,8 @@ sub modify_lti {
$resulttext .= ' ';
}
}
- $resulttext .= ' ';
- } else {
- $resulttext = &mt('No changes made.');
}
+ $resulttext .= '';
} else {
$errors .= ''.&mt('Failed to save changes').' ';
}
@@ -15911,7 +16737,7 @@ sub modify_autoenroll {
my %title = ( run => 'Auto-enrollment active',
sender => 'Sender for notification messages',
coowners => 'Automatic assignment of co-ownership to instructors of record (institutional data)',
- failsafe => 'Failsafe for no drops if institutional data missing for a section');
+ autofailsafe => 'Failsafe for no drops if institutional data missing for a section');
my @offon = ('off','on');
my $sender_uname = $env{'form.sender_uname'};
my $sender_domain = $env{'form.sender_domain'};
@@ -15921,17 +16747,23 @@ sub modify_autoenroll {
$sender_domain = '';
}
my $coowners = $env{'form.autoassign_coowners'};
+ my $autofailsafe = $env{'form.autoenroll_autofailsafe'};
+ $autofailsafe =~ s{^\s+|\s+$}{}g;
+ if ($autofailsafe =~ /\D/) {
+ undef($autofailsafe);
+ }
my $failsafe = $env{'form.autoenroll_failsafe'};
- $failsafe =~ s{^\s+|\s+$}{}g;
- if ($failsafe =~ /\D/) {
- undef($failsafe);
+ unless (($failsafe eq 'zero') || ($failsafe eq 'any')) {
+ $failsafe = 'off';
+ undef($autofailsafe);
}
my %autoenrollhash = (
autoenroll => { 'run' => $env{'form.autoenroll_run'},
'sender_uname' => $sender_uname,
'sender_domain' => $sender_domain,
'co-owners' => $coowners,
- 'autofailsafe' => $failsafe,
+ 'autofailsafe' => $autofailsafe,
+ 'failsafe' => $failsafe,
}
);
my $putresult = &Apache::lonnet::put_dom('configuration',\%autoenrollhash,
@@ -15959,9 +16791,12 @@ sub modify_autoenroll {
} elsif ($coowners) {
$changes{'coowners'} = 1;
}
- if ($currautoenroll{'autofailsafe'} ne $failsafe) {
+ if ($currautoenroll{'autofailsafe'} ne $autofailsafe) {
$changes{'autofailsafe'} = 1;
}
+ if ($currautoenroll{'failsafe'} ne $failsafe) {
+ $changes{'failsafe'} = 1;
+ }
if (keys(%changes) > 0) {
$resulttext = &mt('Changes made:').'';
if ($changes{'run'}) {
@@ -15982,11 +16817,24 @@ sub modify_autoenroll {
}
}
if ($changes{'autofailsafe'}) {
- if ($failsafe ne '') {
- $resulttext .= ''.&mt('Failsafe for no drops if institutional data missing for a section set to: [_1]',$failsafe).' ';
+ if ($autofailsafe ne '') {
+ $resulttext .= ''.&mt('Failsafe for no drops if institutional data missing for a section set to: [_1]',$autofailsafe).' ';
} else {
- $resulttext .= ''.&mt('Failsafe for no drops if institutional data missing for a section: deleted');
+ $resulttext .= ' '.&mt('Failsafe for no drops if institutional data missing for a section not in use').' ';
}
+ }
+ if ($changes{'failsafe'}) {
+ if ($failsafe eq 'off') {
+ unless ($changes{'autofailsafe'}) {
+ $resulttext .= ''.&mt('Failsafe for no drops if institutional data missing for a section not in use').' ';
+ }
+ } elsif ($failsafe eq 'zero') {
+ $resulttext .= ''.&mt('Failsafe applies if retrieved section enrollment is zero').' ';
+ } else {
+ $resulttext .= ''.&mt('Failsafe applies if retrieved section enrollment is zero or greater').' ';
+ }
+ }
+ if (($changes{'autofailsafe'}) || ($changes{'failsafe'})) {
&Apache::lonnet::get_domain_defaults($dom,1);
if (ref($lastactref) eq 'HASH') {
$lastactref->{'domdefaults'} = 1;
@@ -17102,7 +17950,7 @@ sub modify_privacy {
domain => 'Assigned domain role(s)',
author => 'Assigned co-author role(s)',
course => 'Assigned course role(s)',
- community => 'Assigned community role',
+ community => 'Assigned community role(s)',
);
my %roles = &Apache::lonlocal::texthash (
domain => 'Domain role',
@@ -17146,7 +17994,7 @@ sub modify_privacy {
);
foreach my $item (@items) {
if (@instdoms > 1) {
- if ($env{'form.privacy_approval_instdom'.$item} =~ /^(none|user|domain|auto)$/) {
+ if ($env{'form.privacy_approval_instdom_'.$item} =~ /^(none|user|domain|auto)$/) {
$privacyhash{'approval'}{'instdom'}{$item} = $env{'form.privacy_approval_instdom_'.$item};
}
if (ref($current{'approval'}) eq 'HASH') {
@@ -17548,61 +18396,7 @@ sub modify_passwords {
$updatedefaults = 1;
}
}
- foreach my $rule ('min','max','expire','numsaved') {
- $env{'form.passwords_'.$rule} =~ s/^\s+|\s+$//g;
- my $ruleok;
- if ($rule eq 'expire') {
- if (($env{'form.passwords_'.$rule} =~ /^\d+(|\.\d*)$/) &&
- ($env{'form.passwords_'.$rule} ne '0')) {
- $ruleok = 1;
- }
- } elsif ($rule eq 'min') {
- if ($env{'form.passwords_'.$rule} =~ /^\d+$/) {
- if ($env{'form.passwords_'.$rule} >= $Apache::lonnet::passwdmin) {
- $ruleok = 1;
- }
- }
- } elsif (($env{'form.passwords_'.$rule} =~ /^\d+$/) &&
- ($env{'form.passwords_'.$rule} ne '0')) {
- $ruleok = 1;
- }
- if ($ruleok) {
- $newvalues{$rule} = $env{'form.passwords_'.$rule};
- if (exists($current{$rule})) {
- if ($newvalues{$rule} ne $current{$rule}) {
- $changes{'rules'} = 1;
- }
- } elsif ($rule eq 'min') {
- if ($staticdefaults{$rule} ne $newvalues{$rule}) {
- $changes{'rules'} = 1;
- }
- } else {
- $changes{'rules'} = 1;
- }
- } elsif (exists($current{$rule})) {
- $changes{'rules'} = 1;
- }
- }
- my @posschars = &Apache::loncommon::get_env_multiple('form.passwords_chars');
- my @chars;
- foreach my $item (sort(@posschars)) {
- if ($item =~ /^(uc|lc|num|spec)$/) {
- push(@chars,$item);
- }
- }
- $newvalues{'chars'} = \@chars;
- unless ($changes{'rules'}) {
- if (ref($current{'chars'}) eq 'ARRAY') {
- my @diffs = &Apache::loncommon::compare_arrays($current{'chars'},\@chars);
- if (@diffs > 0) {
- $changes{'rules'} = 1;
- }
- } else {
- if (@chars > 0) {
- $changes{'rules'} = 1;
- }
- }
- }
+ &password_rule_changes('passwords',\%newvalues,\%current,\%changes);
my %crsownerchg = (
by => [],
for => [],
@@ -17862,6 +18656,76 @@ sub modify_passwords {
return $resulttext;
}
+sub password_rule_changes {
+ my ($prefix,$newvalues,$current,$changes) = @_;
+ return unless ((ref($newvalues) eq 'HASH') &&
+ (ref($current) eq 'HASH') &&
+ (ref($changes) eq 'HASH'));
+ my (@rules,%staticdefaults);
+ if ($prefix eq 'passwords') {
+ @rules = ('min','max','expire','numsaved');
+ } elsif ($prefix eq 'secrets') {
+ @rules = ('min','max');
+ }
+ $staticdefaults{'min'} = $Apache::lonnet::passwdmin;
+ foreach my $rule (@rules) {
+ $env{'form.'.$prefix.'_'.$rule} =~ s/^\s+|\s+$//g;
+ my $ruleok;
+ if ($rule eq 'expire') {
+ if (($env{'form.'.$prefix.'_'.$rule} =~ /^\d+(|\.\d*)$/) &&
+ ($env{'form.'.$prefix.'_'.$rule} ne '0')) {
+ $ruleok = 1;
+ }
+ } elsif ($rule eq 'min') {
+ if ($env{'form.'.$prefix.'_'.$rule} =~ /^\d+$/) {
+ if ($env{'form.'.$prefix.'_'.$rule} >= $staticdefaults{$rule}) {
+ $ruleok = 1;
+ }
+ }
+ } elsif (($env{'form.'.$prefix.'_'.$rule} =~ /^\d+$/) &&
+ ($env{'form.'.$prefix.'_'.$rule} ne '0')) {
+ $ruleok = 1;
+ }
+ if ($ruleok) {
+ $newvalues->{$rule} = $env{'form.'.$prefix.'_'.$rule};
+ if (exists($current->{$rule})) {
+ if ($newvalues->{$rule} ne $current->{$rule}) {
+ $changes->{'rules'} = 1;
+ }
+ } elsif ($rule eq 'min') {
+ if ($staticdefaults{$rule} ne $newvalues->{$rule}) {
+ $changes->{'rules'} = 1;
+ }
+ } else {
+ $changes->{'rules'} = 1;
+ }
+ } elsif (exists($current->{$rule})) {
+ $changes->{'rules'} = 1;
+ }
+ }
+ my @posschars = &Apache::loncommon::get_env_multiple('form.'.$prefix.'_chars');
+ my @chars;
+ foreach my $item (sort(@posschars)) {
+ if ($item =~ /^(uc|lc|num|spec)$/) {
+ push(@chars,$item);
+ }
+ }
+ $newvalues->{'chars'} = \@chars;
+ unless ($changes->{'rules'}) {
+ if (ref($current->{'chars'}) eq 'ARRAY') {
+ my @diffs = &Apache::loncommon::compare_arrays($current->{'chars'},\@chars);
+ if (@diffs > 0) {
+ $changes->{'rules'} = 1;
+ }
+ } else {
+ if (@chars > 0) {
+ $changes->{'rules'} = 1;
+ }
+ }
+ }
+ return;
+}
+
sub modify_usercreation {
my ($dom,%domconfig) = @_;
my ($resulttext,%curr_usercreation,%changes,%authallowed,%cancreate,%save_usercreate);
@@ -19175,16 +20039,58 @@ sub modify_defaults {
}
} elsif ($item eq 'portal_def') {
if ($newvalues{$item} ne '') {
- unless ($newvalues{$item} =~ /^https?\:\/\/(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])\/?$/) {
+ if ($newvalues{$item} =~ /^https?\:\/\/(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])\/?$/) {
+ foreach my $field ('email','web') {
+ if ($env{'form.'.$item.'_'.$field}) {
+ $newvalues{$item.'_'.$field} = $env{'form.'.$item.'_'.$field};
+ }
+ }
+ } else {
push(@errors,$item);
}
}
}
if (grep(/^\Q$item\E$/,@errors)) {
$newvalues{$item} = $domdefaults{$item};
+ if ($item eq 'portal_def') {
+ if ($domdefaults{$item}) {
+ foreach my $field ('email','web') {
+ if (exists($domdefaults{$item.'_'.$field})) {
+ $newvalues{$item.'_'.$field} = $domdefaults{$item.'_'.$field};
+ }
+ }
+ }
+ }
} elsif ($domdefaults{$item} ne $newvalues{$item}) {
$changes{$item} = 1;
}
+ if ($item eq 'portal_def') {
+ unless (grep(/^\Q$item\E$/,@errors)) {
+ if ($newvalues{$item} eq '') {
+ foreach my $field ('email','web') {
+ if (exists($domdefaults{$item.'_'.$field})) {
+ delete($domdefaults{$item.'_'.$field});
+ }
+ }
+ } else {
+ unless ($changes{$item}) {
+ foreach my $field ('email','web') {
+ if ($domdefaults{$item.'_'.$field} ne $newvalues{$item.'_'.$field}) {
+ $changes{$item} = 1;
+ last;
+ }
+ }
+ }
+ foreach my $field ('email','web') {
+ if ($newvalues{$item.'_'.$field}) {
+ $domdefaults{$item.'_'.$field} = $newvalues{$item.'_'.$field};
+ } elsif (exists($domdefaults{$item.'_'.$field})) {
+ delete($domdefaults{$item.'_'.$field});
+ }
+ }
+ }
+ }
+ }
$domdefaults{$item} = $newvalues{$item};
}
my %staticdefaults = (
@@ -19199,6 +20105,41 @@ sub modify_defaults {
$newvalues{$item} = $staticdefaults{$item};
}
}
+ my ($unamemaprules,$ruleorder);
+ my @possunamemaprules = &Apache::loncommon::get_env_multiple('form.unamemap_rule');
+ if (@possunamemaprules) {
+ ($unamemaprules,$ruleorder) =
+ &Apache::lonnet::inst_userrules($dom,'unamemap');
+ if ((ref($unamemaprules) eq 'HASH') && (ref($ruleorder) eq 'ARRAY')) {
+ if (@{$ruleorder} > 0) {
+ my %possrules;
+ map { $possrules{$_} = 1; } @possunamemaprules;
+ foreach my $rule (@{$ruleorder}) {
+ if ($possrules{$rule}) {
+ push(@{$newvalues{'unamemap_rule'}},$rule);
+ }
+ }
+ }
+ }
+ }
+ if (ref($domdefaults{'unamemap_rule'}) eq 'ARRAY') {
+ if (ref($newvalues{'unamemap_rule'}) eq 'ARRAY') {
+ my @rulediffs = &Apache::loncommon::compare_arrays($domdefaults{'unamemap_rule'},
+ $newvalues{'unamemap_rule'});
+ if (@rulediffs) {
+ $changes{'unamemap_rule'} = 1;
+ $domdefaults{'unamemap_rule'} = $newvalues{'unamemap_rule'};
+ }
+ } elsif (@{$domdefaults{'unamemap_rule'}} > 0) {
+ $changes{'unamemap_rule'} = 1;
+ delete($domdefaults{'unamemap_rule'});
+ }
+ } elsif (ref($newvalues{'unamemap_rule'}) eq 'ARRAY') {
+ if (@{$newvalues{'unamemap_rule'}} > 0) {
+ $changes{'unamemap_rule'} = 1;
+ $domdefaults{'unamemap_rule'} = $newvalues{'unamemap_rule'};
+ }
+ }
my %defaults_hash = (
defaults => \%newvalues,
);
@@ -19313,6 +20254,26 @@ sub modify_defaults {
$resulttext .= ''.&mt('Institutional user status types deleted').' ';
}
}
+ } elsif ($item eq 'unamemap_rule') {
+ if (ref($newvalues{'unamemap_rule'}) eq 'ARRAY') {
+ my @rulenames;
+ if (ref($unamemaprules) eq 'HASH') {
+ foreach my $rule (@{$newvalues{'unamemap_rule'}}) {
+ if (ref($unamemaprules->{$rule}) eq 'HASH') {
+ push(@rulenames,$unamemaprules->{$rule}->{'name'});
+ }
+ }
+ }
+ if (@rulenames) {
+ $resulttext .= ''.&mt('Mapping for missing usernames includes: [_1]',
+ '').
+ ' ';
+ } else {
+ $resulttext .= ''.&mt('No mapping for missing usernames via standard log-in').' ';
+ }
+ } else {
+ $resulttext .= ''.&mt('Mapping for missing usernames via standard log-in deleted').' ';
+ }
} else {
my $value = $env{'form.'.$item};
if ($value eq '') {
@@ -19329,7 +20290,20 @@ sub modify_defaults {
$value = $authnames{$shortauth{$value}};
}
$resulttext .= ''.&mt('[_1] set to "[_2]"',$title->{$item},$value).' ';
- $mailmsgtext .= "$title->{$item} set to $value\n";
+ $mailmsgtext .= "$title->{$item} set to $value\n";
+ if ($item eq 'portal_def') {
+ if ($env{'form.'.$item} ne '') {
+ foreach my $field ('email','web') {
+ $value = $env{'form.'.$item.'_'.$field};
+ if ($value) {
+ $value = &mt('Yes');
+ } else {
+ $value = &mt('No');
+ }
+ $resulttext .= ''.&mt('[_1] set to "[_2]"',$title->{$field},$value).' ';
+ }
+ }
+ }
}
}
$resulttext .= ' ';
@@ -20302,9 +21276,11 @@ sub modify_coursedefaults {
my %defaultchecked = (
'canuse_pdfforms' => 'off',
'uselcmath' => 'on',
- 'usejsme' => 'on'
+ 'usejsme' => 'on',
+ 'inline_chem' => 'on',
+ 'ltiauth' => 'off',
);
- my @toggles = ('canuse_pdfforms','uselcmath','usejsme');
+ my @toggles = ('canuse_pdfforms','uselcmath','usejsme','inline_chem','ltiauth');
my @numbers = ('anonsurvey_threshold','uploadquota_official','uploadquota_unofficial',
'uploadquota_community','uploadquota_textbook','uploadquota_placement',
'mysqltables_official','mysqltables_unofficial','mysqltables_community',
@@ -20514,8 +21490,9 @@ sub modify_coursedefaults {
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom,1);
if (($changes{'canuse_pdfforms'}) || ($changes{'uploadquota'}) || ($changes{'postsubmit'}) ||
($changes{'coursecredits'}) || ($changes{'uselcmath'}) || ($changes{'usejsme'}) ||
- ($changes{'canclone'}) || ($changes{'mysqltables'}) || ($changes{'texengine'})) {
- foreach my $item ('canuse_pdfforms','uselcmath','usejsme','texengine') {
+ ($changes{'canclone'}) || ($changes{'mysqltables'}) || ($changes{'texengine'}) ||
+ ($changes{'inline_chem'}) || ($changes{'ltiauth'})) {
+ foreach my $item ('canuse_pdfforms','uselcmath','usejsme','inline_chem','texengine','ltiauth') {
if ($changes{$item}) {
$domdefaults{$item}=$defaultshash{'coursedefaults'}{$item};
}
@@ -20584,6 +21561,12 @@ sub modify_coursedefaults {
} else {
$resulttext .= ''.&mt('Molecule editor uses JME (Java), if supported by client OS.').' ';
}
+ } elsif ($item eq 'inline_chem') {
+ if ($env{'form.'.$item} eq '1') {
+ $resulttext .= ''.&mt('Chemical Reaction Response uses inline previewer').' ';
+ } else {
+ $resulttext .= ''.&mt('Chemical Reaction Response uses pop-up previewer').' ';
+ }
} elsif ($item eq 'texengine') {
if ($defaultshash{'coursedefaults'}{'texengine'} ne '') {
$resulttext .= ''.&mt('Default method to display mathematics set to: "[_1]"',
@@ -20683,6 +21666,12 @@ sub modify_coursedefaults {
} else {
$resulttext .= ' '.&mt('By default, only course owner and coordinators may clone a course.').' ';
}
+ } elsif ($item eq 'ltiauth') {
+ if ($env{'form.'.$item} eq '1') {
+ $resulttext .= ''.&mt('LTI launch of deep-linked URL need not require re-authentication').' ';
+ } else {
+ $resulttext .= ''.&mt('LTI launch of deep-linked URL will require re-authentication').' ';
+ }
}
}
$resulttext .= '';
@@ -21154,7 +22143,7 @@ sub modify_wafproxy {
}
}
$output = &mt('Changes were made to Web Application Firewall/Reverse Proxy').'';
- foreach my $item ('alias','remoteip','ipheader','trusted','vpnint','vpnext','sslopt') {
+ foreach my $item ('alias','saml','remoteip','ipheader','trusted','vpnint','vpnext','sslopt') {
if ($changes{$item}) {
if ($item eq 'alias') {
my $numaliased = 0;
@@ -21184,10 +22173,10 @@ sub modify_wafproxy {
}
}
if ($shown) {
- $output .= ''.&mt('Alias used by Shibboleth for: [_1]',
+ $output .= ' '.&mt('Alias used by SSO Auth for: [_1]',
$shown).' ';
} else {
- $output .= ''.&mt('No alias used for Shibboleth').' ';
+ $output .= ''.&mt('No alias used for SSO Auth').' ';
}
} else {
if ($item eq 'remoteip') {
@@ -21923,8 +22912,10 @@ sub modify_trust {
}
my $cachetime = 24*60*60;
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime);
+ &Apache::lonnet::do_cache_new('trust',$dom,$defaultshash{'trust'},3600);
if (ref($lastactref) eq 'HASH') {
$lastactref->{'domdefaults'} = 1;
+ $lastactref->{'trust'} = 1;
}
if (keys(%changes) > 0) {
my %lt = &trust_titles();
@@ -22993,7 +23984,7 @@ sub devalidate_remote_domconfs {
map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids();
my @posscached = ('domainconfig','domdefaults','ltitools','usersessions',
'directorysrch','passwdconf','cats','proxyalias','proxysaml',
- 'ipaccess');
+ 'ipaccess','trust');
my %cache_by_lonhost;
if (exists($cachekeys->{'samllanding'})) {
if (ref($cachekeys->{'samllanding'}) eq 'HASH') {