Group item inside a xAPI statement.
More...
|
| __construct (stdClass $data, stdClass $group) |
| Function to create an group from part of the xAPI statement. More...
|
|
|
stdClass | $data |
| the item structure.
|
|
timestamp | $group |
| The statement timestamp.
|
|
timestamp | $users |
| The statement timestamp.
|
|
Group item inside a xAPI statement.
Only named groups are accepted (all groups must be real groups in the platform) so anonymous groups will be rejected on creation. Groups can be used as actor or as object inside a xAPI statement.
- Copyright
- 2020 Ferran Recio
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_xapi\local\statement\item_group::__construct |
( |
stdClass |
$data, |
|
|
stdClass |
$group |
|
) |
| |
|
protected |
Function to create an group from part of the xAPI statement.
- Parameters
-
stdClass | $data | the original xAPI element |
stdClass | $group | group record |
◆ create_from_data()
static core_xapi\local\statement\item_group::create_from_data |
( |
stdClass |
$data | ) |
|
|
static |
Function to create an item from part of the xAPI statement.
- Parameters
-
stdClass | $data | the original xAPI element |
- Return values
-
Reimplemented from core_xapi\local\statement\item_actor.
◆ create_from_group()
static core_xapi\local\statement\item_group::create_from_group |
( |
stdClass |
$group | ) |
|
|
static |
Create a item_group from a existing group.
- Parameters
-
stdClass | $group | A group record. |
- Return values
-
◆ get_all_users()
core_xapi\local\statement\item_group::get_all_users |
( |
| ) |
|
◆ get_data()
core_xapi\local\statement\item::get_data |
( |
| ) |
|
|
inherited |
Return the original data from this item.
- Return values
-
stdClass | the original data structure |
◆ get_group()
core_xapi\local\statement\item_group::get_group |
( |
| ) |
|
Return the moodle group represented by this item.
- Return values
-
◆ get_user()
core_xapi\local\statement\item_group::get_user |
( |
| ) |
|
Returns the moodle user represented by this item.
This is a group item. To avoid security problems this method thorws an exception when is called from a item_group class.
- Exceptions
-
- Return values
-
Reimplemented from core_xapi\local\statement\item_actor.
◆ jsonSerialize()
core_xapi\local\statement\item::jsonSerialize |
( |
| ) |
|
|
inherited |
Return the data to serialize in case JSON statement is needed.
- Return values
-
stdClass | the original data structure |
The documentation for this class was generated from the following file: