[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm /homework lonhomework.pm /interface lonfeedback.pm /lonnet/perl lonnet.pm rat lonpageflip.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 17 Sep 2003 17:50:50 -0000


albertel		Wed Sep 17 13:50:50 2003 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
    /loncom/homework	lonhomework.pm 
    /loncom/interface	lonfeedback.pm 
    /rat	lonpageflip.pm 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - an even better solution
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.69 loncom/auth/lonroles.pm:1.70
--- loncom/auth/lonroles.pm:1.69	Mon Sep 15 17:50:49 2003
+++ loncom/auth/lonroles.pm	Wed Sep 17 13:50:49 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.69 2003/09/15 21:50:49 albertel Exp $
+# $Id: lonroles.pm,v 1.70 2003/09/17 17:50:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -172,7 +172,7 @@
 			if (($ENV{'form.orgurl'}) && 
 			    ($ENV{'form.orgurl'}!~/^\/adm\/flip/)) {
 			    my $dest=$ENV{'form.orgurl'};
-			    if ( $Apache::lonnet::perlvar{'MODPERL2'} ) {
+			    if ( $Apache::lonnet::mod_perl_version() == 2 ) {
 				&Apache::lonnet::cleanenv();
 			    }
 			    $r->internal_redirect($dest);
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.142 loncom/homework/lonhomework.pm:1.143
--- loncom/homework/lonhomework.pm:1.142	Mon Sep 15 17:50:49 2003
+++ loncom/homework/lonhomework.pm	Wed Sep 17 13:50:49 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.142 2003/09/15 21:50:49 albertel Exp $
+# $Id: lonhomework.pm,v 1.143 2003/09/17 17:50:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -660,7 +660,7 @@
     # if we are browsing we might not be able to know where we are
     if ($Apache::lonhomework::browse ne 'F') {
       #should know where we are, so ask
-	if ( $Apache::lonnet::perlvar{'MODPERL2'} ) {
+	if ( $Apache::lonnet::mod_perl_version() == 2 ) {
 	    &Apache::lonnet::cleanenv();
 	}
 	$request->internal_redirect('/adm/ambiguous'); return;
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.58 loncom/interface/lonfeedback.pm:1.59
--- loncom/interface/lonfeedback.pm:1.58	Mon Sep 15 17:50:49 2003
+++ loncom/interface/lonfeedback.pm	Wed Sep 17 13:50:49 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.58 2003/09/15 21:50:49 albertel Exp $
+# $Id: lonfeedback.pm,v 1.59 2003/09/17 17:50:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -737,7 +737,7 @@
    }
   } else {
 # Ambiguous Problem Resource
-      if ( $Apache::lonnet::perlvar{'MODPERL2'} ) {
+      if ( $Apache::lonnet::mod_perl_version() == 2 ) {
 	  &Apache::lonnet::cleanenv();
       }
       $r->internal_redirect('/adm/ambiguous');
Index: rat/lonpageflip.pm
diff -u rat/lonpageflip.pm:1.43 rat/lonpageflip.pm:1.44
--- rat/lonpageflip.pm:1.43	Mon Sep 15 17:50:49 2003
+++ rat/lonpageflip.pm	Wed Sep 17 13:50:49 2003
@@ -2,7 +2,7 @@
 #
 # Page flip handler
 #
-# $Id: lonpageflip.pm,v 1.43 2003/09/15 21:50:49 albertel Exp $
+# $Id: lonpageflip.pm,v 1.44 2003/09/17 17:50:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -388,7 +388,7 @@
           }
       } else {
 # ---------------------------------------- No, could not determine where we are
-	  if ( $Apache::lonnet::perlvar{'MODPERL2'} ) {
+	  if ( $Apache::lonnet::mod_perl_version() == 2 ) {
 	      &Apache::lonnet::cleanenv();
 	  }
 	  $r->internal_redirect('/adm/ambiguous');
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.414 loncom/lonnet/perl/lonnet.pm:1.415
--- loncom/lonnet/perl/lonnet.pm:1.414	Tue Sep 16 21:45:14 2003
+++ loncom/lonnet/perl/lonnet.pm	Wed Sep 17 13:50:49 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.414 2003/09/17 01:45:14 www Exp $
+# $Id: lonnet.pm,v 1.415 2003/09/17 17:50:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4196,6 +4196,12 @@
     return $str;
 }
 
+sub mod_perl_version {
+    if (defined($perlvar{'MODPERL2'})) {
+	return 2;
+    }
+    return 1;
+}
 # ================================================================ Main Program
 
 sub goodbye {