mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-75176 mod_bigbluebuttonbn: Remove the lockonjoin settings
* Remove the setting "lock on join" and related settings * Hard-code the lockSettingsLockOnJoin=true parameter on create when any of the lock settings is used.
This commit is contained in:
parent
24f97edd91
commit
059e2b91cf
11 changed files with 52 additions and 48 deletions
|
@ -108,8 +108,6 @@ class config {
|
|||
'disablenote_editable' => true,
|
||||
'hideuserlist_default' => false,
|
||||
'hideuserlist_editable' => true,
|
||||
'lockonjoin_default' => true,
|
||||
'lockonjoin_editable' => false,
|
||||
'welcome_default' => '',
|
||||
'default_dpa_accepted' => false,
|
||||
];
|
||||
|
@ -215,8 +213,6 @@ class config {
|
|||
'disablenote_default' => self::get('disablenote_default'),
|
||||
'hideuserlist_editable' => self::get('hideuserlist_editable'),
|
||||
'hideuserlist_default' => self::get('hideuserlist_default'),
|
||||
'lockonjoin_editable' => self::get('lockonjoin_editable'),
|
||||
'lockonjoin_default' => self::get('lockonjoin_default'),
|
||||
'welcome_default' => self::get('welcome_default'),
|
||||
'welcome_editable' => self::get('welcome_editable'),
|
||||
];
|
||||
|
|
|
@ -115,9 +115,6 @@ class mod_helper {
|
|||
if (!isset($bigbluebuttonbn->lockedlayout)) {
|
||||
$bigbluebuttonbn->lockedlayout = 0;
|
||||
}
|
||||
if (!isset($bigbluebuttonbn->lockonjoin)) {
|
||||
$bigbluebuttonbn->lockonjoin = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -350,7 +350,6 @@ class meeting {
|
|||
'disableprivatechat' => 'lockSettingsDisablePrivateChat',
|
||||
'disablepublicchat' => 'lockSettingsDisablePublicChat',
|
||||
'disablenote' => 'lockSettingsDisableNote',
|
||||
'lockonjoin' => 'lockSettingsLockOnJoin',
|
||||
'hideuserlist' => 'lockSettingsHideUserList'
|
||||
];
|
||||
/**
|
||||
|
@ -391,6 +390,9 @@ class meeting {
|
|||
$instancevar = $this->instance->get_instance_var($instancevarname);
|
||||
if (!is_null($instancevar)) {
|
||||
$data[$lockname] = $instancevar ? 'true' : 'false';
|
||||
if ($instancevar) {
|
||||
$data['lockSettingsLockOnJoin'] = 'true'; // This will be locked whenever one settings is locked.
|
||||
}
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
|
|
|
@ -226,17 +226,6 @@ class setting_validator {
|
|||
!isset($CFG->bigbluebuttonbn['hideuserlist_editable']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate if lockonjoin section will be shown.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function section_lockonjoin_shown() {
|
||||
global $CFG;
|
||||
return (!isset($CFG->bigbluebuttonbn['lockonjoin_default']) ||
|
||||
!isset($CFG->bigbluebuttonbn['lockonjoin_editable']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate that session lock settings is shown or not
|
||||
* @return bool
|
||||
|
@ -248,7 +237,6 @@ class setting_validator {
|
|||
self::section_disableprivatechat_shown() ||
|
||||
self::section_disablepublicchat_shown() ||
|
||||
self::section_disablenote_shown() ||
|
||||
self::section_hideuserlist_shown() ||
|
||||
self::section_lockonjoin_shown();
|
||||
self::section_hideuserlist_shown();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -788,7 +788,6 @@ class settings {
|
|||
$this->add_lock_setting_from_name('disablepublicchat', $lockingsetting);
|
||||
$this->add_lock_setting_from_name('disablenote', $lockingsetting);
|
||||
$this->add_lock_setting_from_name('hideuserlist', $lockingsetting);
|
||||
$this->add_lock_setting_from_name('lockonjoin', $lockingsetting);
|
||||
}
|
||||
$this->admin->add($this->parent, $lockingsetting);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/bigbluebuttonbn/db" VERSION="20210909" COMMENT="XMLDB file for Moodle mod/bigbluebuttonbn"
|
||||
<XMLDB PATH="mod/bigbluebuttonbn/db" VERSION="20220804" COMMENT="XMLDB file for Moodle mod/bigbluebuttonbn"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
|
@ -41,8 +41,6 @@
|
|||
<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="lockedlayout" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="lockonjoin" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="lockonjoinconfigurable" 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."/>
|
||||
|
|
|
@ -435,7 +435,23 @@ function xmldb_bigbluebuttonbn_upgrade($oldversion = 0) {
|
|||
// Bigbluebuttonbn savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2022050600, 'bigbluebuttonbn');
|
||||
}
|
||||
if ($oldversion < 2022080400) {
|
||||
|
||||
// Define field lockonjoin to be dropped from bigbluebuttonbn.
|
||||
$table = new xmldb_table('bigbluebuttonbn');
|
||||
$field = new xmldb_field('lockonjoin');
|
||||
// Conditionally launch drop field lockonjoin.
|
||||
if ($dbman->field_exists($table, $field)) {
|
||||
$dbman->drop_field($table, $field);
|
||||
}
|
||||
$field = new xmldb_field('lockonjoinconfigurable');
|
||||
// Conditionally launch drop field lockonjoinconfigurable.
|
||||
if ($dbman->field_exists($table, $field)) {
|
||||
$dbman->drop_field($table, $field);
|
||||
}
|
||||
// Bigbluebuttonbn savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2022080400, 'bigbluebuttonbn');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -286,11 +286,6 @@ $string['config_hideuserlist_default_description'] = 'If enabled the session use
|
|||
$string['config_hideuserlist_editable'] = 'Hide user list can be edited';
|
||||
$string['config_hideuserlist_editable_description'] = 'Hide user list by default can be edited when the instance is added or updated.';
|
||||
|
||||
$string['config_lockonjoin_default'] = 'Lock on join enabled by default';
|
||||
$string['config_lockonjoin_default_description'] = 'If enabled the settings locked by configuration are applied to the user when they join. Lock configuration must be enabled for this to apply.';
|
||||
$string['config_lockonjoin_editable'] = 'Lock on join can be edited';
|
||||
$string['config_lockonjoin_editable_description'] = 'Lock on join by default can be edited when the instance is added or updated.';
|
||||
|
||||
$string['config_experimental_features'] = 'Experimental features';
|
||||
$string['config_experimental_features_description'] = 'Configuration for experimental features.';
|
||||
|
||||
|
@ -373,7 +368,6 @@ $string['mod_form_field_disableprivatechat'] = 'Disable private chat';
|
|||
$string['mod_form_field_disablepublicchat'] = 'Disable public chat';
|
||||
$string['mod_form_field_disablenote'] = 'Disable shared notes';
|
||||
$string['mod_form_field_hideuserlist'] = 'Hide user list';
|
||||
$string['mod_form_field_lockonjoin'] = 'Lock settings on join';
|
||||
$string['mod_form_locksettings'] = 'Lock settings';
|
||||
$string['report_join_info'] = 'Has joined the room {$a} time(s)';
|
||||
$string['report_play_recording_info'] = 'Has played a recording {$a} time(s)';
|
||||
|
|
|
@ -453,15 +453,6 @@ class mod_bigbluebuttonbn_mod_form extends moodleform_mod {
|
|||
$this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
|
||||
$field['description_key'], $cfg['disablenote_default']);
|
||||
|
||||
$field = ['type' => 'hidden', 'name' => 'lockonjoin', 'data_type' => PARAM_INT, 'description_key' => null];
|
||||
if ($cfg['lockonjoin_editable']) {
|
||||
$field['type'] = 'checkbox';
|
||||
$field['description_key'] = 'mod_form_field_lockonjoin';
|
||||
$locksettings = true;
|
||||
}
|
||||
$this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
|
||||
$field['description_key'], $cfg['lockonjoin_default']);
|
||||
|
||||
$field = ['type' => 'hidden', 'name' => 'hideuserlist', 'data_type' => PARAM_INT, 'description_key' => null];
|
||||
if ($cfg['hideuserlist_editable']) {
|
||||
$field['type'] = 'checkbox';
|
||||
|
|
|
@ -31,10 +31,33 @@ Feature: Test that the meeting has the right lock setting.
|
|||
Then I should see "<bbbsettingvalue>" in the "lockSettings" "mod_bigbluebuttonbn > Meeting field"
|
||||
|
||||
Examples:
|
||||
| locksettingname | value | bbbsettingvalue |
|
||||
| disablecam | 1 | disableCam : enabled |
|
||||
| disablemic | 1 | disableMic : enabled |
|
||||
| disableprivatechat | 1 | disablePrivateChat : enabled |
|
||||
| disablepublicchat | 1 | disablePublicChat : enabled |
|
||||
| disablenote | 1 | disableNote : enabled |
|
||||
| hideuserlist | 1 | hideUserList : enabled |
|
||||
| locksettingname | value | bbbsettingvalue |
|
||||
| disablecam | 1 | disableCam : enabled |
|
||||
| disablemic | 1 | disableMic : enabled |
|
||||
| disableprivatechat | 1 | disablePrivateChat : enabled |
|
||||
| disablepublicchat | 1 | disablePublicChat : enabled |
|
||||
| disablenote | 1 | disableNote : enabled |
|
||||
| hideuserlist | 1 | hideUserList : enabled |
|
||||
|
||||
@javascript
|
||||
Scenario: If any lock Setting is enabled, then the LockOnJoin should be enabled
|
||||
Given the following course exists:
|
||||
| name | Test course |
|
||||
| shortname | C1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| traverst | Terry | Travers | t.travers@example.com |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| traverst | C1 | editingteacher |
|
||||
And the following "activity" exists:
|
||||
| course | C1 |
|
||||
| activity | bigbluebuttonbn |
|
||||
| name | Room recordings |
|
||||
| idnumber | Room recordings |
|
||||
| disablecam | 1 |
|
||||
When I am on the "Room recordings" Activity page logged in as traverst
|
||||
And I click on "Join session" "link"
|
||||
And I switch to "bigbluebutton_conference" window
|
||||
Then I should see "disableCam : enabled" in the "lockSettings" "mod_bigbluebuttonbn > Meeting field"
|
||||
Then I should see "lockOnJoin : enabled" in the "lockSettings" "mod_bigbluebuttonbn > Meeting field"
|
||||
|
|
|
@ -27,6 +27,6 @@
|
|||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
|
||||
$plugin->version = 2022050600;
|
||||
$plugin->version = 2022080400;
|
||||
$plugin->requires = 2022041200;
|
||||
$plugin->component = 'mod_bigbluebuttonbn';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue