Dear,
After futher checking, i find below issue for auth_saml2 plugin
https://github.com/catalyst/moodle-auth_saml2/issues/117
Then I comment out pre_login_page_hook function like the following in <<moodle root>>/auth/saml2/auth.php file
Now, I can direct access some activities link e.g. https://<<moodle dev site>>/mod/turnitintooltwo/view.php?id=8529
It seem it is relevant to unset session and loginpage_hook issue.
Now I set "dual login" to "off" for auth_saml2 plugin in Moodle system.
Is it relevant?
If yes, can I comment these? does it any impact if I comment these?
******** original content*******************************************
.....
global $SESSION;
$this->log(__FUNCTION__ . ' enter');
// If we previously tried to force saml on, but then navigated
// away, and come in from another deep link while dual auth is
// on, then reset the previous session memory of forcing SAML.
if (isset($SESSION->saml)) {
$this->log(__FUNCTION__ . ' unset $SESSION->saml');
unset($SESSION->saml);
}
$this->loginpage_hook();
$this->log(__FUNCTION__ . ' exit');
.....
******************************************************************
********** modified content (comment some calls)********************
....
global $SESSION;
$this->log(__FUNCTION__ . ' enter');
// If we previously tried to force saml on, but then navigated
// away, and come in from another deep link while dual auth is
// on, then reset the previous session memory of forcing SAML.
/*
if (isset($SESSION->saml)) {
$this->log(__FUNCTION__ . ' unset $SESSION->saml');
unset($SESSION->saml);
}
$this->loginpage_hook();
*/
$this->log(__FUNCTION__ . ' exit');
...
*******************************************************************