Class to represent a platform user association with a resource link. More...
Public Member Functions | |
__construct () | |
Class constructor. | |
void | initialize () |
Initialise the user. | |
bool | save () |
Save the user to the database. | |
bool | delete () |
Delete the user from the database. | |
ResourceLink null | getResourceLink () |
Get resource link. | |
void | setResourceLink (ResourceLink $resourceLink) |
Set resource link. | |
int null | getRecordId () |
Get record ID of user. | |
void | setRecordId (?int $id) |
Set record ID of user. | |
void | setResourceLinkId (?int $resourceLinkId) |
Set resource link ID of user. | |
DataConnector null | getDataConnector () |
Get the data connector. | |
void | setDataConnector (?DataConnector $dataConnector) |
Set the data connector. | |
string null | getId (?IdScope $idScope=null, Context|Platform|null $source=null) |
Get the user ID (which may be a compound of the platform and resource link IDs). | |
![]() | |
void | initialise () |
Initialise the user. | |
void | setNames (string $firstname, string $lastname, string $fullname, ?string $middlename=null) |
Set the user's name. | |
void | setEmail (?string $email, ?string $defaultEmail=null) |
Set the user's email address. | |
bool | isLearner () |
Check if the user is a learner. | |
bool | isInstructor () |
Check if the user is an instructor. | |
bool | isContentDeveloper () |
Check if the user is a content developer. | |
bool | isTeachingAssistant () |
Check if the user is a teaching assistant. | |
bool | isManager () |
Check if the user is a manager. | |
bool | isMember () |
Check if the user is a member. | |
bool | isOfficer () |
Check if the user is an officer. | |
bool | isStaff () |
Check if the user is staff. | |
bool | isMentor () |
Check if the user is a mentor. | |
bool | isAdmin () |
Check if the user is an administrator (at any of the system, institution or context levels). | |
Static Public Member Functions | |
static UserResult | fromRecordId (int $id, DataConnector $dataConnector) |
Load the user from the database. | |
static UserResult | fromResourceLink (?ResourceLink $resourceLink, string $ltiUserId) |
Class constructor from resource link. | |
Public Attributes | |
string | $ltiResultSourcedId = null |
UserResult's result sourcedid. | |
int | $created = null |
Date/time the record was created. | |
int | $updated = null |
Date/time the record was last updated. | |
![]() | |
const | PRINCIPAL_ROLES |
List of principal roles for LTI 1.3. | |
string | $firstname = '' |
User's first name. | |
string | $middlename = '' |
User's middle name. | |
string | $lastname = '' |
User's last name (surname or family name). | |
string | $fullname = '' |
User's fullname. | |
string | $sourcedId = null |
User's sourcedId. | |
string | $username = null |
User's username. | |
string | $email = '' |
User's email address. | |
string | $image = '' |
User's image URI. | |
array | $roles = [] |
Roles for user. | |
array | $groups = [] |
Groups for user. | |
string | $ltiUserId = null |
user ID as supplied in the last connection request. | |
Additional Inherited Members | |
![]() | |
static bool | $allowEmptyName = false |
Allow user name field to be empty? | |
Class to represent a platform user association with a resource link.
ceLTIc\LTI\UserResult::__construct | ( | ) |
bool ceLTIc\LTI\UserResult::delete | ( | ) |
Delete the user from the database.
|
static |
Load the user from the database.
int | $id | Record ID of user |
DataConnector | $dataConnector | Database connection object |
References getDataConnector(), and initialize().
|
static |
Class constructor from resource link.
ResourceLink | null | $resourceLink | ResourceLink object |
string | $ltiUserId | UserResult ID value |
DataConnector null ceLTIc\LTI\UserResult::getDataConnector | ( | ) |
Get the data connector.
Referenced by __construct(), fromRecordId(), and initialize().
string null ceLTIc\LTI\UserResult::getId | ( | ?IdScope | $idScope = null, |
Context|Platform|null | $source = null ) |
Get the user ID (which may be a compound of the platform and resource link IDs).
int | $idScope | Scope to use for user ID (optional, default is null for consumer default setting) |
Context | Platform | null | $source | Context or Platform for user (optional) |
Referenced by ceLTIc\LTI\DataConnector\DataConnector_mysqli\deleteResourceLinkShareKey(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_oci8\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pdo\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\loadUserResult(), and ceLTIc\LTI\DataConnector\DataConnector_sql\loadUserResult().
int null ceLTIc\LTI\UserResult::getRecordId | ( | ) |
Get record ID of user.
Referenced by ceLTIc\LTI\DataConnector\DataConnector_mysqli\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_oci8\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pdo\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_sql\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\saveUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pdo\saveUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\saveUserResult(), and ceLTIc\LTI\DataConnector\DataConnector_sql\saveUserResult().
ResourceLink null ceLTIc\LTI\UserResult::getResourceLink | ( | ) |
Get resource link.
Referenced by ceLTIc\LTI\DataConnector\DataConnector_mysqli\deleteResourceLinkShareKey(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_oci8\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pdo\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_sql\loadUserResult(), and setRecordId().
void ceLTIc\LTI\UserResult::initialize | ( | ) |
Initialise the user.
Reimplemented from ceLTIc\LTI\User.
References ceLTIc\LTI\ResourceLink\fromRecordId(), and getDataConnector().
Referenced by ceLTIc\LTI\DataConnector\DataConnector\deleteResourceLinkShareKey(), fromRecordId(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\saveUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pdo\saveUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\saveUserResult(), and ceLTIc\LTI\DataConnector\DataConnector_sql\saveUserResult().
bool ceLTIc\LTI\UserResult::save | ( | ) |
Save the user to the database.
void ceLTIc\LTI\UserResult::setDataConnector | ( | ?DataConnector | $dataConnector | ) |
Set the data connector.
DataConnector | null | $dataConnector | Data connector object |
References ceLTIc\LTI\User\$ltiUserId.
void ceLTIc\LTI\UserResult::setRecordId | ( | ?int | $id | ) |
Set record ID of user.
int | null | $id | Record ID of user |
References getResourceLink().
Referenced by ceLTIc\LTI\DataConnector\DataConnector_mysqli\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_oci8\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pdo\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\loadUserResult(), and ceLTIc\LTI\DataConnector\DataConnector_sql\loadUserResult().
void ceLTIc\LTI\UserResult::setResourceLink | ( | ResourceLink | $resourceLink | ) |
Set resource link.
ResourceLink | $resourceLink | Resource link object |
void ceLTIc\LTI\UserResult::setResourceLinkId | ( | ?int | $resourceLinkId | ) |
Set resource link ID of user.
int | null | $resourceLinkId | Resource link ID of user |
int ceLTIc\LTI\UserResult::$created = null |
Date/time the record was created.
string ceLTIc\LTI\UserResult::$ltiResultSourcedId = null |
UserResult's result sourcedid.
int ceLTIc\LTI\UserResult::$updated = null |
Date/time the record was last updated.