--- loncom/interface/domainprefs.pm 2025/01/14 13:06:01 1.447.2.3 +++ loncom/interface/domainprefs.pm 2025/03/15 01:07:42 1.447.2.6 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.447.2.3 2025/01/14 13:06:01 raeburn Exp $ +# $Id: domainprefs.pm,v 1.447.2.6 2025/03/15 01:07:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -563,11 +563,7 @@ sub handler { header => [{col1 => 'Role assigned in different domain', col2 => 'Approval options'}, {col1 => 'Role assigned in different domain to user of type', - col2 => 'User information available in that domain'}, - {col1 => "Role assigned in user's domain", - col2 => 'Information viewable by privileged user'}, - {col1 => "Role assigned in user's domain", - col2 => 'Information viewable by unprivileged user'}], + col2 => 'User information available in that domain'}], print => \&print_privacy, modify => \&modify_privacy, }, @@ -1008,8 +1004,8 @@ sub print_config_box { ($action eq 'selfcreation') || ($action eq 'selfenrollment') || ($action eq 'usersessions') || ($action eq 'coursecategories') || ($action eq 'trust') || ($action eq 'contacts') || ($action eq 'defaults') || - ($action eq 'privacy') || ($action eq 'passwords') || ($action eq 'lti') || - ($action eq 'ltitools') || ($action eq 'usermodification')) { + ($action eq 'passwords') || ($action eq 'lti') || ($action eq 'ltitools') || + ($action eq 'usermodification')) { if ($action eq 'coursecategories') { $output .= &print_coursecategories('middle',$dom,$item,$settings,\$rowtotal); $colspan = ' colspan="2"'; @@ -1079,8 +1075,8 @@ sub print_config_box { '."\n"; if ($action eq 'coursecategories') { $output .= &print_coursecategories('bottom',$dom,$item,$settings,\$rowtotal); - } elsif (($action eq 'contacts') || ($action eq 'privacy') || - ($action eq 'passwords') || ($action eq 'lti')) { + } elsif (($action eq 'contacts') || ($action eq 'passwords') || + ($action eq 'lti')) { if ($action eq 'passwords') { $output .= $item->{'print'}->('lower',$dom,$confname,$settings,\$rowtotal); } else { @@ -1115,7 +1111,7 @@ sub print_config_box { $rowtotal ++; } elsif (($action eq 'coursedefaults') || ($action eq 'authordefaults') || ($action eq 'directorysrch') || ($action eq 'helpsettings') || - ($action eq 'wafproxy')) { + ($action eq 'wafproxy') || ($action eq 'privacy')) { $output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal); } elsif ($action eq 'scantron') { $output .= $item->{'print'}->($r,'bottom',$dom,$confname,$settings,\$rowtotal); @@ -5375,42 +5371,6 @@ sub print_ltitools { return $datatable; } -sub ltitools_names { - my %lt = &Apache::lonlocal::texthash( - 'title' => 'Title', - 'version' => 'Version', - 'msgtype' => 'Message Type', - 'sigmethod' => 'Signature Method', - 'url' => 'URL', - 'key' => 'Key', - 'lifetime' => 'Nonce lifetime (s)', - 'secret' => 'Secret', - 'icon' => 'Icon', - 'user' => 'User', - 'fullname' => 'Full Name', - 'firstname' => 'First Name', - 'lastname' => 'Last Name', - 'email' => 'E-mail', - 'roles' => 'Role', - 'window' => 'Window', - 'tab' => 'Tab', - 'iframe' => 'iFrame', - 'height' => 'Height', - 'width' => 'Width', - 'linktext' => 'Default Link Text', - 'explanation' => 'Default Explanation', - 'passback' => 'Tool can return grades:', - 'roster' => 'Tool can retrieve roster:', - 'crstarget' => 'Display target', - 'crslabel' => 'Course label', - 'crstitle' => 'Course title', - 'crslinktext' => 'Link Text', - 'crsexplanation' => 'Explanation', - 'crsappend' => 'Provider URL', - ); - return %lt; -} - sub secrets_form { my ($dom,$context,$encrypt,$privkeys,$rowtotal) = @_; my @ids=&Apache::lonnet::current_machine_ids(); @@ -7789,7 +7749,7 @@ sub print_privacy { ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); } - if (($position eq 'top') || ($position eq 'middle')) { + if (($position eq 'top') || ($position eq 'bottom')) { my (%by_ip,%by_location,@intdoms,@instdoms); &build_location_hashes(\@intdoms,\%by_ip,\%by_location,\@instdoms); if ($position eq 'top') { @@ -7876,7 +7836,7 @@ sub print_privacy { $datatable .= &mt('Nothing to set here, as there are no other domains'); } $datatable .=''; - } elsif ($position eq 'middle') { + } elsif ($position eq 'bottom') { if ((@instdoms > 1) || (keys(%by_location) > 0)) { if ((ref($types) eq 'ARRAY') && (ref($usertypes) eq 'HASH')) { foreach my $item (@{$types}) { @@ -7913,19 +7873,6 @@ sub print_privacy { } } } - } else { - my $prefix; - if ($position eq 'lower') { - $prefix = 'priv'; - } else { - $prefix = 'unpriv'; - } - foreach my $item (@items) { - $datatable .= &modifiable_userdata_row('privacy',$prefix.'_'.$item,$settings, - $numinrow,$itemcount,'','','','','', - '',$names{$item}); - $itemcount ++; - } } if (ref($rowtotal)) { $$rowtotal += $itemcount; @@ -7954,7 +7901,6 @@ sub print_passwords { min => 'Minimum password length', max => 'Maximum password length', chars => 'Required characters', - expire => 'Password expiration (days)', numsaved => 'Number of previous passwords to save and disallow reuse', ); if ($position eq 'top') { @@ -8281,7 +8227,7 @@ sub print_passwords { sub password_rules { my ($prefix,$itemcountref,$settings) = @_; - my ($min,$max,%chars,$expire,$numsaved,$numinrow); + my ($min,$max,%chars,$numsaved,$numinrow); my %titles; if ($prefix eq 'passwords') { %titles = &Apache::lonlocal::texthash ( @@ -8313,9 +8259,6 @@ sub password_rules { map { $chars{$_} = 1; } (@{$settings->{chars}}); } if ($prefix eq 'passwords') { - if ($settings->{expire}) { - $expire = $settings->{expire}; - } if ($settings->{numsaved}) { $numsaved = $settings->{numsaved}; } @@ -8377,17 +8320,8 @@ sub password_rules { $datatable .=''; $itemcount ++; if ($prefix eq 'passwords') { - $titles{'expire'} = &mt('Password expiration (days)'); $titles{'numsaved'} = &mt('Number of previous passwords to save and disallow reuse'); $css_class = $itemcount%2?' class="LC_odd_row"':''; - $datatable .= '