lara-moodle-plugin/redirector.php
2024-12-12 09:41:03 +01:00

13 lines
No EOL
368 B
PHP

<?php
require_once('../../config.php');
$pmurl = optional_param('wantsurl',"/", PARAM_TEXT);
$PAGE->set_url(new moodle_url('local/auto_oauth2/redirector.php'));
$PAGE->set_context(\context_system::instance());
$PAGE->set_title("Redirect");
// id may need to be adjusted
redirect($CFG->wwwroot.'/auth/oauth2/login.php?id=1&wantsurl='.$pmurl.'&sesskey='.sesskey());