first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
+171
View File
@@ -0,0 +1,171 @@
<?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/>.
/**
* Capabilities for BigBlueButton.
*
* @package mod_bigbluebuttonbn
* @copyright 2010 onwards, Blindside Networks Inc
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Jesus Federico (jesus [at] blindsidenetworks [dt] com)
* @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com)
* @author Darko Miletic (darko.miletic@gmail.com)
*/
defined('MOODLE_INTERNAL') || die();
$capabilities = [
// Ability to add a new bigbluebuttonbn instance.
'mod/bigbluebuttonbn:addinstance' => [
'riskbitmask' => RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
'clonepermissionsfrom' => 'moodle/course:manageactivities',
],
// Ability to create instances with live meeting capabilities.
'mod/bigbluebuttonbn:addinstancewithmeeting' => [
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
'clonepermissionsfrom' => 'moodle/course:manageactivities',
],
// Ability to create instances with recording capabilities.
'mod/bigbluebuttonbn:addinstancewithrecording' => [
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
'clonepermissionsfrom' => 'moodle/course:manageactivities',
],
// Ability to join a meeting.
'mod/bigbluebuttonbn:join' => [
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'student' => CAP_ALLOW,
'guest' => CAP_ALLOW,
],
],
// Ability to access instances, regardless of the type.
'mod/bigbluebuttonbn:view' => [
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
]
],
// Ability to manage recordings.
'mod/bigbluebuttonbn:managerecordings' => [
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
],
// Ability to view all recordings formats (if not user can only see the formats
// defined in bigbluebuttonbn_recording_safe_formats).
'mod/bigbluebuttonbn:viewallrecordingformats' => [
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
],
// Ability to publish recordings.
'mod/bigbluebuttonbn:publishrecordings' => [
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
],
// Ability to unpublish recordings.
'mod/bigbluebuttonbn:unpublishrecordings' => [
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
],
// Ability to protect recordings.
'mod/bigbluebuttonbn:protectrecordings' => [
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
],
// Ability to unprotect recordings.
'mod/bigbluebuttonbn:unprotectrecordings' => [
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
],
// Ability to delete recordings.
'mod/bigbluebuttonbn:deleterecordings' => [
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
],
// Ability to import recordings.
'mod/bigbluebuttonbn:importrecordings' => [
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
],
],
];
+67
View File
@@ -0,0 +1,67 @@
<?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/>.
/**
* Caches for Bigbluebuttonbn
*
* @package mod_bigbluebuttonbn
* @copyright 2010 onwards, Blindside Networks Inc
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Laurent David (laurent [at] call-learning [dt] fr)
*/
defined('MOODLE_INTERNAL') || die();
$definitions = [
// Server information
// version (double) => server version.
'serverinfo' => [
'mode' => cache_store::MODE_APPLICATION,
'invalidationevents' => [
'mod_bigbluebuttonbn/serversettingschanged',
],
],
// The validatedurls cache stores a list of URLs which are either valid, or invalid.
// Keys are a URL
// Values are an integer.
'validatedurls' => [
'mode' => cache_store::MODE_APPLICATION,
'simpledata' => true,
],
// The 'recordings' cache stores a cache of recording data.
'recordings' => [
'mode' => cache_store::MODE_APPLICATION,
'invalidationevents' => [
'mod_bigbluebuttonbn/recordingchanged',
'mod_bigbluebuttonbn/serversettingschanged',
],
'ttl' => 5 * MINSECS,
],
'currentfetch' => [
'mode' => cache_store::MODE_REQUEST,
],
// The 'subplugins' cache stores a cache of subplugins data to accelerate some of the subplugin discovery features.
'subplugins' => [
'mode' => cache_store::MODE_APPLICATION,
'invalidationevents' => [
'mod_bigbluebuttonbn/subpluginschanged',
],
],
];
+33
View File
@@ -0,0 +1,33 @@
<?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/>.
/**
* Install script for mod_bigbluebuttonbn.
*
* @package mod_bigbluebuttonbn
* @copyright 2022 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Perform the post-install procedures.
*/
function xmldb_bigbluebuttonbn_install() {
global $DB;
// Disable the BigBlueButton activity module on new installs by default.
$DB->set_field('modules', 'visible', 0, ['name' => 'bigbluebuttonbn']);
}
+106
View File
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/bigbluebuttonbn/db" VERSION="20230213" COMMENT="XMLDB file for Moodle mod/bigbluebuttonbn"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="bigbluebuttonbn" COMMENT="The bigbluebuttonbn table to store information about a meeting activities.">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="type" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="meetingid" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="moderatorpass" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="viewerpass" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="wait" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="record" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="recordallfromstart" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="recordhidebutton" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="welcome" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="voicebridge" TYPE="int" LENGTH="5" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="openingtime" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="closingtime" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="presentation" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="participants" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="userlimit" TYPE="int" LENGTH="3" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="recordings_html" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="recordings_deleted" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="recordings_imported" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="recordings_preview" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="clienttype" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="muteonstart" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="disablecam" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="disablemic" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="disableprivatechat" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="disablepublicchat" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="disablenote" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="hideuserlist" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="completionattendance" TYPE="int" LENGTH="9" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Nonzero if a certain number of minutes in the meeting are required to mark an activity completed for a user."/>
<FIELD NAME="completionengagementchats" TYPE="int" LENGTH="9" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Nonzero if chat during the meeting is required to mark an activity completed for a user."/>
<FIELD NAME="completionengagementtalks" TYPE="int" LENGTH="9" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Nonzero if talking during the meeting is required to mark an activity completed for a user."/>
<FIELD NAME="completionengagementraisehand" TYPE="int" LENGTH="9" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Nonzero if raising hand during the meeting is required to mark an activity completed for a user."/>
<FIELD NAME="completionengagementpollvotes" TYPE="int" LENGTH="9" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Nonzero if poll voting during the meeting is required to mark an activity completed for a user."/>
<FIELD NAME="completionengagementemojis" TYPE="int" LENGTH="9" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Nonzero if the use of emojis during the meeting is required to mark an activity completed for a user."/>
<FIELD NAME="guestallowed" TYPE="int" LENGTH="2" NOTNULL="false" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="mustapproveuser" TYPE="int" LENGTH="2" NOTNULL="false" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="guestlinkuid" TYPE="char" LENGTH="1024" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="guestpassword" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="bigbluebuttonbn_logs" COMMENT="The bigbluebuttonbn table to store meeting activity events">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="bigbluebuttonbnid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="meetingid" TYPE="char" LENGTH="256" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="log" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="meta" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="courseid" UNIQUE="false" FIELDS="courseid"/>
<INDEX NAME="log" UNIQUE="false" FIELDS="log"/>
<INDEX NAME="logrow" UNIQUE="false" FIELDS="courseid, bigbluebuttonbnid, userid, log"/>
<INDEX NAME="userlog" UNIQUE="false" FIELDS="userid, log"/>
<INDEX NAME="course_bbbid_ix" UNIQUE="false" FIELDS="courseid, bigbluebuttonbnid"/>
</INDEXES>
</TABLE>
<TABLE NAME="bigbluebuttonbn_recordings" COMMENT="The bigbluebuttonbn table to store references to recordings">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="bigbluebuttonbnid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="groupid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="recordingid" TYPE="char" LENGTH="64" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="headless" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="imported" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="status" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="importeddata" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="This is the remote recording data stored as json and kept for future reference."/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="usermodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
<KEY NAME="fk_bigbluebuttonbnid" TYPE="foreign" FIELDS="bigbluebuttonbnid" REFTABLE="bigbluebuttonbn" REFFIELDS="id"/>
<KEY NAME="usermodified" TYPE="foreign" FIELDS="usermodified" REFTABLE="user" REFFIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="courseid" UNIQUE="false" FIELDS="courseid"/>
<INDEX NAME="recordingid" UNIQUE="false" FIELDS="recordingid"/>
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>
+43
View File
@@ -0,0 +1,43 @@
<?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/>.
/**
* Definition of log events.
*
* @package mod_bigbluebuttonbn
* @copyright 2010 onwards, Blindside Networks Inc
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Jesus Federico (jesus [at] blindsidenetworks [dt] com)
* @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com)
*/
defined('MOODLE_INTERNAL') || die();
global $DB;
$logs = [
['module' => 'bigbluebuttonbn', 'action' => 'add', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'update', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'view', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'view all', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'create', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'end', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'join', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'left', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'publish', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'unpublish', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
['module' => 'bigbluebuttonbn', 'action' => 'delete', 'mtable' => 'bigbluebuttonbn', 'field' => 'name'],
];
+43
View File
@@ -0,0 +1,43 @@
<?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/>.
/**
* Defines message providers (types of messages being sent)
*
* @package mod_bigbluebuttonbn
* @copyright 2021 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
$messageproviders = [
// Recording ready notification posts.
'recording_ready' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
],
// The instance was created or updated.
'instance_updated' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
],
];
+48
View File
@@ -0,0 +1,48 @@
<?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/>.
/**
* Mobile app definition for BigBlueButton.
*
* @package mod_bigbluebuttonbn
* @copyright 2018 onwards, Blindside Networks Inc
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Jesus Federico (jesus [at] blindsidenetworks [dt] com)
*/
defined('MOODLE_INTERNAL') || die;
global $CFG;
$addons = [
"mod_bigbluebuttonbn" => [
"handlers" => [ // Different places where the add-on will display content.
'coursebigbluebuttonbn' => [ // Handler unique name (can be anything).
'displaydata' => [
'title' => 'pluginname',
'icon' => $CFG->wwwroot . '/mod/bigbluebuttonbn/pix/monologo.svg',
'class' => '',
],
'delegate' => 'CoreCourseModuleDelegate', // Delegate (where to display the link to the add-on).
'method' => 'mobile_course_view' // Main function in \mod_bigbluebuttonbn\output\mobile.
]
],
'lang' => [
['pluginname', 'bigbluebuttonbn'],
['view_conference_action_join', 'bigbluebuttonbn'],
['view_message_conference_room_ready', 'bigbluebuttonbn'],
['view_mobile_message_reload_page_creation_time_meeting', 'bigbluebuttonbn']
]
]
];
+117
View File
@@ -0,0 +1,117 @@
<?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/>.
/**
* URL external functions and service definitions.
*
* @package mod_bigbluebuttonbn
* @category external
* @copyright 2018 onwards, Blindside Networks Inc
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Jesus Federico (jesus [at] blindsidenetworks [dt] com)
*/
defined('MOODLE_INTERNAL') || die;
$functions = [
'mod_bigbluebuttonbn_can_join' => [
'classname' => 'mod_bigbluebuttonbn\external\can_join',
'methodname' => 'execute',
'description' => 'Returns information if the current user can join or not.',
'type' => 'read',
'capabilities' => 'mod/bigbluebuttonbn:view',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'mod_bigbluebuttonbn_get_recordings' => [
'classname' => 'mod_bigbluebuttonbn\external\get_recordings',
'methodname' => 'execute',
'description' => 'Returns a list of recordings ready to be processed by a datatable.',
'type' => 'read',
'ajax' => true,
'capabilities' => 'mod/bigbluebuttonbn:view',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'mod_bigbluebuttonbn_get_recordings_to_import' => [
'classname' => 'mod_bigbluebuttonbn\external\get_recordings_to_import',
'methodname' => 'execute',
'description' => 'Returns a list of recordings ready to import to be processed by a datatable.',
'type' => 'read',
'ajax' => true,
'capabilities' => 'mod/bigbluebuttonbn:importrecordings',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'mod_bigbluebuttonbn_update_recording' => [
'classname' => 'mod_bigbluebuttonbn\external\update_recording',
'methodname' => 'execute',
'description' => 'Update a single recording',
'type' => 'write',
'ajax' => true,
'capabilities' => 'mod/bigbluebuttonbn:managerecordings',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'mod_bigbluebuttonbn_end_meeting' => [
'classname' => 'mod_bigbluebuttonbn\external\end_meeting',
'methodname' => 'execute',
'description' => 'End a meeting',
'type' => 'write',
'ajax' => true,
'capabilities' => 'mod/bigbluebuttonbn:join',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'mod_bigbluebuttonbn_completion_validate' => [
'classname' => 'mod_bigbluebuttonbn\external\completion_validate',
'methodname' => 'execute',
'description' => 'Validate completion',
'type' => 'write',
'ajax' => true,
'capabilities' => 'mod/bigbluebuttonbn:view',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'mod_bigbluebuttonbn_meeting_info' => [
'classname' => 'mod_bigbluebuttonbn\external\meeting_info',
'methodname' => 'execute',
'description' => 'Get displayable information on the meeting',
'type' => 'read',
'ajax' => true,
'capabilities' => 'mod/bigbluebuttonbn:view',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'mod_bigbluebuttonbn_get_bigbluebuttonbns_by_courses' => [
'classname' => 'mod_bigbluebuttonbn\external\get_bigbluebuttonbns_by_courses',
'methodname' => 'execute',
'description' => 'Returns a list of bigbluebuttonbns in a provided list of courses, if no list is provided
all bigbluebuttonbns that the user can view will be returned.',
'type' => 'read',
'capabilities' => 'mod/bigbluebuttonbn:view',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'mod_bigbluebuttonbn_view_bigbluebuttonbn' => [
'classname' => 'mod_bigbluebuttonbn\external\view_bigbluebuttonbn',
'methodname' => 'execute',
'description' => 'Trigger the course module viewed event and update the module completion status.',
'type' => 'write',
'capabilities' => 'mod/bigbluebuttonbn:view',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE]
],
'mod_bigbluebuttonbn_get_join_url' => [
'classname' => 'mod_bigbluebuttonbn\external\get_join_url',
'methodname' => 'execute',
'description' => 'Get the join URL for the meeting and create if it does not exist.',
'type' => 'write',
'capabilities' => 'mod/bigbluebuttonbn:join',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
];
+5
View File
@@ -0,0 +1,5 @@
{
"plugintypes": {
"bbbext": "mod\/bigbluebuttonbn\/extension"
}
}
+46
View File
@@ -0,0 +1,46 @@
<?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/>.
/**
* Definition of scheduled tasks for mod_bigbluebuttonbn.
*
* @package mod_bigbluebuttonbn
* @copyright 2021 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$tasks = [
[
'classname' => 'mod_bigbluebuttonbn\task\check_pending_recordings',
'blocking' => 0,
'minute' => '*/5',
'hour' => '*',
'day' => '*',
'month' => '*',
'dayofweek' => '*'
],
[
'classname' => 'mod_bigbluebuttonbn\task\check_dismissed_recordings',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*/10', // Every 10 days.
'month' => '*',
'dayofweek' => '*'
],
];
+149
View File
@@ -0,0 +1,149 @@
<?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/>.
/**
* Upgrade logic.
*
* @package mod_bigbluebuttonbn
* @copyright 2010 onwards, Blindside Networks Inc
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Jesus Federico (jesus [at] blindsidenetworks [dt] com)
* @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com)
*/
use mod_bigbluebuttonbn\plugin;
use mod_bigbluebuttonbn\local\config;
use mod_bigbluebuttonbn\task\upgrade_recordings_task;
/**
* Performs data migrations and updates on upgrade.
*
* @param int $oldversion
* @return bool
*/
function xmldb_bigbluebuttonbn_upgrade($oldversion = 0) {
global $DB;
$dbman = $DB->get_manager();
// Automatically generated Moodle v4.1.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2023011800) {
// Define index course_bbbid_ix (not unique) to be added to bigbluebuttonbn_logs.
$table = new xmldb_table('bigbluebuttonbn_logs');
$index = new xmldb_index('course_bbbid_ix', XMLDB_INDEX_NOTUNIQUE, ['courseid', 'bigbluebuttonbnid']);
// Conditionally launch add index course_bbbid_ix.
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
// Bigbluebuttonbn savepoint reached.
upgrade_mod_savepoint(true, 2023011800, 'bigbluebuttonbn');
}
if ($oldversion < 2023021300) {
// Define field lockedlayout to be dropped from bigbluebuttonbn.
$table = new xmldb_table('bigbluebuttonbn');
$field = new xmldb_field('lockedlayout');
// Conditionally launch drop field lockedlayout.
if ($dbman->field_exists($table, $field)) {
$dbman->drop_field($table, $field);
}
// Bigbluebuttonbn savepoint reached.
upgrade_mod_savepoint(true, 2023021300, 'bigbluebuttonbn');
}
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
/**
* Generic helper function for adding or changing a field in a table.
*
* @param database_manager $dbman
* @param string $tablename
* @param string $fieldname
* @param array $fielddefinition
* @deprecated please do not use this anymore (historical migrations)
*/
function xmldb_bigbluebuttonbn_add_change_field(
database_manager $dbman,
string $tablename,
string $fieldname,
array $fielddefinition
) {
$table = new xmldb_table($tablename);
$field = new xmldb_field($fieldname);
$field->set_attributes(
$fielddefinition['type'],
$fielddefinition['precision'],
$fielddefinition['unsigned'],
$fielddefinition['notnull'],
$fielddefinition['sequence'],
$fielddefinition['default'],
$fielddefinition['previous']
);
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field, true, true);
return;
}
// Drop key before if needed.
$fieldkey = new xmldb_key($fieldname, XMLDB_KEY_FOREIGN, [$fieldname], 'user', ['id']);
if ($dbman->find_key_name($table, $fieldkey)) {
$dbman->drop_key($table, $fieldkey);
}
$dbman->change_field_type($table, $field, true, true);
$dbman->change_field_precision($table, $field, true, true);
$dbman->change_field_notnull($table, $field, true, true);
$dbman->change_field_default($table, $field, true, true);
}
/**
* Generic helper function for adding index to a table.
*
* @param database_manager $dbman
* @param string $tablename
* @param string $indexname
* @param array $indexfields
* @param string|false|null $indextype
* @deprecated please do not use this anymore (historical migrations)
*/
function xmldb_bigbluebuttonbn_index_table(
database_manager $dbman,
string $tablename,
string $indexname,
array $indexfields,
$indextype = XMLDB_INDEX_NOTUNIQUE
) {
$table = new xmldb_table($tablename);
if (!$dbman->table_exists($table)) {
return;
}
$index = new xmldb_index($indexname, $indextype, $indexfields);
if ($dbman->index_exists($table, $index)) {
$dbman->drop_index($table, $index);
}
$dbman->add_index($table, $index, true, true);
}