[LON-CAPA-cvs] cvs: loncom(version_2_5_X) /homework lonhomework.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Fri, 21 Sep 2007 17:26:00 -0000


albertel		Fri Sep 21 13:26:00 2007 EDT

  Modified files:              (Branch: version_2_5_X)
    /loncom/homework	lonhomework.pm 
  Log:
  - backport 1.272
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.268.2.1 loncom/homework/lonhomework.pm:1.268.2.2
--- loncom/homework/lonhomework.pm:1.268.2.1	Thu Sep  6 10:41:00 2007
+++ loncom/homework/lonhomework.pm	Fri Sep 21 13:25:58 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.268.2.1 2007/09/06 14:41:00 albertel Exp $
+# $Id: lonhomework.pm,v 1.268.2.2 2007/09/21 17:25:58 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -196,7 +196,8 @@
 	return 1;
     }
     my $allowed=0;
-    my $ip=$ENV{'REMOTE_ADDR'};
+    my $ip=$env{'request.host'} || $ENV{'REMOTE_ADDR'};
+
     my $name;
     foreach my $pattern (split(',',$acc)) {
 	$pattern =~ s/^\s*//;