[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm

raeburn raeburn at source.lon-capa.org
Tue Dec 31 13:51:53 EST 2024


raeburn		Tue Dec 31 18:51:53 2024 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - Retrieve order poision when adding new IP-based access control item.
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.445 loncom/interface/domainprefs.pm:1.446
--- loncom/interface/domainprefs.pm:1.445	Sat Oct 12 01:42:29 2024
+++ loncom/interface/domainprefs.pm	Tue Dec 31 18:51:53 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.445 2024/10/12 01:42:29 raeburn Exp $
+# $Id: domainprefs.pm,v 1.446 2024/12/31 18:51:53 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -13179,13 +13179,15 @@
     foreach my $idx (@items) {
         my $itemid = $itemids{$idx};
         next unless ($itemid);
-        my %current;
-        unless ($idx eq 'add') {
+        my ($position,%current);
+        if ($idx eq 'add') {
+            $position = $env{'form.ipaccess_pos_add'};
+        } else {
+            $position = $env{'form.ipaccess_pos_'.$itemid};
             if (ref($domconfig{'ipaccess'}{$itemid}) eq 'HASH') {
                 %current = %{$domconfig{'ipaccess'}{$itemid}};
             }
         }
-        my $position = $env{'form.ipaccess_pos_'.$itemid};
         $position =~ s/\D+//g;
         if ($position ne '') {
             $allpos[$position] = $itemid;




More information about the LON-CAPA-cvs mailing list