[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 03 Jul 2006 00:44:21 -0000


albertel		Sun Jul  2 20:44:21 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - adding ability to hide the automatic 'continue' link of redirects
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.413 loncom/interface/loncommon.pm:1.414
--- loncom/interface/loncommon.pm:1.413	Sun Jul  2 20:11:53 2006
+++ loncom/interface/loncommon.pm	Sun Jul  2 20:44:21 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.413 2006/07/03 00:11:53 albertel Exp $
+# $Id: loncommon.pm,v 1.414 2006/07/03 00:44:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3513,9 +3513,11 @@
     }
 
     if (ref($args->{'redirect'})) {
-	my ($time,$url) = @{$args->{'redirect'}};
+	my ($time,$url,$inhibit_continue) = @{$args->{'redirect'}};
 	$url = &Apache::lonenc::check_encrypt($url);
-	$env{'internal.head.redirect'} = $url;
+	if (!$inhibit_continue) {
+	    $env{'internal.head.redirect'} = $url;
+	}
 	$result.=<<ADDMETA
 <meta http-equiv="pragma" content="no-cache" />
 <meta http-equiv="Refresh" content="$time; url=$url" />
@@ -3525,8 +3527,9 @@
 	$title = 'The LearningOnline Network with CAPA';
     }
     
-    $result .= '<title> LON-CAPA '.&mt($title).'</title>'.$head_extra
-	.'<link rel="stylesheet" type="text/css" href="'.$url.'" />';
+    $result .= '<title> LON-CAPA '.&mt($title).'</title>'
+	.'<link rel="stylesheet" type="text/css" href="'.$url.'" />'
+	.$head_extra;
     return $result;
 }