[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonconfigsettings.pm

raeburn raeburn at source.lon-capa.org
Mon Dec 13 15:09:54 EST 2021


raeburn		Mon Dec 13 20:09:54 2021 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonconfigsettings.pm 
  Log:
  - For 2.11
    Backport 1.48, 1.49, 1.50, 1.52, 1.53
  
  
Index: loncom/interface/lonconfigsettings.pm
diff -u loncom/interface/lonconfigsettings.pm:1.21.4.11 loncom/interface/lonconfigsettings.pm:1.21.4.12
--- loncom/interface/lonconfigsettings.pm:1.21.4.11	Tue Aug 27 20:43:52 2019
+++ loncom/interface/lonconfigsettings.pm	Mon Dec 13 20:09:54 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: lonconfigsettings.pm,v 1.21.4.11 2019/08/27 20:43:52 raeburn Exp $
+# $Id: lonconfigsettings.pm,v 1.21.4.12 2021/12/13 20:09:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -214,9 +214,21 @@
                 my $optionsprefix = 'LC_options_helpdesk_';
                 $onload .= "toggleHelpdeskRow(document.display,'overrides','$customclass','$optionsprefix');";
             }
+            if (grep(/^wafproxy$/, at actions)) {
+                $onload .= "toggleWAF();checkWAF();updateWAF();";
+            }
             if (grep(/^scantron$/, at actions)) {
                 $onload .= "toggleScantron('document.display');";
             }
+            if (grep(/^autoupdate$/, at actions)) {
+                $onload .= "toggleLastActiveDays('document.display');";
+            }
+            if (grep(/^login$/, at actions)) {
+                my %domservers = &Apache::lonnet::get_servers($dom);
+                foreach my $server (sort(keys(%domservers))) {
+                    $onload .= "toggleSamlOptions(document.display,'$server');";
+                }
+            }
             if ($onload) {
                 my %loaditems = (
                                   'onload' => $onload,
@@ -303,7 +315,7 @@
        {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();
     }
@@ -317,9 +329,10 @@
                                           $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,$item,$values,
+                                                              $prefs->{$item},$changes{$item},
+                                                              $allitems,\%disallowed,$crstype);
                     if (keys(%{$changes{$item}}) > 0) {
                         $numchanged ++;
                     }
@@ -351,6 +364,9 @@
             }
             $r->print('</p>');
         }
+        if ($errors) {
+            $r->print('<p>'.$errors.'</p>');
+        }
     }
     $r->print('<p>');
     my $footer_text = 'Back to configuration display';
@@ -501,8 +517,8 @@
                 $thirddiv = 1;
             }
         }
-        $r->print('</div><br clear="all" />');
     }
+    $r->print('</div><div style="padding:0;clear:both;margin:0;border:0"></div>');
     $r->print(&print_footer($r,$phase,'display','Display',undef,$container,$parm_permission));
     $r->print('</form>');
     $r->print(&Apache::loncommon::end_page());




More information about the LON-CAPA-cvs mailing list