--- loncom/interface/lonconfigsettings.pm 2009/10/29 14:57:18 1.7 +++ loncom/interface/lonconfigsettings.pm 2009/11/23 21:45:18 1.8 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: lonconfigsettings.pm,v 1.7 2009/10/29 14:57:18 raeburn Exp $ +# $Id: lonconfigsettings.pm,v 1.8 2009/11/23 21:45:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,10 +38,22 @@ use Apache::lonlocal; sub print_header { my ($r,$phase,$context,$jscript) = @_; - my ($pagetitle,$brcrumtitle,$action); + my ($pagetitle,$brcrumtitle,$action,$call_category_check); if ($context eq 'domain') { ($pagetitle, $brcrumtitle) = ('View/Modify Domain Settings','Domain Settings'); $action = '/adm/domainprefs'; + if ($phase eq 'display') { + my @actions = &Apache::loncommon::get_env_multiple('form.actions'); + if (grep(/^coursecategories$/,@actions)) { + $call_category_check = qq| + if (formname == document.display) { + if (!categoryCheck(formname)) { + return; + } + } +|; + } + } } else { if (&Apache::loncommon::course_type() eq 'Community') { ($pagetitle,$brcrumtitle) = ('Community Configuration','Community Configuration'); @@ -77,6 +89,7 @@ function changePage(formname,newphase) { return; } } + '.$call_category_check.' formname.submit(); }'."\n"; if ($phase eq 'pickactions') {