[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Thu, 30 Dec 2004 16:07:48 -0000
raeburn Thu Dec 30 11:07:48 2004 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
We want auto_instcode_format to gather information from the localenroll.pm on a library server for the domain, not from the server hosting this log-in session.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.583 loncom/lonnet/perl/lonnet.pm:1.584
--- loncom/lonnet/perl/lonnet.pm:1.583 Wed Dec 22 15:34:49 2004
+++ loncom/lonnet/perl/lonnet.pm Thu Dec 30 11:07:48 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.583 2004/12/22 20:34:49 matthew Exp $
+# $Id: lonnet.pm,v 1.584 2004/12/30 16:07:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3372,11 +3372,18 @@
my $courses = '';
my $homeserver;
if ($caller eq 'global') {
- $homeserver = $perlvar{'lonHostID'};
+ foreach my $tryserver (keys %libserv) {
+ if ($hostdom{$tryserver} eq $codedom) {
+ $homeserver = $tryserver;
+ last;
+ }
+ }
+ if (($ENV{'user.name'}) && ($ENV{'user.domain'} eq $codedom)) {
+ $homeserver = &homeserver($ENV{'user.name'},$codedom);
+ }
} else {
$homeserver = &homeserver($caller,$codedom);
}
- my $host=$hostname{$homeserver};
foreach (keys %{$instcodes}) {
$courses .= &escape($_).'='.&escape($$instcodes{$_}).'&';
}