| Elive documentation | view source | Contained in the Elive distribution. |
Elive::Entity::ParticipantList - Meeting Participants entity class
This is the entity class for meeting participants.
The participants property is an array of type Elive::Entity::Participant.
The participants property may be specified in the format: userId[=roleId], where the role is 3 for a normal participant or 2 for a meeting moderator.
Participants may be specified as a ';' separated string:
my $participant_list = $meeting->participant_list;
$participant_list->participants('111111=2;222222');
$participant_list->update;
Participants may also be specified as an array of scalars:
$participant_list->participants(['111111=2', 222222]);
$participant_list->update;
Or an array of hashrefs:
$participant_list->participants([{user => 111111, role =>2},
{user => 222222}]);
$participant_list->update;
Groups of users may also be assigned to a meeting. All users that are member of that group are then able to participate in the meeting, and are assigned the given role.
By convention, a leading '*' indicates a group:
#
# Set alice and bob as moderators. Then add all students in the
# cookery class:
#
$participant_list->participants('alice=2;bob=2;*cookery_class=3');
$participant_list->update;
Similar to the above:
$participant_list->participants(['alice=2', 'bob=2', '*cookery_class=3']);
$participant_list->update;
As a list of hashrefs:
$participant_list->participants([
{user => 'alice', role => 2},
{user => 'bob', role => 2},
{group => 'cookery_class', role => 3},
]);
$participant_list->update;
By default this command uses the setParticipantList SOAP command, which
doesn't handle groups. If any groups are specified, it will switch to using
updateSession, which does handle groups.
This method updates meeting participants.
my $participant_list
= Elive::Entity::ParticipantList->retrieve([$meeting_id]);
$participant_list->participants->add($alice->userId, $bob->userId);
$participant_list->update;
Note:
reset method will be called. The
resultant list wont be empty, but will have the moderator as the sole
participant.$participant_list->reset
Reset the participant list. This will set the meeting facilitator as the only participant, with a role of 2 (moderator).
my $participant_list = Elive::Entity::ParticipantList->insert({
meetingId => $meeting_id,
participants => '111111=2;33333'
});
Note that if you empty the participant list, reset will be called.
The list method is not available for participant lists. You'll need to retrieve on a meeting id.
| Elive documentation | view source | Contained in the Elive distribution. |