Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

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

Defines 1 class

sync_grades:: (5 methods):
  get_name()
  sync_grades_for_resource()
  get_line_item_label()
  get_ags()
  execute()


Class: sync_grades  - X-Ref

LTI Advantage task responsible for pushing grades to tool platforms.

get_name()   X-Ref
Get a descriptive name for this task.

return: string

sync_grades_for_resource($resource)   X-Ref
Sync grades to the platform using the Assignment and Grade Services.

return: array an array containing the
param: \stdClass $resource the enrol_lti_tools data record for the shared resource.

get_line_item_label(\stdClass $resource, \context $context)   X-Ref
Get the string label for the line item associated with the resource, based on the course or module name.

return: string the label to use in the line item.
param: \stdClass $resource the enrol_lti_tools record.
param: \context $context the context of the resource - either course or module.

get_ags(LtiServiceConnector $sc, LtiRegistration $registration, array $sd)   X-Ref
Get an ags instance to make the call to the platform.

return: LtiAssignmentsGradesService
param: LtiServiceConnector $sc a service connector instance.
param: LtiRegistration $registration the registration instance.
param: array $sd the service data.

execute()   X-Ref
Performs the synchronisation of grades from the tool to any registered platforms.

return: bool|void