MDL-79239 mod_bigbluebuttonbn: Remove DPA

* Removed dpa
* Plugin remains disabled by default
This commit is contained in:
Shamiso.Jaravaza
2024-03-18 10:53:15 -06:00
parent 757be30c39
commit 4a1544cfdc
26 changed files with 36 additions and 163 deletions
@@ -36,8 +36,6 @@ class config {
/** @var string Default bigbluebutton server shared secret */
public const DEFAULT_SHARED_SECRET = '0b21fcaf34673a8c3ec8ed877d76ae34';
/** @var string Default bigbluebutton data processing agreement url */
public const DEFAULT_DPA_URL = 'https://blindsidenetworks.com/dpa-moodle-free-tier';
/** @var string the default bigbluebutton checksum algorithm */
public const DEFAULT_CHECKSUM_ALGORITHM = 'SHA256';
-19
View File
@@ -167,15 +167,6 @@ class settings {
);
$settingsgeneral->add($item);
if (empty($CFG->bigbluebuttonbn_default_dpa_accepted)) {
$settingsgeneral->add(new admin_setting_configcheckbox(
'bigbluebuttonbn_default_dpa_accepted',
get_string('acceptdpa', 'mod_bigbluebuttonbn'),
get_string('enablingbigbluebuttondpainfo', 'mod_bigbluebuttonbn', config::DEFAULT_DPA_URL),
0
));
}
$item = new admin_setting_configtext(
'bigbluebuttonbn_server_url',
get_string('config_server_url', 'bigbluebuttonbn'),
@@ -220,16 +211,6 @@ class settings {
$settingsgeneral
);
$item = new \admin_setting_description(
'bigbluebuttonbn_dpa_info',
'',
get_string('config_dpa_note', 'bigbluebuttonbn', config::DEFAULT_DPA_URL),
);
$this->add_conditional_element(
'dpa_info',
$item,
$settingsgeneral
);
$item = new admin_setting_configtext(
'bigbluebuttonbn_poll_interval',
get_string('config_poll_interval', 'bigbluebuttonbn'),
@@ -23,7 +23,7 @@ use core\message\message;
use mod_bigbluebuttonbn\local\config;
/**
* Ad-hoc task to send a notification related to the disabling of the BigBlueButton activity module.
* Deprecated Ad-hoc task to send a notification related to the disabling of the BigBlueButton activity module.
*
* The ad-hoc tasks sends a notification to the administrator informing that the BigBlueButton activity module has
* been disabled and they are required to confirm their acceptance of the data processing agreement prior to
@@ -34,25 +34,12 @@ use mod_bigbluebuttonbn\local\config;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class send_bigbluebutton_module_disabled_notification extends adhoc_task {
/**
* Execute the task.
*/
public function execute(): void {
$message = new message();
$message->component = 'moodle';
$message->name = 'notices';
$message->userfrom = \core_user::get_noreply_user();
$message->userto = get_admin();
$message->notification = 1;
$message->contexturl = (new \moodle_url('/admin/modules.php'))->out(false);
$message->contexturlname = get_string('modsettings', 'admin');
$message->subject = get_string('bigbluebuttondisablednotification_subject', 'mod_bigbluebuttonbn');
$message->fullmessageformat = FORMAT_HTML;
$message->fullmessagehtml = get_string('bigbluebuttondisablednotification', 'mod_bigbluebuttonbn',
config::DEFAULT_DPA_URL);
$message->smallmessage = strip_tags($message->fullmessagehtml);
message_send($message);
public function execute() {
// Log the debug message.
$message = "Attempted to run deprecated send_bigbluebutton_module_disabled_notification task.";
debugging($message, DEBUG_DEVELOPER);
}
}
@@ -26,7 +26,6 @@
defined('MOODLE_INTERNAL') || die();
$string['activityoverview'] = 'You have upcoming BigBlueButton sessions';
$string['acceptdpa'] = 'I understand and accept the data processing agreement';
$string['bbbduetimeoverstartingtime'] = 'The close time must be later than the open time.';
$string['bbbdurationwarning'] = 'The maximum duration for this session is %duration% minutes.';
$string['bbbrecordwarning'] = 'This session may be recorded.';
@@ -45,12 +44,7 @@ $string['bigbluebuttonbn:deleterecordings'] = 'Delete recordings';
$string['bigbluebuttonbn:importrecordings'] = 'Import recordings';
$string['bigbluebuttonbn:viewallrecordingformats'] = 'View all recording formats';
$string['bigbluebuttonbn'] = 'BigBlueButton';
$string['bigbluebuttondisablednotification_subject'] = 'BigBlueButton activity module disabled.';
$string['bigbluebuttondisablednotification'] = 'The BigBlueButton activity module has been disabled and any existing BigBlueButton course activities are currently not accessible. Prior to re-enabling this plugin, please ensure that you have read and accepted the <a href="{$a}" target="_blank">data processing agreement</a> with Blindside Networks Inc.';
$string['cannotperformaction'] = 'Cannot perform action {$a} on this recording';
$string['enablingbigbluebutton'] = 'Enabling BigBlueButton activity';
$string['enablingbigbluebuttondpainfo'] = 'In order to meet your data protection obligations, prior to enabling this plugin, you may need to ensure that you have read and accepted the <a href="{$a}" target="_blank">Blindside Networks data processing agreement</a>. Please consult with your own privacy professionals for advice.';
$string['dpainfonotsigned'] = 'Before enabling this plugin, you must confirm that you have read and accepted the <a href="{$a}">Blindside Networks data processing agreement</a>.';
$string['indicator:cognitivedepth'] = 'BigBlueButton cognitive';
$string['indicator:cognitivedepth_help'] = 'This indicator is based on the cognitive depth reached by the student in a BigBlueButton activity.';
$string['indicator:socialbreadth'] = 'BigBlueButton social';
@@ -127,7 +121,6 @@ $string['sendnotification'] = 'Send notification';
$string['minute'] = 'minute';
$string['minutes'] = 'minutes';
$string['config_dpa_note'] = 'Note: In order to meet your data protection obligations, before using a service provider for this plugin, you must ensure that you have read and accepted the service provider\'s data processing agreement. For the default free BigBlueButton service, this is the <a href="{$a}" target="_blank">Blindside Networks data processing agreement</a>. Please consult with your own privacy professionals for advice.';
$string['config_guestaccess_enabled'] = 'External guest access';
$string['config_guestaccess_enabled_description'] = 'Allow users without an account on your site to access the room.';
@@ -667,3 +660,11 @@ $string['completionview'] = 'Require view';
$string['completionview_desc'] = 'View the room';
$string['completionattendancegroup_help'] = 'Attending the meeting for (n) minutes is required for completion.';
$string['completionengagementgroup_help'] = 'Active participation during the session is required for completion.';
// Deprecated since Moodle 4.4
$string['acceptdpa'] = 'I understand and accept the data processing agreement';
$string['bigbluebuttondisablednotification_subject'] = 'BigBlueButton activity module disabled.';
$string['bigbluebuttondisablednotification'] = 'The BigBlueButton activity module has been disabled and any existing BigBlueButton course activities are currently not accessible. Prior to re-enabling this plugin, please ensure that you have read and accepted the <a href="{$a}" target="_blank">data processing agreement</a> with Blindside Networks Inc.';
$string['enablingbigbluebutton'] = 'Enabling BigBlueButton activity';
$string['enablingbigbluebuttondpainfo'] = 'In order to meet your data protection obligations, prior to enabling this plugin, you may need to ensure that you have read and accepted the <a href="{$a}" target="_blank">Blindside Networks data processing agreement</a>. Please consult with your own privacy professionals for advice.';
$string['dpainfonotsigned'] = 'Before enabling this plugin, you must confirm that you have read and accepted the <a href="{$a}">Blindside Networks data processing agreement</a>.';
$string['config_dpa_note'] = 'Note: In order to meet your data protection obligations, before using a service provider for this plugin, you must ensure that you have read and accepted the service provider\'s data processing agreement. For the default free BigBlueButton service, this is the <a href="{$a}" target="_blank">Blindside Networks data processing agreement</a>. Please consult with your own privacy professionals for advice.';
@@ -2,3 +2,10 @@ completionview,mod_bigbluebuttonbn
completionview_desc,mod_bigbluebuttonbn
completionattendancegroup_help,mod_bigbluebuttonbn
completionengagementgroup_help,mod_bigbluebuttonbn
acceptdpa,mod_bigbluebuttonbn
bigbluebuttondisablednotification_subject,mod_bigbluebuttonbn
bigbluebuttondisablednotification,mod_bigbluebuttonbn
enablingbigbluebutton,mod_bigbluebuttonbn
enablingbigbluebuttondpainfo,mod_bigbluebuttonbn
dpainfonotsigned,mod_bigbluebuttonbn
config_dpa_note,mod_bigbluebuttonbn
-22
View File
@@ -719,28 +719,6 @@ function bigbluebuttonbn_print_recent_activity(object $course, bool $viewfullnam
return true;
}
/**
* Callback method executed prior to enabling the activity module.
*
* @return bool Whether to proceed and enable the plugin or not.
*/
function bigbluebuttonbn_pre_enable_plugin_actions(): bool {
global $PAGE;
// If the default server configuration is used and the administrator has not accepted the default data processing
// agreement, do not enable the plugin. Instead, display a dynamic form where the administrator can confirm that he
// accepts the DPA prior to enabling the plugin.
if (config::get('server_url') === config::DEFAULT_SERVER_URL && !config::get('default_dpa_accepted')) {
$url = new moodle_url('/admin/category.php', ['category' => 'modbigbluebuttonbnfolder']);
\core\notification::add(
get_string('dpainfonotsigned', 'mod_bigbluebuttonbn', $url->out(false)),
\core\notification::ERROR
);
return false;
}
// Otherwise, continue and enable the plugin.
return true;
}
/**
* Creates a number of BigblueButtonBN activities.
@@ -6,7 +6,7 @@ Feature: bigbluebuttonbn instance
Background: Make sure that a course is created
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test course | Test course | 0 |
@@ -59,16 +59,6 @@ class behat_mod_bigbluebuttonbn extends behat_base {
}
}
/**
* Accept dpa and enable bigbluebuttonbn plugin.
*
* @When /^I accept dpa and enable bigbluebuttonbn plugin$/
*/
public function i_accept_dpa_and_enable_bigbluebuttonbn_plugin(): void {
set_config('bigbluebuttonbn_default_dpa_accepted', true);
$this->execute('behat_general::i_enable_plugin', ['bigbluebuttonbn', 'mod']);
}
/**
* Check that the TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER is defined, so we can connect to the mock server.
*
@@ -2,7 +2,7 @@
Feature: As a user I can complete a BigblueButtonBN activity by usual or custom criteria
Background:
Given I accept dpa and enable bigbluebuttonbn plugin
Given I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Test course | C1 | 0 | 1 |
@@ -4,7 +4,7 @@ Feature: I can edit a bigbluebutton instance
Background: Make sure that a course is created
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
And the following config values are set as admin:
| bigbluebuttonbn_voicebridge_editable | 1 |
And the following "courses" exist:
@@ -6,7 +6,7 @@ Feature: Test the ability to end a meeting
Background:
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
Scenario Outline: Only a BigBlueButton moderator can end a session
Given the following course exists:
@@ -5,7 +5,7 @@ Feature: Test the module in group mode.
# groupmode 1 = separate groups, we force the group
# groupmode 2 = visible group
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category | groupmode | groupmodeforce |
| Test Course 1 | C1 | 0 | 1 | 1 |
@@ -3,7 +3,7 @@ Feature: Guest access allows external users to connect to a meeting
Background:
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test Course 1 | C1 | 0 |
@@ -4,7 +4,7 @@ Feature: Test the ability to run the full meeting lifecycle (start to end)
Background:
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
And the following config values are set as admin:
| bigbluebuttonbn_userlimit_editable | 1 |
And the following course exists:
@@ -3,7 +3,7 @@ Feature: Test the ability to run the full meeting lifecycle (start to end) for g
Background:
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
And the following config values are set as admin:
| bigbluebuttonbn_guestaccess_enabled | 1 |
And the following course exists:
@@ -6,7 +6,7 @@ Feature: Test that the meeting has the right lock setting.
Background:
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
@javascript
Scenario Outline: Teacher should be able to set the right lock feature in a given meeting
@@ -6,7 +6,7 @@ Feature: Test that meeting roles are sent to the server
Background:
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
@javascript
Scenario Outline: Users should receive the appropriate role when joining the meeting
@@ -4,7 +4,7 @@ Feature: The recording can be managed through the room page
Background: Make sure that import recording is enabled and course, activities and recording exists
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test Course 1 | C1 | 0 |
@@ -7,7 +7,7 @@ Feature: Manage and list recordings
And the following config values are set as admin:
| bigbluebuttonbn_importrecordings_enabled | 1 |
| bigbluebuttonbn_importrecordings_from_deleted_enabled | 1 |
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test Course 1 | C1 | 0 |
@@ -5,7 +5,7 @@ Feature: Set role as Bigbluebuttonbn moderator
I need to see the list of roles
Background:
Given I accept dpa and enable bigbluebuttonbn plugin
Given I enable "bigbluebuttonbn" "mod" plugin
And the following "course" exist:
| fullname | shortname |
| Course 1 | C1 |
+1 -1
View File
@@ -3,7 +3,7 @@ Feature: The recording can be managed through the room page and as a user I can
Background: Make sure that import recording is enabled and course, activities and recording exists
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test Course 1 | C1 | 0 |
@@ -6,7 +6,7 @@ Feature: Test the ability to start a meeting
Background:
Given a BigBlueButton mock server is configured
And I accept dpa and enable bigbluebuttonbn plugin
And I enable "bigbluebuttonbn" "mod" plugin
Scenario Outline: Users should be able to join a session depending on the Wait for moderator to join setting
Given the following course exists:
@@ -5,7 +5,7 @@ Feature: BigBlueButtonBN Subplugins test
I can see the additional settings coming from the subplugins in the edit form
Background: Make sure that the BigBlueButtonBN plugin is enabled
Given I accept dpa and enable bigbluebuttonbn plugin
Given I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Test course | Test course | 0 | 1 |
@@ -50,7 +50,6 @@ class mod_bigbluebuttonbn_generator extends \testing_module_generator {
*/
public function create_instance($record = null, array $options = null) {
// Prior to creating the instance, make sure that the BigBlueButton module is enabled.
set_config('bigbluebuttonbn_default_dpa_accepted', true);
$modules = \core_plugin_manager::instance()->get_plugins_of_type('mod');
if (!$modules['bigbluebuttonbn']->is_enabled()) {
mod::enable_plugin('bigbluebuttonbn', true);
-67
View File
@@ -698,71 +698,4 @@ class lib_test extends \advanced_testcase {
$this->assertFalse(mod_bigbluebuttonbn_core_calendar_is_event_visible($event));
}
/**
* Check the bigbluebuttonbn_pre_enable_plugin_actions function.
*
* @covers ::bigbluebuttonbn_pre_enable_plugin_actions
* @dataProvider bigbluebuttonbn_pre_enable_plugin_actions_provider
* @param bool $initialstate
* @param bool $expected
* @param int $notificationcount
*/
public function test_bigbluebuttonbn_pre_enable_plugin_actions(
?bool $initialstate,
bool $expected,
int $notificationcount
): void {
$this->resetAfterTest(true);
set_config('bigbluebuttonbn_default_dpa_accepted', $initialstate);
$this->assertEquals($expected, bigbluebuttonbn_pre_enable_plugin_actions());
$this->assertCount($notificationcount, \core\notification::fetch());
}
/**
* Check the bigbluebuttonbn_pre_enable_plugin_actions function.
*
* @covers ::bigbluebuttonbn_pre_enable_plugin_actions
* @dataProvider bigbluebuttonbn_pre_enable_plugin_actions_provider
* @param bool $initialstate
* @param bool $expected
* @param int $notificationcount
*/
public function test_enable_plugin(
?bool $initialstate,
bool $expected,
int $notificationcount
): void {
$this->resetAfterTest(true);
set_config('bigbluebuttonbn_default_dpa_accepted', $initialstate);
$this->assertEquals($expected, \core\plugininfo\mod::enable_plugin('bigbluebuttonbn', 1));
$this->assertCount($notificationcount, \core\notification::fetch());
}
/**
* Data provider for bigbluebuttonbn_pre_enable_plugin_actions tests.
*
* @return array
*/
public function bigbluebuttonbn_pre_enable_plugin_actions_provider(): array {
return [
'Initially unset' => [
null,
false,
1,
],
'Set to false' => [
false,
false,
1,
],
'Initially set' => [
true,
true,
0,
],
];
}
}
@@ -397,7 +397,6 @@ class extension_test extends \advanced_testcase {
*/
private function enable_plugins(bool $bbbenabled) {
// First make sure that either BBB is enabled or not.
set_config('bigbluebuttonbn_default_dpa_accepted', $bbbenabled);
\core\plugininfo\mod::enable_plugin('bigbluebuttonbn', $bbbenabled ? 1 : 0);
$plugin = extension::BBB_EXTENSION_PLUGIN_NAME . '_simple';
if ($bbbenabled) {