SloodleSessionThe primary API class, which manages all other parts.
Located in /sloodle/lib/sloodle_session.php (line 32)
bool
validate_user
([bool $require = true], [bool $suppress_autoreg = false], [bool $suppress_autoenrol = false])
SloodleCourse
$course
= null (line 62)
The Sloodle course structure for the course this session is accessing
SloodleModule
$module
= null (line 70)
The Sloodle module this session relates to, if any.
Note: this may be the base Sloodle module class, or a derivative.
SloodleRequest
$request
= null (line 41)
Incoming HTTP request.
SloodleResponse
$response
= null (line 48)
Outgoing response - can be rendered to HTTP or as a string.
SloodleUser
$user
= null (line 55)
Current user information.
Constructor - initialises members
Verifies security for the incoming request (but does not check user access).
Initially ensures that the request is coming in on a valid and enabled course/controller (rejects it if not). The password is then checked, and it can handle prim-passwords and object-specific passwords.
Constructs and loads the appropriate module part of the session.
Note that this function will fail if the current VLE user (in the $user member) does not have permission to access it.
Validates the user account and enrolment (ensures there is an avatar linked to a VLE account, and that the VLE account is enrolled in the current course).
Attempts auto-registration/enrolment if that is allowed and required, and logs-in the user. Server access level is checked if it is specified in the request parameters. Note: if the request indicates that it relates to an object, then the validation fails.
Documentation generated on Mon, 16 Jun 2008 15:57:00 +0100 by phpDocumentor 1.4.0