SloodleSessionThe primary API class, which manages all other parts.
Located in /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.
Verifies security for the incoming user-centric request.
This ensures that the identified object is authorised for user-centric activities with the specified user.
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.
Validate the avatar specified in the request, to ensure it is registered to a Moodle account.
(Also ensures that avatar details were in fact provided in the request). This is effectively a less strict version of validated_user(), which also checks enrolment and such like. This function will NOT perform auto-registration or auto-enrolment.
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. If the request indicates that it relates to an object, then the validation fails. Note: if you only require to ensure that an avatar is registered, then use validate_avatar().
Documentation generated on Mon, 07 Jul 2008 12:33:15 +0100 by phpDocumentor 1.4.0