[LON-CAPA-cvs] cvs: loncom /auth lonlogout.pm

raeburn raeburn at source.lon-capa.org
Tue May 8 11:37:42 EDT 2018


raeburn		Tue May  8 15:37:42 2018 EDT

  Modified files:              
    /loncom/auth	lonlogout.pm 
  Log:
  - Bug 6754 LON-CAPA as LTI Provider
    - No log-in again link to LON-CAPA when accessed via LTI Consumer launch.
  
  
Index: loncom/auth/lonlogout.pm
diff -u loncom/auth/lonlogout.pm:1.53 loncom/auth/lonlogout.pm:1.54
--- loncom/auth/lonlogout.pm:1.53	Tue May  1 13:47:53 2018
+++ loncom/auth/lonlogout.pm	Tue May  8 15:37:41 2018
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Logout Handler
 #
-# $Id: lonlogout.pm,v 1.53 2018/05/01 13:47:53 raeburn Exp $
+# $Id: lonlogout.pm,v 1.54 2018/05/08 15:37:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -191,10 +191,12 @@
 	        $login_url = $relogin_server.'/adm/'.
 		    ($env{'request.sso.login'} ? 'roles': 'login?domain='.$domain);
             }
-            $relogmessage.='<p>'.&mt('You have been successfully logged out.').' '
-                          .&mt('You can [_1]close this window[_2] now.'
-                              ,'','') # ,'<a href="javascript:self.close();">','</a>')
-                          .'</p>';
+            $relogmessage.='<p>'.&mt('You have been successfully logged out.');
+            unless (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
+                $relogmessage.=' '.&mt('You can [_1]close this window[_2] now.',
+                                       '',''); # ,'<a href="javascript:self.close();">','</a>');
+            }
+            $relogmessage.='</p>';
 =pod
 
 =head1 NOTES:
@@ -204,9 +206,11 @@
 Due to security reasons in new web browsers a window could only be closed with javascript, if this window has also been opened with javascript. This is not done here which means that in most cases the close link will not work. Unless we find another solution, this link should not be offered. (Stefan Bisitz, 2008-08-01)
 
 =cut
-            $relogmessage.='<p>'.&mt('[_1]Log in again[_2]'
-                              ,'<a href="'.$login_url.'">','</a>')
-                          .'</p>';
+            unless ($env{'request.lti.login'}) {
+                $relogmessage.='<p>'.&mt('[_1]Log in again[_2]'
+                                  ,'<a href="'.$login_url.'">','</a>')
+                              .'</p>';
+            }
         }
         if ($env{'request.sso.login'}
 	    && defined($r->dir_config("lonSSOUserLogoutMessageFile_$domain"))) {




More information about the LON-CAPA-cvs mailing list