Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 181 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ags_info:: (9 methods):
  __construct()
  create()
  validate_scopes()
  get_lineitemsurl()
  get_lineitemurl()
  get_lineitemscope()
  get_resultscope()
  get_scorescope()
  get_scopes()


Class: ags_info  - X-Ref

The ags_info class, instances of which represent grade service information for a resource_link or context.

For information about Assignment and Grade Services 2.0, see https://www.imsglobal.org/spec/lti-ags/v2p0/.

__construct(?\moodle_url $lineitemsurl, ?\moodle_url $lineitemurl, array $scopes)   X-Ref
The ags_info constructor.

param: \moodle_url|null $lineitemsurl The service URL used to get/put lineitems, if supported.
param: \moodle_url|null $lineitemurl The lineitemurl, which is only present when a single lineitem is supported.
param: array $scopes The array of supported scopes for this service instance.

create(?\moodle_url $lineitemsurl = null, ?\moodle_url $lineitemurl = null,array $scopes = [])   X-Ref
Factory method to create a new ags_info instance.

param: \moodle_url|null $lineitemsurl The service URL used to get/put lineitems, if supported.
param: \moodle_url|null $lineitemurl The lineitemurl, which is only present when a single lineitem is supported.
param: array $scopes The array of supported scopes for this service instance.
return: ags_info the object instance.

validate_scopes(array $scopes)   X-Ref
Check the supplied scopes for validity and set instance vars if appropriate.

param: array $scopes the array of string scopes to check.

get_lineitemsurl()   X-Ref
Get the url for querying line items, if supported.

return: \moodle_url the url.

get_lineitemurl()   X-Ref
Get the single line item url, in cases where only one line item exists.

return: \moodle_url|null the url, or null if not present.

get_lineitemscope()   X-Ref
Get the authorization scope for lineitems.

return: array|null the scopes, if present, else null.

get_resultscope()   X-Ref
Get the authorization scope for results.

return: string|null the scope, if present, else null.

get_scorescope()   X-Ref
Get the authorization scope for scores.

return: string|null the scope, if present, else null.

get_scopes()   X-Ref
Get all supported scopes for this service.

return: string[] the array of supported scopes.