Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
mod_h5pactivity\xapi\handler Class Reference

Class xapi_handler for H5P statements. More...

Inheritance diagram for mod_h5pactivity\xapi\handler:
core_xapi\handler

Public Member Functions

 process_statements (array $statements)
 Process a bunch of statements sended to a specific component. More...
 
 statement_to_event (statement $statement)
 Convert a statement object into a Moodle xAPI Event. More...
 
 supports_group_actors ()
 Return true if group actor is enabled. More...
 

Static Public Member Functions

static create (string $component)
 Returns the xAPI handler of a specific component. More...
 

Protected Attributes

string $component
 component name in frankenstyle.
 

Detailed Description

Class xapi_handler for H5P statements.

Since
Moodle 3.9

Member Function Documentation

◆ create()

static core_xapi\handler::create ( string  $component)
staticfinalinherited

Returns the xAPI handler of a specific component.

Parameters
string$componentthe component name in frankenstyle.
Return values
handler|nulla handler object or null if none found.
Exceptions
xapi_exception

◆ process_statements()

core_xapi\handler::process_statements ( array  $statements)
inherited

Process a bunch of statements sended to a specific component.

Parameters
statement[]$statementsan array with all statement to process.
Return values
int[]return an specifying what statements are being stored.

◆ statement_to_event()

mod_h5pactivity\xapi\handler::statement_to_event ( statement  $statement)

Convert a statement object into a Moodle xAPI Event.

If a statement is accepted by the xAPI webservice the component must provide an event to handle that statement, otherwise the statement will be rejected.

Parameters
statement$statement
Return values
core::event::base|nulla Moodle event to trigger

Reimplemented from core_xapi\handler.

◆ supports_group_actors()

core_xapi\handler::supports_group_actors ( )
inherited

Return true if group actor is enabled.

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

Return values
bool

The documentation for this class was generated from the following file: