--- loncom/interface/lonconfigsettings.pm 2019/07/18 18:28:52 1.46 +++ loncom/interface/lonconfigsettings.pm 2021/09/01 00:21:52 1.52 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: lonconfigsettings.pm,v 1.46 2019/07/18 18:28:52 raeburn Exp $ +# $Id: lonconfigsettings.pm,v 1.52 2021/09/01 00:21:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -253,9 +253,19 @@ $jscript } } } + if (grep(/^wafproxy$/,@actions)) { + $onload .= "toggleWAF();checkWAF();updateWAF();"; + } + if (grep(/^proctoring$/,@actions)) { + $onload .= "toggleProctoring(document.display,'proctorio');". + "toggleProctoring(document.display,'examity');"; + } if (grep(/^scantron$/,@actions)) { $onload .= "toggleScantron('document.display');"; } + if (grep(/^autoupdate$/,@actions)) { + $onload .= "toggleLastActiveDays('document.display');"; + } if ($onload) { my %loaditems = ( 'onload' => $onload, @@ -348,7 +358,7 @@ sub make_changes { {href=>"javascript:changePage(document.$phase,'$phase')", text=>"Updated"}); &print_header($r,$phase,$context,undef,$container); - my ($crstype,%lastact); + my ($crstype,%lastact,$errors); if ($context eq 'course') { $crstype = &Apache::loncommon::course_type(); } @@ -362,9 +372,10 @@ sub make_changes { $confname,$item,$roles,$values,\%lastact)); } else { $changes{$item} = {}; - &Apache::courseprefs::process_changes($dom,$item,$values, - $prefs->{$item},$changes{$item}, - $allitems,\%disallowed,$crstype); + $errors = + &Apache::courseprefs::process_changes($dom,$confname,$item,$values, + $prefs->{$item},$changes{$item}, + $allitems,\%disallowed,$crstype); if (keys(%{$changes{$item}}) > 0) { $numchanged ++; } @@ -396,6 +407,9 @@ sub make_changes { } $r->print('

'); } + if ($errors) { + $r->print('

'.$errors.'

'); + } } $r->print('

'); my $footer_text = 'Back to configuration display'; @@ -552,8 +566,8 @@ sub display_choices { $thirddiv = 1; } } - $r->print('
'); } + $r->print('

'); $r->print(&print_footer($r,$phase,'display','Display',undef,$container,$parm_permission)); $r->print(''); if ($container) {