Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
core_xapi\local\statement\item_definition Class Reference

Validation and usage of xAPI definition. More...

Inheritance diagram for core_xapi\local\statement\item_definition:
core_xapi\local\statement\item

Public Member Functions

 get_data ()
 Return the original data from this item. More...
 
 get_interactiontype ()
 Return the definition interaction type.
 
 jsonSerialize ()
 Return the data to serialize in case JSON statement is needed. More...
 

Static Public Member Functions

static create_from_data (stdClass $data)
 Function to create an item from part of the xAPI statement. More...
 

Protected Member Functions

 __construct (stdClass $data)
 Function to create a definition from part of the xAPI statement. More...
 

Protected Attributes

stdClass $data
 the item structure.
 
string $interactiontype
 The statement.
 

Detailed Description

Validation and usage of xAPI definition.

Definition contains extra information about user interaction with questions and other activities inside a xAPI statement. For now it performs a basic validation on the provided data.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_xapi\local\statement\item_definition::__construct ( stdClass  $data)
protected

Function to create a definition from part of the xAPI statement.

Parameters
stdClass$datathe original xAPI element.

Reimplemented from core_xapi\local\statement\item.

Member Function Documentation

◆ create_from_data()

static core_xapi\local\statement\item_definition::create_from_data ( stdClass  $data)
static

Function to create an item from part of the xAPI statement.

Parameters
stdClass$datathe original xAPI element
Return values
itemitem_definition xAPI generated

Reimplemented from core_xapi\local\statement\item.

◆ get_data()

core_xapi\local\statement\item::get_data ( )
inherited

Return the original data from this item.

Return values
stdClassthe original data structure

◆ jsonSerialize()

core_xapi\local\statement\item::jsonSerialize ( )
inherited

Return the data to serialize in case JSON statement is needed.

Return values
stdClassthe original data structure

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