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 402] [Versions 400 and 403]

The core_xapi statement validation and tansformation.

Copyright: 2020 Ferran Recio
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 118 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

handler:: (4 methods):
  __construct()
  create()
  supports_group_actors()
  process_statements()


Class: handler  - X-Ref

Class handler handles basic xapi statements.

__construct(string $component)   X-Ref
Constructor for a xAPI handler base class.

param: string $component the component name

create(string $component)   X-Ref
Returns the xAPI handler of a specific component.

return: handler|null a handler object or null if none found.
param: string $component the component name in frankenstyle.

supports_group_actors()   X-Ref
Return true if group actor is enabled.

Note: this method must be overridden by the plugins which want to
use groups in statements.

return: bool

process_statements(array $statements)   X-Ref
Process a bunch of statements sended to a specific component.

return: int[] return an specifying what statements are being stored.
param: statement[] $statements an array with all statement to process.