|
| add_grade_service (?\moodle_url $lineitemsurl=null, ?\moodle_url $lineitemurl=null, array $scopes=[]) |
| Add grade service information to this resource_link instance.
|
|
| add_names_and_roles_service (\moodle_url $contextmembershipurl, array $serviceversions) |
| Add names and roles service information to this resource_link instance.
|
|
| add_user (int $userid, string $sourceid, string $lang, string $city, string $country, string $institution, string $timezone, ?int $maildisplay=null) |
| Factory method to create a user from this resource_link instance.
|
|
| get_contextid () |
| Return the id of the context object holding information about where this resource link resides.
|
|
| get_deploymentid () |
| Return the id of the deployment to which this resource link belongs.
|
|
| get_grade_service () |
| Get the grade service attached to this resource_link instance, or null if there isn't one associated.
|
|
| get_id () |
| Return the id of this object instance.
|
|
| get_names_and_roles_service () |
| Get the names and roles service attached to this resource_link instance, or null if there isn't one associated.
|
|
| get_resourceid () |
| Get the local id of the published resource to which this resource link refers.
|
|
| get_resourcelinkid () |
| Get the resourcelinkid as provided by the platform.
|
|
| set_contextid (int $contextid) |
| Link this resource_link instance with a context.
|
|
| set_resourceid (int $resourceid) |
| Set which local published resource this resource link refers to.
|
|
|
static | create (string $resourcelinkid, int $deploymentid, int $resourceid, ?int $contextid=null, int $id=null) |
| Factory method to create an instance.
|
|
◆ add_grade_service()
enrol_lti\local\ltiadvantage\entity\resource_link::add_grade_service |
( |
?\moodle_url | $lineitemsurl = null, |
|
|
?\moodle_url | $lineitemurl = null, |
|
|
array | $scopes = [] ) |
Add grade service information to this resource_link instance.
- Parameters
-
moodle_url | null | $lineitemsurl | the service URL for get/put of line items, if supported. |
moodle_url | null | $lineitemurl | the service URL if only a single line item is present in the platform. |
string[] | $scopes | the string array of grade service scopes which may be used by the service. |
◆ add_names_and_roles_service()
enrol_lti\local\ltiadvantage\entity\resource_link::add_names_and_roles_service |
( |
\moodle_url | $contextmembershipurl, |
|
|
array | $serviceversions ) |
Add names and roles service information to this resource_link instance.
- Parameters
-
moodle_url | $contextmembershipurl | the service URL for memberships. |
string[] | $serviceversions | the string array of supported service versions. |
◆ add_user()
enrol_lti\local\ltiadvantage\entity\resource_link::add_user |
( |
int | $userid, |
|
|
string | $sourceid, |
|
|
string | $lang, |
|
|
string | $city, |
|
|
string | $country, |
|
|
string | $institution, |
|
|
string | $timezone, |
|
|
?int | $maildisplay = null ) |
Factory method to create a user from this resource_link instance.
This is useful for associating the user with the resource link and resource I.e. the user was created when launching a specific resource link.
- Parameters
-
int | $userid | the id of the Moodle user record. |
string | $sourceid | the id of the user on the platform. |
string | $lang | the user's lang code. |
string | $city | the user's city. |
string | $country | the user's country. |
string | $institution | the user's institution. |
string | $timezone | the user's timezone. |
int | null | $maildisplay | the user's maildisplay, which can be omitted to use sensible defaults. |
- Return values
-
- Exceptions
-
coding_exception | if trying to add a user to an as-yet-unsaved resource_link instance. |
◆ create()
static enrol_lti\local\ltiadvantage\entity\resource_link::create |
( |
string | $resourcelinkid, |
|
|
int | $deploymentid, |
|
|
int | $resourceid, |
|
|
?int | $contextid = null, |
|
|
int | $id = null ) |
|
static |
Factory method to create an instance.
- Parameters
-
string | $resourcelinkid | the resourcelinkid, as provided by the platform. |
int | $deploymentid | the local id of the deployment to which this resource link belongs. |
int | $resourceid | the id of the local resource this resource_link refers to. |
int | null | $contextid | the id of the local context object representing the platform context. |
int | null | $id | the local id of the resource link instance. |
- Return values
-
resource_link | the newly created instance. |
◆ get_contextid()
enrol_lti\local\ltiadvantage\entity\resource_link::get_contextid |
( |
| ) |
|
Return the id of the context object holding information about where this resource link resides.
- Return values
-
int|null | the id or null if not present. |
◆ get_deploymentid()
enrol_lti\local\ltiadvantage\entity\resource_link::get_deploymentid |
( |
| ) |
|
Return the id of the deployment to which this resource link belongs.
This id is the local id of the deployment instance, not the deploymentid provided by the platform.
- Return values
-
◆ get_grade_service()
enrol_lti\local\ltiadvantage\entity\resource_link::get_grade_service |
( |
| ) |
|
Get the grade service attached to this resource_link instance, or null if there isn't one associated.
- Return values
-
ags_info|null | the grade service object instance, or null if not found. |
◆ get_id()
enrol_lti\local\ltiadvantage\entity\resource_link::get_id |
( |
| ) |
|
Return the id of this object instance.
- Return values
-
null|int | the id or null if the object has not yet been stored. |
◆ get_names_and_roles_service()
enrol_lti\local\ltiadvantage\entity\resource_link::get_names_and_roles_service |
( |
| ) |
|
Get the names and roles service attached to this resource_link instance, or null if there isn't one associated.
- Return values
-
nrps_info|null | the names and roles service object instance, or null if not found. |
◆ get_resourceid()
enrol_lti\local\ltiadvantage\entity\resource_link::get_resourceid |
( |
| ) |
|
Get the local id of the published resource to which this resource link refers.
- Return values
-
int | the id of the published resource. |
◆ get_resourcelinkid()
enrol_lti\local\ltiadvantage\entity\resource_link::get_resourcelinkid |
( |
| ) |
|
Get the resourcelinkid as provided by the platform.
- Return values
-
string | the resourcelinkid. |
◆ set_contextid()
enrol_lti\local\ltiadvantage\entity\resource_link::set_contextid |
( |
int | $contextid | ) |
|
Link this resource_link instance with a context.
- Parameters
-
int | $contextid | the local id of the context instance containing information about the platform context. |
◆ set_resourceid()
enrol_lti\local\ltiadvantage\entity\resource_link::set_resourceid |
( |
int | $resourceid | ) |
|
Set which local published resource this resource link refers to.
- Parameters
-
int | $resourceid | the published resource id. |
The documentation for this class was generated from the following file:
- enrol/lti/classes/local/ltiadvantage/entity/resource_link.php