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.

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