--- loncom/interface/domainprefs.pm 2024/12/31 19:28:29 1.447 +++ loncom/interface/domainprefs.pm 2025/01/12 18:26:16 1.447.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.447 2024/12/31 19:28:29 raeburn Exp $ +# $Id: domainprefs.pm,v 1.447.2.2 2025/01/12 18:26:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -222,10 +222,10 @@ sub handler { 'coursedefaults','usersessions','loadbalancing', 'requestauthor','selfenrollment','inststatus', 'ltitools','toolsec','ssl','trust','lti','ltisec', - 'privacy','passwords','proctoring','wafproxy', + 'privacy','passwords','wafproxy', 'ipaccess','authordefaults'],$dom); my %encconfig = - &Apache::lonnet::get_dom('encconfig',['ltitools','lti','proctoring','linkprot'],$dom,undef,1); + &Apache::lonnet::get_dom('encconfig',['ltitools','lti','linkprot'],$dom,undef,1); my ($checked_is_home,$is_home); if (ref($domconfig{'ltitools'}) eq 'HASH') { if (ref($encconfig{'ltitools'}) eq 'HASH') { @@ -288,24 +288,12 @@ sub handler { } } } - if (ref($domconfig{'proctoring'}) eq 'HASH') { - if (ref($encconfig{'proctoring'}) eq 'HASH') { - foreach my $provider (keys(%{$domconfig{'proctoring'}})) { - if ((ref($domconfig{'proctoring'}{$provider}) eq 'HASH') && - (ref($encconfig{'proctoring'}{$provider}) eq 'HASH')) { - foreach my $item ('key','secret') { - $domconfig{'proctoring'}{$provider}{$item} = $encconfig{'proctoring'}{$provider}{$item}; - } - } - } - } - } my @prefs_order = ('rolecolors','login','ipaccess','defaults','wafproxy','passwords', 'quotas','autoenroll','autoupdate','autocreate','directorysrch', 'contacts','privacy','usercreation','selfcreation', 'usermodification','scantron','requestcourses','requestauthor', 'coursecategories','serverstatuses','helpsettings','coursedefaults', - 'authordefaults','ltitools','proctoring','selfenrollment', + 'authordefaults','ltitools','selfenrollment', 'usersessions','ssl','trust','lti'); my %existing; if (ref($domconfig{'loadbalancing'}) eq 'HASH') { @@ -618,14 +606,6 @@ sub handler { print => \&print_ltitools, modify => \&modify_ltitools, }, - 'proctoring' => - {text => 'Remote Proctoring Integration', - help => 'Domain_Configuration_Proctoring', - header => [{col1 => 'Name', - col2 => 'Configuration'}], - print => \&print_proctoring, - modify => \&modify_proctoring, - }, 'ssl' => {text => 'LON-CAPA Network (SSL)', help => 'Domain_Configuration_Network_SSL', @@ -887,8 +867,6 @@ sub process_changes { $output = &modify_loadbalancing($dom,%domconfig); } elsif ($action eq 'ltitools') { $output = &modify_ltitools($r,$dom,$action,$lastactref,%domconfig); - } elsif ($action eq 'proctoring') { - $output = &modify_proctoring($r,$dom,$action,$lastactref,%domconfig); } elsif ($action eq 'ssl') { $output = &modify_ssl($dom,$lastactref,%domconfig); } elsif ($action eq 'trust') { @@ -940,8 +918,6 @@ sub print_config_box { } elsif ($action eq 'lti') { $output .= &passwords_javascript('ltisecrets')."\n". <i_javascript($dom,$settings); - } elsif ($action eq 'proctoring') { - $output .= &proctoring_javascript($settings); } elsif ($action eq 'wafproxy') { $output .= &wafproxy_javascript($dom); } elsif ($action eq 'autoupdate') { @@ -1342,7 +1318,7 @@ sub print_config_box { $output .= &print_quotas($dom,$settings,\$rowtotal,$action); } elsif (($action eq 'autoenroll') || ($action eq 'autocreate') || ($action eq 'serverstatuses') || ($action eq 'loadbalancing') || - ($action eq 'proctoring') || ($action eq 'ipaccess')) { + ($action eq 'ipaccess')) { $output .= $item->{'print'}->($dom,$settings,\$rowtotal); } } @@ -12140,7 +12116,11 @@ sub modifiable_userdata_row { my $hashref; if ($context eq 'lti') { if (ref($settings) eq 'HASH') { - $hashref = $settings->{'instdata'}; + my %instdata; + if (ref($settings->{'instdata'}) eq 'ARRAY') { + map { $instdata{$_} = 1; } @{$settings->{'instdata'}}; + } + $hashref = \%instdata; } } elsif ($context eq 'privacy') { my ($key,$inner) = split(/_/,$role); @@ -12151,7 +12131,7 @@ sub modifiable_userdata_row { } } elsif (ref($settings->{$context}) eq 'HASH') { if (ref($settings->{$context}->{$role}) eq 'HASH') { - $hashref = $settings->{'lti_instdata'}; + $hashref = $settings->{$context}->{$role}; } if ($role eq 'emailusername') { if ($statustype) { @@ -16087,9 +16067,9 @@ sub modify_lti { } my @possinstdata = &Apache::loncommon::get_env_multiple('form.lti_instdata_'.$idx); if (@possinstdata) { - foreach my $field (@possinstdata) { + foreach my $field (sort(@possinstdata)) { if (exists($fieldtitles{$field})) { - push(@{$confhash{$itemid}{'instdata'}}); + push(@{$confhash{$itemid}{'instdata'}},$field); } } } @@ -16251,7 +16231,7 @@ sub modify_lti { } } unless ($changes{$itemid}) { - foreach my $field ('makeuser','lcmenu') { + foreach my $field ('makeuser','lcmenu','instdata') { if (ref($currlti{$field}) eq 'ARRAY') { if (ref($confhash{$itemid}{$field}) eq 'ARRAY') { my @diffs = &Apache::loncommon::compare_arrays($currlti{$field}, @@ -16465,8 +16445,10 @@ sub modify_lti { $resulttext .= '