--- loncom/interface/courseprefs.pm 2022/04/05 12:27:39 1.108 +++ loncom/interface/courseprefs.pm 2022/04/06 14:35:27 1.111 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.108 2022/04/05 12:27:39 raeburn Exp $ +# $Id: courseprefs.pm,v 1.111 2022/04/06 14:35:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1548,7 +1548,7 @@ sub process_linkprot { if (ref($values) eq 'HASH') { my @todelete = &Apache::loncommon::get_env_multiple('form.linkprot_del'); my $maxnum = $env{'form.linkprot_maxnum'}; - for (my $i=0; $i<=$maxnum; $i++) { + for (my $i=0; $i<$maxnum; $i++) { my $itemid = $env{'form.linkprot_id_'.$i}; $itemid =~ s/\D+//g; if ($itemid) { @@ -1678,7 +1678,7 @@ sub process_linkprot { $changes->{$entry} = $linkprot{$entry}; } if (ref($lastactref) eq 'HASH') { - $lastactref->{'courselti'} = 1'; + $lastactref->{'courselti'} = 1; } } return $errors; @@ -2213,6 +2213,9 @@ sub store_linkprot { if (exists($oldlinkprot->{$id}{'usable'})) { $changes->{$id}->{'usable'} = 1; } + if (exists($oldlinkprot->{$id}{'cipher'})) { + $changes->{$id}->{'cipher'} = $oldlinkprot->{$id}{'cipher'}; + } } } } @@ -5771,6 +5774,7 @@ sub print_linkprotection { } else { $datatable .= ''.&mt('Secret required').' - '.$switchmessage.''."\n"; } + $datatable .= ''; } else { if ($values{'usable'} ne '') { $datatable .= '
'.