Bb::Collaborate::Ultra::Session
This class is used to manage Sessions (Virtual Classrooms).
use Bb::Collaborate::Ultra::Session; my $start = time() + 60; my $end = $start + 900; my $session; my $session = Bb::Collaborate::Ultra::Session->post($connection, { name => 'Test Session', startTime => $start, endTime => $end, }, );
AFAIK, there are two classes and two different modes for enrolling user to sessions:
my $user = Bb::Collaborate::Ultra::User->new({ extId => 'testLaunchUser', displayName => 'David Warring', email => 'david.warring@gmail.com', firstName => 'David', lastName => 'Warring', }); my $launch_context = Bb::Collaborate::Ultra::LaunchContext->new({ launchingRole => 'moderator', editingPermission => 'writer', user => $user, }); my $join_url = $launch_context->join_session($session);
Each user is created once.
my $ultra_user = Bb::Collaborate::Ultra::User->create($connection, { extId => 'testLaunchUser', displayName => 'David Warring', email => 'david.warring@gmail.com', firstName => 'David', lastName => 'Warring', }); my $ultra_user_id = $ultra_user->id; # somehow save the user id permanently...
The saved user-id may then be used to multiple times to join sessions:
my $enrollment = Bb::Collaborate::Ultra::Session::Enrollment->new({ launchingRole => 'moderator', editingPermission => 'writer', userId => $user2->id, }); my $join_url = $enrolment->enrol($session)->permanentUrl;
This class supports the `get`, `post`, `patch` and `del` methods as described in https://xx-csa.bbcollab.com/documentation#Session
Return a list of users, of type Bb::Collaborate::Ultra::Session::Enrollment.
my @enrollments = $session->get_enrollments; for my $enrolment (@enrollments) { say "user @{[$enrolment->userId]} is enrolled as a @{[$enrollment->launchingRole]}"; }
Returns logging (session-instance) information for completed sessions
To install Bb::Collaborate::Ultra, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bb::Collaborate::Ultra
CPAN shell
perl -MCPAN -e shell install Bb::Collaborate::Ultra
For more information on module installation, please visit the detailed CPAN module installation guide.