Skip to main content

Function: readSessionFacts()

function readSessionFacts(page): Promise<SessionFacts>;

Defined in: core/session.ts:30

What page, as it is now, says about its session: Moodle's body class, M.cfg.userId and its login and logout links, which mean the same in any interface language. Give them to isLoggedIn; a page fetched as HTML goes through htmlSessionFacts instead.

Parameters​

ParameterType
pagePage

Returns​

Promise<SessionFacts>