Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 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.

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

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.

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