--- loncom/interface/lonconfigsettings.pm 2022/02/15 04:28:01 1.59 +++ loncom/interface/lonconfigsettings.pm 2022/02/19 08:53:17 1.60 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: lonconfigsettings.pm,v 1.59 2022/02/15 04:28:01 raeburn Exp $ +# $Id: lonconfigsettings.pm,v 1.60 2022/02/19 08:53:17 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -117,7 +117,7 @@ ENDSCRIPT } } if (($context eq 'course') && ($phase eq 'display') && - (grep(/^linkprotection$/,@actions))) { + (grep(/^linkprot$/,@actions))) { my $allowed; my $home = &Apache::lonnet::homeserver($confname,$dom); unless ($home eq 'no_host') { @@ -126,14 +126,14 @@ ENDSCRIPT } if ($allowed) { my (@changeable,@settable); - if (ref($values->{'linkprotection'}) eq 'HASH') { - if (keys(%{$values->{'linkprotection'}})) { - my @current = sort { $a <=> $b } keys(%{$values->{'linkprotection'}}); + if (ref($values->{'linkprot'}) eq 'HASH') { + if (keys(%{$values->{'linkprot'}})) { + my @current = sort { $a <=> $b } keys(%{$values->{'linkprot'}}); if (@current) { for (my $i=0; $i<@current; $i++) { my $num = $current[$i]; - if (ref($values->{'linkprotection'}->{$num}) eq 'HASH') { - if ($values->{'linkprotection'}->{$num}->{'usable'}) { + if (ref($values->{'linkprot'}->{$num}) eq 'HASH') { + if ($values->{'linkprot'}->{$num}->{'usable'}) { push(@changeable,$i); } else { push(@settable,$i); @@ -372,9 +372,9 @@ $jscript $onload = "courseSet('','load');toggleCloners(document.display.cloners_instcode);"; } } - if (grep(/^linkprotection$/,@actions)) { + if (grep(/^linkprot$/,@actions)) { if (ref($values) eq 'HASH') { - if (ref($values->{'linkprotection'}) eq 'HASH') { + if (ref($values->{'linkprot'}) eq 'HASH') { my $ltiauth; if (exists($env{'course.'.$env{'request.course.id'}.'.internal.ltiauth'})) { $ltiauth = $env{'course.'.$env{'request.course.id'}.'.internal.ltiauth'}; @@ -382,14 +382,14 @@ $jscript my %domdefs = &Apache::lonnet::get_domain_defaults($dom); $ltiauth = $domdefs{'crsltiauth'}; } - my $posslti = scalar(keys(%{$values->{'linkprotection'}})); + my $posslti = scalar(keys(%{$values->{'linkprot'}})); for (my $i=0; $i<=$posslti; $i++) { my $num = $i; if ($i == $posslti) { $num = 'add'; } - if (ref($values->{'linkprotection'}->{$i}) eq 'HASH') { - if ($values->{'linkprotection'}->{$i}->{'usable'}) { + if (ref($values->{'linkprot'}->{$i}) eq 'HASH') { + if ($values->{'linkprot'}->{$i}->{'usable'}) { $onload .= "toggleLinkProt(document.display,'$num','secret');"; } }