[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /auth lonlogin.pm

raeburn raeburn at source.lon-capa.org
Fri Mar 6 17:32:39 EST 2015


raeburn		Fri Mar  6 22:32:39 2015 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/auth	lonlogin.pm 
  Log:
  - For 2.11
    - Backport 1.161
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.158 loncom/auth/lonlogin.pm:1.158.2.1
--- loncom/auth/lonlogin.pm:1.158	Tue Nov 26 03:17:09 2013
+++ loncom/auth/lonlogin.pm	Fri Mar  6 22:32:39 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.158 2013/11/26 03:17:09 raeburn Exp $
+# $Id: lonlogin.pm,v 1.158.2.1 2015/03/06 22:32:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -378,6 +378,29 @@
 	       alink        => "$alink",
                onload       => 'javascript:enableInput();',);
 
+    my %defaultdomconf = &Apache::loncommon::get_domainconf($defdom);
+    my $headextra = $defaultdomconf{$defdom.'.login.headtag_'.$lonhost};
+    my $headextra_exempt = $defaultdomconf{$domain.'.login.headtag_exempt_'.$lonhost};
+    if ($headextra) {
+        my $omitextra;
+        if ($headextra_exempt ne '') {
+            my @exempt = split(',',$headextra_exempt);
+            my $ip = $ENV{'REMOTE_ADDR'};
+            if (grep(/^\Q$ip\E$/, at exempt)) {
+                $omitextra = 1;
+            }
+        }
+        unless ($omitextra) {
+            my $confname = $defdom.'-domainconfig';
+            if ($headextra =~ m{^\Q/res/$defdom/$confname/login/headtag/$lonhost/\E}) {
+                my $extra = &Apache::lonnet::getfile(&Apache::lonnet::filelocation("",$headextra));
+                unless ($extra eq '-1') {
+                    $js .= "\n".$extra."\n";
+                }
+            }
+        }
+    }
+
     $r->print(&Apache::loncommon::start_page('The LearningOnline Network with CAPA Login',$js,
 			       { 'redirect'       => [$expire,'/adm/roles'], 
 				 'add_entries' => \%add_entries,




More information about the LON-CAPA-cvs mailing list