[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm
From: raeburn <raeburn () source ! lon-capa ! org>
Date: 2015-06-06 14:08:58
Message-ID: cvsraeburn1433599738 () cvsserver
[Download RAW message or body]
raeburn Sat Jun 6 14:08:58 2015 EDT
Modified files:
/loncom/auth lonlogin.pm
Log:
- Support custom HTML mark-up in head block of log-in page for different
domains on a multi-domain server.
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.162 loncom/auth/lonlogin.pm:1.163
--- loncom/auth/lonlogin.pm:1.162 Fri Mar 6 20:39:22 2015
+++ loncom/auth/lonlogin.pm Sat Jun 6 14:08:58 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.162 2015/03/06 20:39:22 raeburn Exp $
+# $Id: lonlogin.pm,v 1.163 2015/06/06 14:08:58 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -395,9 +395,20 @@
alink => "$alink",
onload => 'javascript:enableInput();',);
+ my ($lonhost_in_use,$headextra);
+ my @hosts = &Apache::lonnet::current_machine_ids();
+ my $lonhost_in_use = $lonhost;
+ if (@hosts > 1) {
+ foreach my $hostid (@hosts) {
+ if (&Apache::lonnet::host_domain($hostid) eq $defdom) {
+ $lonhost_in_use = $hostid;
+ last;
+ }
+ }
+ }
my %defaultdomconf = &Apache::loncommon::get_domainconf($defdom);
- my $headextra = $defaultdomconf{$defdom.'.login.headtag_'.$lonhost};
- my $headextra_exempt = $defaultdomconf{$domain.'.login.headtag_exempt_'.$lonhost};
+ my $headextra = $defaultdomconf{$defdom.'.login.headtag_'.$lonhost_in_use};
+ my $headextra_exempt = $defaultdomconf{$domain.'.login.headtag_exempt_'.$lonhost_in_use};
if ($headextra) {
my $omitextra;
if ($headextra_exempt ne '') {
@@ -409,7 +420,7 @@
}
unless ($omitextra) {
my $confname = $defdom.'-domainconfig';
- if ($headextra =~ m{^\Q/res/$defdom/$confname/login/headtag/$lonhost/\E}) {
+ if ($headextra =~ m{^\Q/res/$defdom/$confname/login/headtag/$lonhost_in_use/\E}) {
my $extra = &Apache::lonnet::getfile(&Apache::lonnet::filelocation("",$headextra));
unless ($extra eq '-1') {
$js .= "\n".$extra."\n";
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic