Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

llamar a un .jsp en moodle

Estas en el tema de llamar a un .jsp en moodle en el foro de Sistemas de gestión de contenidos en Foros del Web. Hola amig@s, estoy en Moodle y necesito que cuando un usuario vaya a desconectarse, se ejecute justo antes de salir un archivo .jsp . El ...
  #1 (permalink)  
Antiguo 30/03/2012, 08:32
Avatar de garciasanchezdani  
Fecha de Ingreso: noviembre-2011
Mensajes: 429
Antigüedad: 12 años, 5 meses
Puntos: 51
llamar a un .jsp en moodle

Hola amig@s, estoy en Moodle y necesito que cuando un usuario vaya a desconectarse, se ejecute justo antes de salir un archivo .jsp. El caso es que no sé con seguridad cómo hacerlo.

El archivo php de moodle encargado de cerrar la sesión es el siguiente: (prestad atención solamente a la penúltima línea del código, pues el resto está bien. En esa penúltima línea no sé cómo llamar al .jsp)

Código PHP:
<?php

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

/**
 * Logs the user out and sends them to the home page
 *
 * @package    core
 * @subpackage auth
 * @copyright  1999 onwards Martin Dougiamas  http://dougiamas.com
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

require_once('../config.php');

$PAGE->set_url('/login/logout.php');
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));

$sesskey optional_param('sesskey''__notpresent__'PARAM_RAW); // we want not null default to prevent required sesskey warning
$login   optional_param('loginpage'0PARAM_BOOL);

// can be overridden by auth plugins
if ($login) {
    
$redirect get_login_url();
} else {
    
$redirect $CFG->wwwroot.'/';
}

if (!
isloggedin()) {
    
// no confirmation, user has already logged out
    
require_logout();
    
redirect($redirect);

} else if (!
confirm_sesskey($sesskey)) {
    
$PAGE->set_title($SITE->fullname);
    
$PAGE->set_heading($SITE->fullname);
    echo 
$OUTPUT->header();
    echo 
$OUTPUT->confirm(get_string('logoutconfirm'), new moodle_url($PAGE->url, array('sesskey'=>sesskey())), $CFG->wwwroot.'/');
    echo 
$OUTPUT->footer();
    die;
}

$authsequence get_enabled_auth_plugins(); // auths, in sequence
foreach($authsequence as $authname) {
    
$authplugin get_auth_plugin($authname);
    
$authplugin->logoutpage_hook();
}

require_logout();

//hago la llamada al jsp
include "http://MI_IP:MI_PUERTO/MIJSP.jsp";
    
redirect($redirect);
?>
Saludos, Daniel
  #2 (permalink)  
Antiguo 30/03/2012, 09:14
 
Fecha de Ingreso: enero-2011
Ubicación: /root
Mensajes: 530
Antigüedad: 13 años, 3 meses
Puntos: 61
Respuesta: llamar a un .jsp en un archivo php

Puedes usar la funcion

Código PHP:
Ver original
  1. <?php
  2. header("Location: http://www.example.com/");
  3. ?>

http://php.net/manual/es/function.header.php
Saludos
  #3 (permalink)  
Antiguo 02/04/2012, 05:53
Avatar de garciasanchezdani  
Fecha de Ingreso: noviembre-2011
Mensajes: 429
Antigüedad: 12 años, 5 meses
Puntos: 51
Respuesta: llamar a un .jsp en moodle

Gracias matt_1985

Etiquetas: html, jsp, php, usuarios
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:48.