| 1 | package Bb::Collaborate::Ultra::Session::Enrollment; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use warnings; use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use Mouse; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | extends 'Bb::Collaborate::Ultra::DAO'; | |||||||||||||||||||||||||||||||||||||||||
| 5 | 1 | __PACKAGE__->resource('enrollments'); | |||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | __PACKAGE__->load_schema(<DATA>); | |||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||
| 10 | Bb::Collaborate::Ultra::Session::Enrollment - Session enrollments | ||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | =head2 METHODS | ||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | See L<https://xx-csa.bbcollab.com/documentation#Session::Enrollment> | ||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||
| 16 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | =head2 enrol | ||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | Enrols a given user a session | ||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | sub enrol { | ||||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
enrol: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | ▶ | my $session = shift || $self->parent | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/5
shift() || $self->parent || die('no sesson to enrol in')
shift() or $self->parent
MC/DC0%0/2
shift() || $self->parent || die('no sesson to enrol in')
shift()
$self->parent
Truth table0%0/3
A or B
A= shift()B= $self->parent
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | || die "no sesson to enrol in"; | ||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | ▶ | my $connection = shift | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
shift() || $self->connection || $session->connection
shift() or $self->connection
MC/DC0%0/3
shift() || $self->connection || $session->connection
shift()
$self->connection
$session->connection
Truth table0%0/4
A or B || C
A= shift()B= $self->connectionC= $session->connection
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | || $self->connection | ||||||||||||||||||||||||||||||||||||||||||
| 30 | || $session->connection | ||||||||||||||||||||||||||||||||||||||||||
| 31 | or die "not connected"; | ||||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | my $path = $self->path(parent => $session); | |||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | my $enrolment = $self->post($connection, $self->_raw_data, path => $path); | |||||||||||||||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||
| 36 | # downloaded from https://xx-csa.bbcollab.com/documentation | ||||||||||||||||||||||||||||||||||||||||||
| 37 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 38 | __DATA__ | ||||||||||||||||||||||||||||||||||||||||||