--- loncom/interface/lonconfigsettings.pm 2016/10/23 21:13:51 1.21.4.9 +++ loncom/interface/lonconfigsettings.pm 2017/10/15 04:41:16 1.21.4.9.4.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: lonconfigsettings.pm,v 1.21.4.9 2016/10/23 21:13:51 raeburn Exp $ +# $Id: lonconfigsettings.pm,v 1.21.4.9.4.1 2017/10/15 04:41:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -176,11 +176,20 @@ $jscript $additem = {'add_entries' => \%loaditems,}; } elsif ($phase eq 'display') { if ($context eq 'domain') { + my $onload; if (grep(/^coursedefaults$/,@actions)) { + $onload = "toggleDisplay(document.display,'cloneinstcode');". + "toggleDisplay(document.display,'credits');". + "toggleDisplay(document.display,'studentsubmission');"; + } + if (grep(/^contacts$/,@actions)) { + my $customclass = 'LC_helpdesk_override'; + my $optionsprefix = 'LC_options_helpdesk_'; + $onload .= "toggleHelpdeskRow(document.display,'overrides','$customclass','$optionsprefix');"; + } + if ($onload) { my %loaditems = ( - ' onload' => "toggleDisplay(document.display,'cloneinstcode');". - "toggleDisplay(document.display,'credits');". - "toggleDisplay(document.display,'studentsubmission');", + 'onload' => $onload, ); $additem = {'add_entries' => \%loaditems,}; }