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

raeburn raeburn at source.lon-capa.org
Fri Mar 10 23:44:51 EST 2023


raeburn		Sat Mar 11 04:44:51 2023 EDT

  Modified files:              
    /loncom/interface	lonrequestcourse.pm 
  Log:
  - processing_javascript() subroutine removed in rev. 1.115
  - support domains with multiple library servers and in which requester selects
    'default' as new course's home server.
  
  
Index: loncom/interface/lonrequestcourse.pm
diff -u loncom/interface/lonrequestcourse.pm:1.115 loncom/interface/lonrequestcourse.pm:1.116
--- loncom/interface/lonrequestcourse.pm:1.115	Wed Jun  8 01:00:57 2022
+++ loncom/interface/lonrequestcourse.pm	Sat Mar 11 04:44:51 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Request a course
 #
-# $Id: lonrequestcourse.pm,v 1.115 2022/06/08 01:00:57 raeburn Exp $
+# $Id: lonrequestcourse.pm,v 1.116 2023/03/11 04:44:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -337,8 +337,6 @@
             $jscript = &Apache::lonhtmlcommon::set_form_elements($elementsref,\%stored);
             if ($state eq 'courseinfo') {
                 $jscript .= &cloning_javascript();
-            } elsif ($state eq 'process') {
-                $jscript .= &processing_javascript();
             }
         }
     }
@@ -3691,6 +3689,19 @@
             }
         }
     }
+    if ($env{'form.chome'} eq 'default') {
+        my %servers = &Apache::lonnet::get_servers($dom,'library');
+        my $numlib = keys(%servers);
+        if ($numlib) {
+            my $loadm=10000000;
+            my $chome;
+            foreach my $tryserver (keys(%servers)) {
+                ($chome,$loadm) =
+                    &Apache::lonnet::compare_server_load($tryserver,$chome,$loadm);
+            }
+            $env{'form.chome'} = $chome;
+        }
+    }
     my $details = {
                     owner          => $env{'user.name'},
                     domain         => $env{'user.domain'}, 




More information about the LON-CAPA-cvs mailing list