--- loncom/interface/lonconfigsettings.pm 2025/06/14 18:42:11 1.21.4.13.2.14 +++ loncom/interface/lonconfigsettings.pm 2023/06/02 01:20:26 1.70 @@ -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.14 2025/06/14 18:42:11 raeburn Exp $ +# $Id: lonconfigsettings.pm,v 1.70 2023/06/02 01:20:26 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; @@ -92,7 +93,7 @@ sub print_header { var gotcode = 0; for (var i=0; i{'ltitools'}) eq 'HASH') { @@ -277,8 +276,6 @@ $jscript for (my $i=0; $i<$numltitools; $i++) { $onload .= "toggleLTITools(document.display,'passback','$i');". "toggleLTITools(document.display,'roster','$i');". - "toggleLTITools(document.display,'desturl','$i');". - "toggleLTITools(document.display,'returnurl','$i');". "toggleLTITools(document.display,'user','$i');"; } } @@ -292,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);"; } @@ -389,9 +390,6 @@ $jscript if (grep(/^localization$/,@actions)) { $onload .= "toggleTimeZone();"; } - if (grep(/^grading$/,@actions)) { - $onload .= 'toggleGrading(document.display);toggleHiddenTotalsSec(document.display);'; - } if ($onload) { my %loaditems = ( 'onload' => $onload, @@ -409,6 +407,9 @@ $jscript '); + if ($container) { + &Apache::lonparmset::startSettingsScreen($r,$container,$crstype); + } $r->print('
'); return; @@ -569,10 +570,13 @@ sub print_footer { if ($showbutton) { $r->print('

'); - } + } } if ($phase eq 'process') { $r->print('
'); + if ($container) { + &Apache::lonparmset::endSettingsScreen($r); + } $r->print(&Apache::loncommon::end_page()); } return; @@ -649,8 +653,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; } @@ -677,15 +681,18 @@ sub display_settings { push(@items,$item); if ($context eq 'domain') { my $settings; - if (ref($values) eq 'HASH') { + 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'}; @@ -702,7 +709,7 @@ sub display_settings { my $inststatus = { inststatustypes => $usertypes, inststatusorder => $types, - inststatusguest => [], + inststatusguest => [], }; if (ref($values->{defaults}) eq 'HASH') { $settings = {%{$inststatus},%{$values->{'defaults'}}}; @@ -771,6 +778,9 @@ sub display_settings { } $r->print(''); } + if ($container) { + &Apache::lonparmset::endSettingsScreen($r); + } $r->print(&Apache::loncommon::end_page()); return; } @@ -833,6 +843,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; } @@ -1102,17 +1115,9 @@ sub ltitools_toggle_js { function toggleLTITools(form,setting,item) { var radioname = ''; var divid = ''; - var defdivid = ''; - if ((setting == 'passback') || (setting == 'roster') || (setting == 'returnurl') || (setting == 'desturl')) { + if ((setting == 'passback') || (setting == 'roster')) { radioname = 'ltitools_'+setting+'_'+item; - if ((setting == 'returnurl') || (setting == 'desturl')) { - divid = 'ltitools_course'+setting+'_'+item; - if (setting == 'desturl') { - defdivid = 'ltitools_default'+setting+'_'+item; - } - } else { - divid = 'ltitools_'+setting+'time_'+item; - } + divid = 'ltitools_'+setting+'time_'+item; var num = form.elements[radioname].length; if (num) { var setvis = ''; @@ -1121,9 +1126,6 @@ function toggleLTITools(form,setting,ite if (form.elements[radioname][i].value == '1') { if (document.getElementById(divid)) { document.getElementById(divid).style.display = 'inline-block'; - if ((setting == 'desturl') && (document.getElementById(defdivid))) { - document.getElementById(defdivid).style.display = 'inline-block'; - } } setvis = 1; } @@ -1135,9 +1137,6 @@ function toggleLTITools(form,setting,ite if (document.getElementById(divid)) { document.getElementById(divid).style.display = 'none'; } - if ((setting == 'desturl') && (document.getElementById(defdivid))) { - document.getElementById(defdivid).style.display = 'none'; - } } } if (setting == 'user') {