version 1.446, 2024/12/31 18:51:53
|
version 1.447.2.3, 2025/01/14 13:06:01
|
Line 222 sub handler {
|
Line 222 sub handler {
|
'coursedefaults','usersessions','loadbalancing', |
'coursedefaults','usersessions','loadbalancing', |
'requestauthor','selfenrollment','inststatus', |
'requestauthor','selfenrollment','inststatus', |
'ltitools','toolsec','ssl','trust','lti','ltisec', |
'ltitools','toolsec','ssl','trust','lti','ltisec', |
'privacy','passwords','proctoring','wafproxy', |
'privacy','passwords','wafproxy', |
'ipaccess','authordefaults'],$dom); |
'ipaccess','authordefaults'],$dom); |
my %encconfig = |
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); |
my ($checked_is_home,$is_home); |
if (ref($domconfig{'ltitools'}) eq 'HASH') { |
if (ref($domconfig{'ltitools'}) eq 'HASH') { |
if (ref($encconfig{'ltitools'}) eq 'HASH') { |
if (ref($encconfig{'ltitools'}) eq 'HASH') { |
Line 288 sub handler {
|
Line 288 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', |
my @prefs_order = ('rolecolors','login','ipaccess','defaults','wafproxy','passwords', |
'quotas','autoenroll','autoupdate','autocreate','directorysrch', |
'quotas','autoenroll','autoupdate','autocreate','directorysrch', |
'contacts','privacy','usercreation','selfcreation', |
'contacts','privacy','usercreation','selfcreation', |
'usermodification','scantron','requestcourses','requestauthor', |
'usermodification','scantron','requestcourses','requestauthor', |
'coursecategories','serverstatuses','helpsettings','coursedefaults', |
'coursecategories','serverstatuses','helpsettings','coursedefaults', |
'authordefaults','ltitools','proctoring','selfenrollment', |
'authordefaults','ltitools','selfenrollment', |
'usersessions','ssl','trust','lti'); |
'usersessions','ssl','trust','lti'); |
my %existing; |
my %existing; |
if (ref($domconfig{'loadbalancing'}) eq 'HASH') { |
if (ref($domconfig{'loadbalancing'}) eq 'HASH') { |
Line 618 sub handler {
|
Line 606 sub handler {
|
print => \&print_ltitools, |
print => \&print_ltitools, |
modify => \&modify_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' => |
'ssl' => |
{text => 'LON-CAPA Network (SSL)', |
{text => 'LON-CAPA Network (SSL)', |
help => 'Domain_Configuration_Network_SSL', |
help => 'Domain_Configuration_Network_SSL', |
Line 887 sub process_changes {
|
Line 867 sub process_changes {
|
$output = &modify_loadbalancing($dom,%domconfig); |
$output = &modify_loadbalancing($dom,%domconfig); |
} elsif ($action eq 'ltitools') { |
} elsif ($action eq 'ltitools') { |
$output = &modify_ltitools($r,$dom,$action,$lastactref,%domconfig); |
$output = &modify_ltitools($r,$dom,$action,$lastactref,%domconfig); |
} elsif ($action eq 'proctoring') { |
|
$output = &modify_proctoring($r,$dom,$action,$lastactref,%domconfig); |
|
} elsif ($action eq 'ssl') { |
} elsif ($action eq 'ssl') { |
$output = &modify_ssl($dom,$lastactref,%domconfig); |
$output = &modify_ssl($dom,$lastactref,%domconfig); |
} elsif ($action eq 'trust') { |
} elsif ($action eq 'trust') { |
Line 940 sub print_config_box {
|
Line 918 sub print_config_box {
|
} elsif ($action eq 'lti') { |
} elsif ($action eq 'lti') { |
$output .= &passwords_javascript('ltisecrets')."\n". |
$output .= &passwords_javascript('ltisecrets')."\n". |
<i_javascript($dom,$settings); |
<i_javascript($dom,$settings); |
} elsif ($action eq 'proctoring') { |
|
$output .= &proctoring_javascript($settings); |
|
} elsif ($action eq 'wafproxy') { |
} elsif ($action eq 'wafproxy') { |
$output .= &wafproxy_javascript($dom); |
$output .= &wafproxy_javascript($dom); |
} elsif ($action eq 'autoupdate') { |
} elsif ($action eq 'autoupdate') { |
Line 1342 sub print_config_box {
|
Line 1318 sub print_config_box {
|
$output .= &print_quotas($dom,$settings,\$rowtotal,$action); |
$output .= &print_quotas($dom,$settings,\$rowtotal,$action); |
} elsif (($action eq 'autoenroll') || ($action eq 'autocreate') || |
} elsif (($action eq 'autoenroll') || ($action eq 'autocreate') || |
($action eq 'serverstatuses') || ($action eq 'loadbalancing') || |
($action eq 'serverstatuses') || ($action eq 'loadbalancing') || |
($action eq 'proctoring') || ($action eq 'ipaccess')) { |
($action eq 'ipaccess')) { |
$output .= $item->{'print'}->($dom,$settings,\$rowtotal); |
$output .= $item->{'print'}->($dom,$settings,\$rowtotal); |
} |
} |
} |
} |
Line 2009 sub commblocktype_text {
|
Line 1985 sub commblocktype_text {
|
'passwd' => 'Change Password', |
'passwd' => 'Change Password', |
'grades' => 'Gradebook', |
'grades' => 'Gradebook', |
'search' => 'Course search', |
'search' => 'Course search', |
|
'index' => 'Course content index', |
'wishlist' => 'Stored links', |
'wishlist' => 'Stored links', |
'annotate' => 'Annotations', |
'annotate' => 'Annotations', |
); |
); |
my $typeorder = ['com','chat','boards','port','groups','blogs','about','wishlist','printout','grades','search','annotate','passwd']; |
my $typeorder = ['com','chat','boards','port','groups','blogs','about','wishlist','printout','grades','search','index','annotate','passwd']; |
return ($typeorder,\%types); |
return ($typeorder,\%types); |
} |
} |
|
|
Line 12139 sub modifiable_userdata_row {
|
Line 12116 sub modifiable_userdata_row {
|
my $hashref; |
my $hashref; |
if ($context eq 'lti') { |
if ($context eq 'lti') { |
if (ref($settings) eq 'HASH') { |
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') { |
} elsif ($context eq 'privacy') { |
my ($key,$inner) = split(/_/,$role); |
my ($key,$inner) = split(/_/,$role); |
Line 12150 sub modifiable_userdata_row {
|
Line 12131 sub modifiable_userdata_row {
|
} |
} |
} elsif (ref($settings->{$context}) eq 'HASH') { |
} elsif (ref($settings->{$context}) eq 'HASH') { |
if (ref($settings->{$context}->{$role}) eq 'HASH') { |
if (ref($settings->{$context}->{$role}) eq 'HASH') { |
$hashref = $settings->{'lti_instdata'}; |
$hashref = $settings->{$context}->{$role}; |
} |
} |
if ($role eq 'emailusername') { |
if ($role eq 'emailusername') { |
if ($statustype) { |
if ($statustype) { |
Line 16086 sub modify_lti {
|
Line 16067 sub modify_lti {
|
} |
} |
my @possinstdata = &Apache::loncommon::get_env_multiple('form.lti_instdata_'.$idx); |
my @possinstdata = &Apache::loncommon::get_env_multiple('form.lti_instdata_'.$idx); |
if (@possinstdata) { |
if (@possinstdata) { |
foreach my $field (@possinstdata) { |
foreach my $field (sort(@possinstdata)) { |
if (exists($fieldtitles{$field})) { |
if (exists($fieldtitles{$field})) { |
push(@{$confhash{$itemid}{'instdata'}}); |
push(@{$confhash{$itemid}{'instdata'}},$field); |
} |
} |
} |
} |
} |
} |
Line 16250 sub modify_lti {
|
Line 16231 sub modify_lti {
|
} |
} |
} |
} |
unless ($changes{$itemid}) { |
unless ($changes{$itemid}) { |
foreach my $field ('makeuser','lcmenu') { |
foreach my $field ('makeuser','lcmenu','instdata') { |
if (ref($currlti{$field}) eq 'ARRAY') { |
if (ref($currlti{$field}) eq 'ARRAY') { |
if (ref($confhash{$itemid}{$field}) eq 'ARRAY') { |
if (ref($confhash{$itemid}{$field}) eq 'ARRAY') { |
my @diffs = &Apache::loncommon::compare_arrays($currlti{$field}, |
my @diffs = &Apache::loncommon::compare_arrays($currlti{$field}, |
Line 16464 sub modify_lti {
|
Line 16445 sub modify_lti {
|
$resulttext .= '<li>'.&mt('Institutional data will be used when creating a new user for: [_1]', |
$resulttext .= '<li>'.&mt('Institutional data will be used when creating a new user for: [_1]', |
join(', ',map { $fieldtitles{$_}; } @{$confhash{$itemid}{'instdata'}})).'</li>'; |
join(', ',map { $fieldtitles{$_}; } @{$confhash{$itemid}{'instdata'}})).'</li>'; |
} else { |
} else { |
$resulttext .= '<li>'.&mt('No institutional data used when creating a new user.').'</li>'; |
$resulttext .= '<li>'.&mt('No institutional data used when creating a new user').'</li>'; |
} |
} |
|
} else { |
|
$resulttext .= '<li>'.&mt('No institutional data used when creating a new user').'</li>'; |
} |
} |
foreach my $item ('topmenu','inlinemenu') { |
foreach my $item ('topmenu','inlinemenu') { |
$resulttext .= '<li>'.$lt{$item}.': '; |
$resulttext .= '<li>'.$lt{$item}.': '; |
Line 17976 sub modify_privacy {
|
Line 17959 sub modify_privacy {
|
if (@diffs > 0) { |
if (@diffs > 0) { |
$changes{$status} = 1; |
$changes{$status} = 1; |
} |
} |
|
} elsif (@newvalues > 0) { |
|
$changes{$status} = 1; |
} |
} |
} else { |
} else { |
my @stdfields; |
my @stdfields; |
Line 18015 sub modify_privacy {
|
Line 18000 sub modify_privacy {
|
if (@diffs > 0) { |
if (@diffs > 0) { |
$changes{'othdom'} = 1; |
$changes{'othdom'} = 1; |
} |
} |
|
} elsif (@newvalues > 0) { |
|
$changes{'othdom'} = 1; |
} |
} |
} else { |
} else { |
my @stdfields = ('lastname','firstname','middlename','generation','permanentemail'); |
my @stdfields = ('lastname','firstname','middlename','generation','permanentemail'); |