version 1.21.4.9, 2016/10/23 21:13:51
|
version 1.21.4.9.6.2, 2020/05/22 22:38:55
|
Line 39 use Apache::courseclassifier();
|
Line 39 use Apache::courseclassifier();
|
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
|
sub print_header { |
sub print_header { |
my ($r,$phase,$context,$jscript,$container) = @_; |
my ($r,$phase,$context,$jscript,$container,$instcode,$dom,$values) = @_; |
my ($pagetitle,$brcrumtitle,$action,$call_category_check,$instcode_check, |
my ($pagetitle,$brcrumtitle,$action,$call_category_check,$instcode_check, |
$crstype,@actions,@code_order); |
$crstype,@actions,@code_order); |
if ($phase eq 'display') { |
if ($phase eq 'display') { |
Line 176 $jscript
|
Line 176 $jscript
|
$additem = {'add_entries' => \%loaditems,}; |
$additem = {'add_entries' => \%loaditems,}; |
} elsif ($phase eq 'display') { |
} elsif ($phase eq 'display') { |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
|
my $onload; |
if (grep(/^coursedefaults$/,@actions)) { |
if (grep(/^coursedefaults$/,@actions)) { |
|
$onload = "toggleDisplay(document.display,'cloneinstcode');". |
|
"toggleDisplay(document.display,'credits');". |
|
"toggleDisplay(document.display,'studentsubmission');"; |
|
} |
|
if (grep(/^ltitools$/,@actions)) { |
|
$onload .= "toggleLTITools(document.display,'user','add');"; |
|
if (ref($values) eq 'HASH') { |
|
if (ref($values->{'ltitools'}) eq 'HASH') { |
|
my $numltitools = scalar(keys(%{$values->{'ltitools'}})); |
|
for (my $i=0; $i<$numltitools; $i++) { |
|
$onload .= "toggleLTITools(document.display,'user','$i');"; |
|
} |
|
} |
|
} |
|
} |
|
if ($onload) { |
my %loaditems = ( |
my %loaditems = ( |
' onload' => "toggleDisplay(document.display,'cloneinstcode');". |
'onload' => $onload, |
"toggleDisplay(document.display,'credits');". |
|
"toggleDisplay(document.display,'studentsubmission');", |
|
); |
); |
$additem = {'add_entries' => \%loaditems,}; |
$additem = {'add_entries' => \%loaditems,}; |
} |
} |
Line 335 sub display_settings {
|
Line 350 sub display_settings {
|
if (ref($values) eq 'HASH') { |
if (ref($values) eq 'HASH') { |
$instcode = $values->{'internal.coursecode'}; |
$instcode = $values->{'internal.coursecode'}; |
} |
} |
&print_header($r,$phase,$context,$jscript,$container,$instcode); |
&print_header($r,$phase,$context,$jscript,$container,$instcode,$dom,$values); |
my $divwidth = 900; |
my $divwidth = 900; |
if ((ref($prefs_order) eq 'ARRAY') && (ref($prefs) eq 'HASH') && (ref($values) eq 'HASH')) { |
if ((ref($prefs_order) eq 'ARRAY') && (ref($prefs) eq 'HASH') && (ref($values) eq 'HASH')) { |
if (@actions > 0) { |
if (@actions > 0) { |