version 1.21.4.9.6.2, 2020/05/22 22:38:55
|
version 1.21.4.11.2.1, 2020/10/25 19:10:26
|
Line 178 $jscript
|
Line 178 $jscript
|
if ($context eq 'domain') { |
if ($context eq 'domain') { |
my $onload; |
my $onload; |
if (grep(/^coursedefaults$/,@actions)) { |
if (grep(/^coursedefaults$/,@actions)) { |
$onload = "toggleDisplay(document.display,'cloneinstcode');". |
$onload = "toggleDisplay(document.display,'cloneinstcode');". |
"toggleDisplay(document.display,'credits');". |
"toggleDisplay(document.display,'credits');". |
"toggleDisplay(document.display,'studentsubmission');"; |
"toggleDisplay(document.display,'studentsubmission');"; |
} |
} |
|
if (grep(/^selfcreation$/,@actions)) { |
|
my $prefix = 'cancreate_emailverified'; |
|
my $customclass = 'LC_selfcreate_email'; |
|
my $classprefix = 'LC_canmodify_emailusername_'; |
|
my $optionsprefix = 'LC_options_emailusername_'; |
|
$onload .= "toggleRows(document.display,'cancreate_email','selfassign','$customclass','$classprefix','$optionsprefix');"; |
|
my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); |
|
my $hascustom; |
|
my ($emailrules,$emailruleorder) = &Apache::lonnet::inst_userrules($dom,'email'); |
|
if (ref($emailrules) eq 'HASH') { |
|
if (keys(%{$emailrules}) > 0) { |
|
$hascustom = 'cancreate_emailrule'; |
|
} |
|
} |
|
my @posstypes; |
|
if (ref($types) eq 'ARRAY') { |
|
@posstypes = @{$types}; |
|
push(@posstypes,'default'); |
|
foreach my $type (@posstypes) { |
|
$onload .= "toggleEmailOptions(document.display,'cancreate_emailoptions','$hascustom',". |
|
"'cancreate_emaildomain','$type');"; |
|
} |
|
} else { |
|
$onload .= "toggleEmailOptions(document.display,'cancreate_emailoptions','$hascustom',". |
|
"'cancreate_emaildomain','default');"; |
|
} |
|
} |
|
if (grep(/^contacts$/,@actions)) { |
|
my $customclass = 'LC_helpdesk_override'; |
|
my $optionsprefix = 'LC_options_helpdesk_'; |
|
$onload .= "toggleHelpdeskRow(document.display,'overrides','$customclass','$optionsprefix');"; |
|
} |
if (grep(/^ltitools$/,@actions)) { |
if (grep(/^ltitools$/,@actions)) { |
$onload .= "toggleLTITools(document.display,'user','add');"; |
$onload .= "toggleLTITools(document.display,'user','add');"; |
if (ref($values) eq 'HASH') { |
if (ref($values) eq 'HASH') { |
Line 193 $jscript
|
Line 225 $jscript
|
} |
} |
} |
} |
} |
} |
|
if (grep(/^scantron$/,@actions)) { |
|
$onload .= "toggleScantron('document.display');"; |
|
} |
if ($onload) { |
if ($onload) { |
my %loaditems = ( |
my %loaditems = ( |
'onload' => $onload, |
'onload' => $onload, |