--- loncom/interface/lonconfigsettings.pm 2025/03/15 03:05:15 1.21.4.13.2.13 +++ loncom/interface/lonconfigsettings.pm 2023/09/24 03:31:18 1.72 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: lonconfigsettings.pm,v 1.21.4.13.2.13 2025/03/15 03:05:15 raeburn Exp $ +# $Id: lonconfigsettings.pm,v 1.72 2023/09/24 03:31:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -35,6 +35,7 @@ use Apache::lonnet; use Apache::loncommon(); use Apache::lonhtmlcommon(); use Apache::lonlocal; +use Apache::lonparmset(); use Apache::courseclassifier(); use LONCAPA qw(:DEFAULT :match); use File::Copy; @@ -268,7 +269,6 @@ $jscript if (grep(/^ltitools$/,@actions)) { $onload .= "toggleLTITools(document.display,'passback','add');". "toggleLTITools(document.display,'roster','add');". - "toggleLTITools(document.display,'returnurl','add');". "toggleLTITools(document.display,'user','add');"; if (ref($values) eq 'HASH') { if (ref($values->{'ltitools'}) eq 'HASH') { @@ -276,7 +276,6 @@ $jscript for (my $i=0; $i<$numltitools; $i++) { $onload .= "toggleLTITools(document.display,'passback','$i');". "toggleLTITools(document.display,'roster','$i');". - "toggleLTITools(document.display,'returnurl','$i');". "toggleLTITools(document.display,'user','$i');"; } } @@ -290,6 +289,10 @@ $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);"; } @@ -407,6 +410,9 @@ $jscript '); + if ($container) { + &Apache::lonparmset::startSettingsScreen($r,$container,$crstype); + } $r->print('
'); return; @@ -571,6 +577,9 @@ sub print_footer { } if ($phase eq 'process') { $r->print('
'); + if ($container) { + &Apache::lonparmset::endSettingsScreen($r); + } $r->print(&Apache::loncommon::end_page()); } return; @@ -647,8 +656,8 @@ sub make_changes { if ($context eq 'course') { $footer_text = 'Back to display/edit settings'; } - $r->print('

'); &print_footer($r,$phase,'display',$footer_text,\@actions,$container,$parm_permission); + $r->print('

'); return \%lastact; } @@ -678,12 +687,15 @@ sub display_settings { if (ref($values) eq 'HASH') { $settings = $values->{$item}; } - if ($item eq 'usersessions') { - $r->print(''."\n"); + if (($item eq 'usersessions') || ($item eq 'ssl')) { + unless ($got_check_uncheck) { + $r->print(''."\n"); + $got_check_uncheck = 1; + } } elsif ($item eq 'selfcreation') { if (ref($values) eq 'HASH') { $settings = $values->{'usercreation'}; @@ -769,6 +781,9 @@ sub display_settings { } $r->print(''); } + if ($container) { + &Apache::lonparmset::endSettingsScreen($r); + } $r->print(&Apache::loncommon::end_page()); return; } @@ -831,6 +846,9 @@ sub display_choices { $r->print('
'); $r->print(&print_footer($r,$phase,'display','Display',undef,$container,$parm_permission)); $r->print(''); + if ($container) { + &Apache::lonparmset::endSettingsScreen($r); + } $r->print(&Apache::loncommon::end_page()); return; } @@ -1100,13 +1118,9 @@ sub ltitools_toggle_js { function toggleLTITools(form,setting,item) { var radioname = ''; var divid = ''; - if ((setting == 'passback') || (setting == 'roster') || (setting == 'returnurl')) { + if ((setting == 'passback') || (setting == 'roster')) { radioname = 'ltitools_'+setting+'_'+item; - if (setting == 'returnurl') { - divid = 'ltitools_course'+setting+'_'+item; - } else { - divid = 'ltitools_'+setting+'time_'+item; - } + divid = 'ltitools_'+setting+'time_'+item; var num = form.elements[radioname].length; if (num) { var setvis = '';