version 1.109, 2022/04/05 14:08:46
|
version 1.111, 2022/04/06 14:35:27
|
Line 1548 sub process_linkprot {
|
Line 1548 sub process_linkprot {
|
if (ref($values) eq 'HASH') { |
if (ref($values) eq 'HASH') { |
my @todelete = &Apache::loncommon::get_env_multiple('form.linkprot_del'); |
my @todelete = &Apache::loncommon::get_env_multiple('form.linkprot_del'); |
my $maxnum = $env{'form.linkprot_maxnum'}; |
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}; |
my $itemid = $env{'form.linkprot_id_'.$i}; |
$itemid =~ s/\D+//g; |
$itemid =~ s/\D+//g; |
if ($itemid) { |
if ($itemid) { |
Line 1660 sub process_linkprot {
|
Line 1660 sub process_linkprot {
|
} |
} |
} else { |
} else { |
$linkprot{$itemid}{'secret'} = $current{'secret'}; |
$linkprot{$itemid}{'secret'} = $current{'secret'}; |
|
$linkprot{$itemid}{'cipher'} = $current{'cipher'}; |
} |
} |
} elsif ($env{$secretitem} ne '') { |
} elsif ($env{$secretitem} ne '') { |
if ($privnum && $cipher) { |
if ($privnum && $cipher) { |
Line 1677 sub process_linkprot {
|
Line 1678 sub process_linkprot {
|
$changes->{$entry} = $linkprot{$entry}; |
$changes->{$entry} = $linkprot{$entry}; |
} |
} |
if (ref($lastactref) eq 'HASH') { |
if (ref($lastactref) eq 'HASH') { |
$lastactref->{'courselti'} = 1'; |
$lastactref->{'courselti'} = 1; |
} |
} |
} |
} |
return $errors; |
return $errors; |
Line 5773 sub print_linkprotection {
|
Line 5774 sub print_linkprotection {
|
} else { |
} else { |
$datatable .= '<span class="LC_nobreak">'.&mt('Secret required').' - '.$switchmessage.'</span>'."\n"; |
$datatable .= '<span class="LC_nobreak">'.&mt('Secret required').' - '.$switchmessage.'</span>'."\n"; |
} |
} |
|
$datatable .= '<input type="hidden" name="linkprot_id_'.$i.'" value="'.$num.'" />'; |
} else { |
} else { |
if ($values{'usable'} ne '') { |
if ($values{'usable'} ne '') { |
$datatable .= '<div id="linkprot_divcurrsecret_'.$i.'" style="display:inline-block" /><span class="LC_nobreak">'. |
$datatable .= '<div id="linkprot_divcurrsecret_'.$i.'" style="display:inline-block" /><span class="LC_nobreak">'. |