Privacy Subsystem for core_xapi implementing null_provider.
More...
|
static | create_from_data (stdClass $data) |
| Function to create a full statement from xAPI statement data.
|
|
|
item_actor | $actor = null |
| The statement actor.
|
|
item_attachment[] | $attachments = null |
| The statement attachments.
|
|
item_actor | $authority = null |
| The statement authority.
|
|
item_context | $context = null |
| The statement context.
|
|
item_object | $object = null |
| The statement object.
|
|
item_result | $result = null |
| The statement result.
|
|
string | $stored = null |
| The statement stored.
|
|
string | $timestamp = null |
| The statement timestamp.
|
|
item_verb | $verb = null |
| The statement verb.
|
|
string | $version = null |
| The statement version.
|
|
Privacy Subsystem for core_xapi implementing null_provider.
- Copyright
- 2020 Ferran Recio
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ add_attachment()
Adds and attachment to the statement.
- Parameters
-
item | $attachments | attachments item element |
◆ create_from_data()
static core_xapi\local\statement::create_from_data |
( |
stdClass | $data | ) |
|
|
static |
Function to create a full statement from xAPI statement data.
- Parameters
-
stdClass | $data | the original xAPI statement |
- Return values
-
statement | statement object |
◆ get_activity_id()
core_xapi\local\statement::get_activity_id |
( |
| ) |
|
Returns the statement activity ID.
- Exceptions
-
xapi_exception | in case the item is no yet defined |
- Return values
-
◆ get_actor()
core_xapi\local\statement::get_actor |
( |
| ) |
|
Return the statement actor if it is defined.
- Return values
-
◆ get_all_users()
core_xapi\local\statement::get_all_users |
( |
| ) |
|
Return all moodle users represented by this statement actor.
- Return values
-
◆ get_attachments()
core_xapi\local\statement::get_attachments |
( |
| ) |
|
Return the statement attachments if it is defined.
- Return values
-
◆ get_authority()
core_xapi\local\statement::get_authority |
( |
| ) |
|
Return the statement authority if it is defined.
- Return values
-
◆ get_context()
core_xapi\local\statement::get_context |
( |
| ) |
|
Return the statement context if it is defined.
- Return values
-
◆ get_group()
core_xapi\local\statement::get_group |
( |
| ) |
|
Return the moodle group represented by this statement actor.
- Exceptions
-
xapi_exception | if it is not a group statement |
- Return values
-
◆ get_object()
core_xapi\local\statement::get_object |
( |
| ) |
|
Return the statement object if it is defined.
- Return values
-
◆ get_result()
core_xapi\local\statement::get_result |
( |
| ) |
|
Return the statement result if it is defined.
- Return values
-
◆ get_stored()
core_xapi\local\statement::get_stored |
( |
| ) |
|
Return the statement stored if it is defined.
- Return values
-
◆ get_timestamp()
core_xapi\local\statement::get_timestamp |
( |
| ) |
|
Return the statement timestamp if it is defined.
- Return values
-
◆ get_user()
core_xapi\local\statement::get_user |
( |
| ) |
|
Returns the moodle user represented by this statement actor.
- Exceptions
-
xapi_exception | if it's a group statement |
- Return values
-
◆ get_verb()
core_xapi\local\statement::get_verb |
( |
| ) |
|
Return the statement verb if it is defined.
- Return values
-
◆ get_verb_id()
core_xapi\local\statement::get_verb_id |
( |
| ) |
|
Returns the statement verb ID.
- Exceptions
-
xapi_exception | in case the item is no yet defined |
- Return values
-
◆ get_version()
core_xapi\local\statement::get_version |
( |
| ) |
|
Return the statement version if it is defined.
- Return values
-
◆ jsonSerialize()
core_xapi\local\statement::jsonSerialize |
( |
| ) |
|
Return the data to serialize in case JSON statement is needed.
- Return values
-
stdClass | the statement data structure |
◆ minify()
core_xapi\local\statement::minify |
( |
| ) |
|
Returns a minified version of a given statement.
The returned structure is suitable to store in the "other" field of logstore. xAPI standard specifies a list of attributes that can be calculated instead of stored literally. This function get rid of these attributes.
Note: it also converts stdClass to assoc array to make it compatible with "other" field in the logstore
- Return values
-
array | the minimal statement needed to be stored a part from logstore data |
◆ set_actor()
core_xapi\local\statement::set_actor |
( |
item_actor | $actor | ) |
|
Set the statement actor.
- Parameters
-
item_actor | $actor | actor item |
◆ set_authority()
core_xapi\local\statement::set_authority |
( |
item_actor | $authority | ) |
|
Set the statement authority.
- Parameters
-
item | $authority | authority item element |
◆ set_context()
core_xapi\local\statement::set_context |
( |
item_context | $context | ) |
|
Set the statement context.
- Parameters
-
item_context | $context | context item element |
◆ set_object()
core_xapi\local\statement::set_object |
( |
item_object | $object | ) |
|
Set the statement object.
- Parameters
-
item_object | $object | compatible object item |
◆ set_result()
core_xapi\local\statement::set_result |
( |
item_result | $result | ) |
|
Set the statement result.
- Parameters
-
item_result | $result | result item element |
◆ set_stored()
core_xapi\local\statement::set_stored |
( |
string | $stored | ) |
|
Set the statement stored.
- Parameters
-
string | $stored | stored element |
◆ set_timestamp()
core_xapi\local\statement::set_timestamp |
( |
string | $timestamp | ) |
|
Set the statement timestamp.
- Parameters
-
string | $timestamp | timestamp element |
◆ set_verb()
core_xapi\local\statement::set_verb |
( |
item_verb | $verb | ) |
|
Set the statement verb.
- Parameters
-
item_verb | $verb | verb element |
◆ set_version()
core_xapi\local\statement::set_version |
( |
string | $version | ) |
|
Set the statement version.
- Parameters
-
string | $version | version element |
The documentation for this class was generated from the following file:
- lib/xapi/classes/local/statement.php