|
| get_city () |
| Get the user's city.
|
|
| get_country () |
| Get the user's country code.
|
|
| get_deploymentid () |
| Get the id of the deployment instance to which this user belongs.
|
|
| get_id () |
| Get the id of this user instance.
|
|
| get_institution () |
| Get the instituation of the user.
|
|
| get_lang () |
| Get the lang code of the user.
|
|
| get_lastaccess () |
| Get the last access timestamp for this user.
|
|
| get_lastgrade () |
| Get the last grade value for this user.
|
|
| get_localid () |
| Get the id of the user in the tool.
|
|
| get_maildisplay () |
| Get the maildisplay of the user.
|
|
| get_resourceid () |
| Get the id of the published resource to which this user is associated.
|
|
| get_resourcelinkid () |
| Get the id of the resource_link instance to which this user is associated.
|
|
| get_sourceid () |
| Get the id of the user in the platform.
|
|
| get_timezone () |
| Get the timezone of the user.
|
|
| set_city (string $city) |
| Set the user's city.
|
|
| set_country (string $countrycode) |
| Set the user's country.
|
|
| set_institution (string $institution) |
| Set the user's institution.
|
|
| set_lang (string $langcode) |
| Set the user's language.
|
|
| set_lastaccess (int $time) |
| Set the last access time for the user.
|
|
| set_lastgrade (float $lastgrade) |
| Set the last grade for the user.
|
|
| set_maildisplay (int $maildisplay) |
| Set the user's mail display preference from a range of supported options.
|
|
| set_resourcelinkid (int $resourcelinkid) |
| Associate this user with the given resource_link instance, denoting that this user launched from the instance.
|
|
| set_timezone (string $timezone) |
| Set the user's timezone, or set '99' to specify server timezone.
|
|
|
static | create (int $resourceid, int $userid, int $deploymentid, string $sourceid, string $lang, string $timezone, string $city='', string $country='', string $institution='', ?int $maildisplay=null, ?float $lastgrade=null, ?int $lastaccess=null, ?int $resourcelinkid=null, int $id=null) |
| Factory method for creating a user.
|
|
static | create_from_resource_link (int $resourcelinkid, int $resourceid, int $userid, int $deploymentid, string $sourceid, string $lang, string $timezone, string $city='', string $country='', string $institution='', ?int $maildisplay=null) |
| Factory method for creating a user instance associated with a given resource_link instance.
|
|
◆ create()
static enrol_lti\local\ltiadvantage\entity\user::create |
( |
int | $resourceid, |
|
|
int | $userid, |
|
|
int | $deploymentid, |
|
|
string | $sourceid, |
|
|
string | $lang, |
|
|
string | $timezone, |
|
|
string | $city = '', |
|
|
string | $country = '', |
|
|
string | $institution = '', |
|
|
?int | $maildisplay = null, |
|
|
?float | $lastgrade = null, |
|
|
?int | $lastaccess = null, |
|
|
?int | $resourcelinkid = null, |
|
|
int | $id = null ) |
|
static |
Factory method for creating a user.
- Parameters
-
int | $resourceid | the id of the published resource to which this user belongs. |
int | $userid | the id of the Moodle user to which this LTI user relates. |
int | $deploymentid | the local id of the deployment instance to which this user belongs. |
string | $sourceid | the id of the user in the platform site. |
string | $lang | the user's language code. |
string | $timezone | the user's timezone. |
string | $city | the user's city. |
string | $country | the user's country. |
string | $institution | the user's institution. |
int | null | $maildisplay | the user's maildisplay, or null to select defaults. |
float | null | $lastgrade | the user's last grade value. |
int | null | $lastaccess | the user's last access time, or null if they haven't accessed the resource. |
int | null | $resourcelinkid | the local id of the resource link instance associated with the user. |
int | null | $id | the id of this lti user instance, or null if it's a not-yet-persisted object. |
- Return values
-
◆ create_from_resource_link()
static enrol_lti\local\ltiadvantage\entity\user::create_from_resource_link |
( |
int | $resourcelinkid, |
|
|
int | $resourceid, |
|
|
int | $userid, |
|
|
int | $deploymentid, |
|
|
string | $sourceid, |
|
|
string | $lang, |
|
|
string | $timezone, |
|
|
string | $city = '', |
|
|
string | $country = '', |
|
|
string | $institution = '', |
|
|
?int | $maildisplay = null ) |
|
static |
Factory method for creating a user instance associated with a given resource_link instance.
- Parameters
-
int | $resourcelinkid | the local id of the resource link instance to link to the user. |
int | $resourceid | the id of the published resource to which this user belongs. |
int | $userid | the id of the Moodle user to which this LTI user relates. |
int | $deploymentid | the local id of the deployment instance to which this user belongs. |
string | $sourceid | the id of the user in the platform site. |
string | $lang | the user's language code. |
string | $timezone | the user's timezone. |
string | $city | the user's city. |
string | $country | the user's country. |
string | $institution | the user's institution. |
int | null | $maildisplay | the user's maildisplay, or null to select defaults. |
- Return values
-
◆ get_city()
enrol_lti\local\ltiadvantage\entity\user::get_city |
( |
| ) |
|
Get the user's city.
- Return values
-
◆ get_country()
enrol_lti\local\ltiadvantage\entity\user::get_country |
( |
| ) |
|
Get the user's country code.
- Return values
-
◆ get_deploymentid()
enrol_lti\local\ltiadvantage\entity\user::get_deploymentid |
( |
| ) |
|
Get the id of the deployment instance to which this user belongs.
- Return values
-
int | id of the deployment instance. |
◆ get_id()
enrol_lti\local\ltiadvantage\entity\user::get_id |
( |
| ) |
|
Get the id of this user instance.
- Return values
-
int|null | the object id, or null if not yet persisted. |
◆ get_institution()
enrol_lti\local\ltiadvantage\entity\user::get_institution |
( |
| ) |
|
Get the instituation of the user.
- Return values
-
◆ get_lang()
enrol_lti\local\ltiadvantage\entity\user::get_lang |
( |
| ) |
|
Get the lang code of the user.
- Return values
-
string | the user's language code. |
◆ get_lastaccess()
enrol_lti\local\ltiadvantage\entity\user::get_lastaccess |
( |
| ) |
|
Get the last access timestamp for this user.
- Return values
-
int|null | the last access timestampt, or null if the user hasn't accessed the resource. |
◆ get_lastgrade()
enrol_lti\local\ltiadvantage\entity\user::get_lastgrade |
( |
| ) |
|
Get the last grade value for this user.
- Return values
-
◆ get_localid()
enrol_lti\local\ltiadvantage\entity\user::get_localid |
( |
| ) |
|
Get the id of the user in the tool.
- Return values
-
int|null | the id, or null if the object instance hasn't yet been persisted. |
◆ get_maildisplay()
enrol_lti\local\ltiadvantage\entity\user::get_maildisplay |
( |
| ) |
|
Get the maildisplay of the user.
- Return values
-
◆ get_resourceid()
enrol_lti\local\ltiadvantage\entity\user::get_resourceid |
( |
| ) |
|
Get the id of the published resource to which this user is associated.
- Return values
-
◆ get_resourcelinkid()
enrol_lti\local\ltiadvantage\entity\user::get_resourcelinkid |
( |
| ) |
|
Get the id of the resource_link instance to which this user is associated.
- Return values
-
int|null | the object id, or null if the user isn't associated with one. |
◆ get_sourceid()
enrol_lti\local\ltiadvantage\entity\user::get_sourceid |
( |
| ) |
|
Get the id of the user in the platform.
- Return values
-
◆ get_timezone()
enrol_lti\local\ltiadvantage\entity\user::get_timezone |
( |
| ) |
|
Get the timezone of the user.
- Return values
-
◆ set_city()
enrol_lti\local\ltiadvantage\entity\user::set_city |
( |
string | $city | ) |
|
Set the user's city.
- Parameters
-
string | $city | the city string. |
◆ set_country()
enrol_lti\local\ltiadvantage\entity\user::set_country |
( |
string | $countrycode | ) |
|
Set the user's country.
- Parameters
-
string | $countrycode | the 2 digit country code representing the country, or '' to denote none. |
◆ set_institution()
enrol_lti\local\ltiadvantage\entity\user::set_institution |
( |
string | $institution | ) |
|
Set the user's institution.
- Parameters
-
string | $institution | the name of the institution. |
◆ set_lang()
enrol_lti\local\ltiadvantage\entity\user::set_lang |
( |
string | $langcode | ) |
|
Set the user's language.
- Parameters
-
string | $langcode | the language code representing the user's language. |
◆ set_lastaccess()
enrol_lti\local\ltiadvantage\entity\user::set_lastaccess |
( |
int | $time | ) |
|
Set the last access time for the user.
- Parameters
-
int | $time | unix timestamp representing the last time the user accessed the published resource. |
- Exceptions
-
◆ set_lastgrade()
enrol_lti\local\ltiadvantage\entity\user::set_lastgrade |
( |
float | $lastgrade | ) |
|
Set the last grade for the user.
- Parameters
-
float | $lastgrade | the last grade the user received. |
◆ set_maildisplay()
enrol_lti\local\ltiadvantage\entity\user::set_maildisplay |
( |
int | $maildisplay | ) |
|
Set the user's mail display preference from a range of supported options.
0 - hide from non privileged users 1 - allow everyone to see 2 - allow only course participants to see
- Parameters
-
int | $maildisplay | the maildisplay preference to set. |
◆ set_resourcelinkid()
enrol_lti\local\ltiadvantage\entity\user::set_resourcelinkid |
( |
int | $resourcelinkid | ) |
|
Associate this user with the given resource_link instance, denoting that this user launched from the instance.
- Parameters
-
int | $resourcelinkid | the id of the resource_link instance. |
◆ set_timezone()
enrol_lti\local\ltiadvantage\entity\user::set_timezone |
( |
string | $timezone | ) |
|
Set the user's timezone, or set '99' to specify server timezone.
- Parameters
-
string | $timezone | the timezone string, or '99' to use server timezone. |
The documentation for this class was generated from the following file:
- enrol/lti/classes/local/ltiadvantage/entity/user.php