Skip to content

Commit

Permalink
feat(bigbluebutton): Adds event support for BigBlueButton plugin.
Browse files Browse the repository at this point in the history
Adding event support for the BigBlueButton moodle plugin.
  • Loading branch information
paulterinho committed Mar 28, 2020
1 parent 0e40d3e commit e5be1b7
Show file tree
Hide file tree
Showing 92 changed files with 3,518 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/activity_created.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* Triggered when a new BBB activity gets created.
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function activity_created(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/created', 'created' );
}
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/activity_deleted.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* Triggered when a BBB activity is deleted.
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function activity_deleted(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/delete', 'deleted' );
}
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/activity_updated.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* Triggered when the an attribute like the name of the BBB activity is edited.
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function activity_updated(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/update', 'updated' );
}
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/activity_viewed.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* Triggered when a BBB activity is viewed.
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function activity_viewed(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/viewed', 'viewed' );
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* The mod_bigbluebuttonbn activity management viewed event (triggered by index.php).
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function bigbluebuttonbn_activity_management_viewed(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/viewed', 'viewed' );
}
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/live_session.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* Used to convey what actions occur during a recording:
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function live_session(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/live', 'live' );
}
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/meeting_created.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* The mod_bigbluebuttonbn meeting created event (triggered by bbb_view.php when the meeting is created before join
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function meeting_created(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/create', 'created' );
}
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/meeting_ended.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* The mod_bigbluebuttonbn meeting ended event (triggered by bbb_ajax.php and index.php when the meeting is ended by the user).
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function meeting_ended(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/adjourned', 'adjourned' );
}
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/meeting_joined.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* The mod_bigbluebuttonbn meeting joined event (triggered by bbb_view.php when the user joins the session).
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function meeting_joined(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/join', 'joined' );
}
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/meeting_left.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* The mod_bigbluebuttonbn meeting left event.
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function meeting_left(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/leave', 'left' );
}
31 changes: 31 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/recording_deleted.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* The mod_bigbluebuttonbn recording deleted event.
*
* @author Paul Walter (https://github.com/paulito-bandito)
* @param array $config
* @param \stdClass $event
* @return array
*/
function recording_deleted(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/deleted', 'deleted' );
}
32 changes: 32 additions & 0 deletions src/transformer/events/mod_bigbluebuttonbn/recording_edited.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace src\transformer\events\mod_bigbluebuttonbn;
use function src\transformer\events\mod_bigbluebuttonbn\create_stmt;

/**
* The mod_bigbluebuttonbn recording edited event.
*
* @author Paul Walter (https://github.com/paulito-bandito)
*
* @param array $config
* @param \stdClass $event
* @return array
*/
function recording_edited(array $config, \stdClass $event) {

return create_stmt( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/edited', 'edited' );
}
Loading

0 comments on commit e5be1b7

Please sign in to comment.