[LON-CAPA-cvs] cvs: rat(version_2_11_X) / lonpageflip.pm

raeburn raeburn at source.lon-capa.org
Thu Jun 26 14:21:24 EDT 2014


raeburn		Thu Jun 26 18:21:24 2014 EDT

  Modified files:              (Branch: version_2_11_X)
    /rat	lonpageflip.pm 
  Log:
  - For 2.11
    - Backport 1.85
  
  
Index: rat/lonpageflip.pm
diff -u rat/lonpageflip.pm:1.80.8.4 rat/lonpageflip.pm:1.80.8.5
--- rat/lonpageflip.pm:1.80.8.4	Mon Apr 28 20:23:35 2014
+++ rat/lonpageflip.pm	Thu Jun 26 18:21:24 2014
@@ -2,7 +2,7 @@
 #
 # Page flip handler
 #
-# $Id: lonpageflip.pm,v 1.80.8.4 2014/04/28 20:23:35 raeburn Exp $
+# $Id: lonpageflip.pm,v 1.80.8.5 2014/06/26 18:21:24 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -436,29 +436,13 @@
 		  if ($direction eq 'back') {
                      &Apache::lonnet::linklog($redirecturl,$currenturl);
 		  }
-# ------------------------------------------------- Check for critical messages
-		  if ((time-$env{'user.criticalcheck.time'})>300) {
-                     my @what=&Apache::lonnet::dump
-                                  ('critical',$env{'user.domain'},
-                                              $env{'user.name'});
-                     if ($what[0]) {
-	                if (($what[0] ne 'con_lost') && 
-                            ($what[0]!~/^error\:/)) {
-	                   $redirecturl='/adm/email?critical=display';
-			   $redirectsymb='';
-                        }
-                     }
-                     &Apache::lonnet::appenv({'user.criticalcheck.time'=>time});
-		  }
-
-                  if (($redirecturl =~ m{^/adm/navmaps}) &&
-                      ($env{'environment.remotenavmap'} eq 'on')) {
-                      &navlaunch($r);
-                      return OK;
+# ------------------------------------- Check for and display critical messages
+                  my ($redirect, $url) = &Apache::loncommon::critical_redirect(300);
+                  unless ($redirect) {
+                      $url=&Apache::lonnet::absolute_url().$redirecturl;
+                      $url = &add_get_param($url, { 'symb' => $redirectsymb});
                   }
-		  &Apache::loncommon::content_type($r,'text/html');
-		  my $url=&Apache::lonnet::absolute_url().$redirecturl;
-		  $url = &add_get_param($url, { 'symb' => $redirectsymb});
+                  &Apache::loncommon::content_type($r,'text/html');
                   $r->header_out(Location => $url);
                   return REDIRECT;
 	      } else {




More information about the LON-CAPA-cvs mailing list