version 1.389, 2021/11/03 13:49:57
|
version 1.390, 2021/11/22 22:19:58
|
Line 3177 sub lti_javascript {
|
Line 3177 sub lti_javascript {
|
return $togglejs; |
return $togglejs; |
} |
} |
my (%ordered,$total,%jstext); |
my (%ordered,$total,%jstext); |
$total = 0; |
$total = scalar(keys(%{$settings})); |
foreach my $item (keys(%{$settings})) { |
foreach my $item (keys(%{$settings})) { |
if (ref($settings->{$item}) eq 'HASH') { |
if (ref($settings->{$item}) eq 'HASH') { |
my $num = $settings->{$item}{'order'}; |
my $num = $settings->{$item}{'order'}; |
|
if ($num eq '') { |
|
$num = $total - 1; |
|
} |
$ordered{$num} = $item; |
$ordered{$num} = $item; |
} |
} |
} |
} |
$total = scalar(keys(%{$settings})); |
|
my @jsarray = (); |
my @jsarray = (); |
foreach my $item (sort {$a <=> $b } (keys(%ordered))) { |
foreach my $item (sort {$a <=> $b } (keys(%ordered))) { |
push(@jsarray,$ordered{$item}); |
push(@jsarray,$ordered{$item}); |
Line 5937 sub print_lti {
|
Line 5939 sub print_lti {
|
foreach my $item (keys(%{$settings})) { |
foreach my $item (keys(%{$settings})) { |
if (ref($settings->{$item}) eq 'HASH') { |
if (ref($settings->{$item}) eq 'HASH') { |
my $num = $settings->{$item}{'order'}; |
my $num = $settings->{$item}{'order'}; |
|
if ($num eq '') { |
|
$num = scalar(keys(%{$settings})); |
|
} |
$ordered{$num} = $item; |
$ordered{$num} = $item; |
} |
} |
} |
} |
Line 14747 sub modify_lti {
|
Line 14752 sub modify_lti {
|
map { $deletions{$_} = 1; } @todelete; |
map { $deletions{$_} = 1; } @todelete; |
} |
} |
my $maxnum = $env{'form.lti_maxnum'}; |
my $maxnum = $env{'form.lti_maxnum'}; |
for (my $i=0; $i<=$maxnum; $i++) { |
for (my $i=0; $i<$maxnum; $i++) { |
my $itemid = $env{'form.lti_id_'.$i}; |
my $itemid = $env{'form.lti_id_'.$i}; |
$itemid =~ s/\D+//g; |
$itemid =~ s/\D+//g; |
if (ref($domconfig{$action}{$itemid}) eq 'HASH') { |
if (ref($domconfig{$action}{$itemid}) eq 'HASH') { |
if ($deletions{$itemid}) { |
if ($deletions{$itemid}) { |
$changes{$itemid} = $domconfig{$action}{$itemid}{'consumer'}; |
$changes{$itemid} = $domconfig{$action}{$itemid}{'consumer'}; |
} else { |
} else { |
push(@items,$i); |
push(@items,$i); |
$itemids{$i} = $itemid; |
$itemids{$i} = $itemid; |
} |
} |
} |
} |
} |
} |
Line 14763 sub modify_lti {
|
Line 14768 sub modify_lti {
|
foreach my $idx (@items) { |
foreach my $idx (@items) { |
my $itemid = $itemids{$idx}; |
my $itemid = $itemids{$idx}; |
next unless ($itemid); |
next unless ($itemid); |
my $position = $env{'form.lti_pos_'.$idx}; |
my $position = $env{'form.lti_pos_'.$itemid}; |
$position =~ s/\D+//g; |
$position =~ s/\D+//g; |
if ($position ne '') { |
if ($position ne '') { |
$allpos[$position] = $itemid; |
$allpos[$position] = $itemid; |
Line 15026 sub modify_lti {
|
Line 15031 sub modify_lti {
|
if (ref($confhash{$itemid}) ne 'HASH') { |
if (ref($confhash{$itemid}) ne 'HASH') { |
$resulttext .= '<li>'.&mt('Deleted: [_1]',$changes{$itemid}).'</li>'; |
$resulttext .= '<li>'.&mt('Deleted: [_1]',$changes{$itemid}).'</li>'; |
} else { |
} else { |
$resulttext .= '<li><b>'.$confhash{$itemid}{'consumer'}.'</b></li><ul>'; |
$resulttext .= '<li><b>'.$confhash{$itemid}{'consumer'}.'</b><ul>'; |
my $position = $pos + 1; |
my $position = $pos + 1; |
$resulttext .= '<li>'.&mt('Order: [_1]',$position).'</li>'; |
$resulttext .= '<li>'.&mt('Order: [_1]',$position).'</li>'; |
foreach my $item ('version','lifetime') { |
foreach my $item ('version','lifetime') { |