function lti_tool_provider_return in LTI Tool Provider 7
Page callback for the lti return menu item.
1 string reference to 'lti_tool_provider_return'
- lti_tool_provider_menu in ./
lti_tool_provider.module - Implements hook_menu().
File
- ./
lti_tool_provider.operations.inc, line 149 - Menu page callbacks for the lti operations launch, return as well as home and info.
Code
function lti_tool_provider_return() {
// Logout the user and redirect to the return url in the context_info.
global $user;
if (isset($_SESSION['lti_tool_provider_context_info'])) {
// Log user out and return to launch presentation.
module_invoke_all('lti_tool_provider_return');
$url = isset($_SESSION['lti_tool_provider_context_info']['launch_presentation_return_url']) ? $_SESSION['lti_tool_provider_context_info']['launch_presentation_return_url'] : '';
}
watchdog('user', 'Session closed for %name.', array(
'%name' => $user->name,
));
module_invoke_all('user_logout', $user);
// Destroy the current session, and reset $user to the anonymous user.
session_destroy();
lti_tool_provider_goto($url);
}