Skip to content

Commit

Permalink
MDL-73511 mod_bigbluebuttonbn: exception raised when editing activity
Browse files Browse the repository at this point in the history
* When editing an activity and the voicebridge_editable is set, there is an exception raised
  • Loading branch information
laurentdavid committed Jan 6, 2022
1 parent 541d999 commit c7b7061
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/bigbluebuttonbn/mod_form.php
Expand Up @@ -667,12 +667,12 @@ private function bigbluebuttonbn_mform_add_block_schedule(MoodleQuickForm &$mfor
* @param string|null $descriptionkey
* @param mixed|null $defaultvalue
* @param array|null $options
* @param string|null $rule
* @param array|null $rule
* @return void
* @throws coding_exception
*/
private function bigbluebuttonbn_mform_add_element(MoodleQuickForm &$mform, string $type, string $name, ?string $datatype,
?string $descriptionkey = "", $defaultvalue = null, ?array $options = null, ?string $rule = null): void {
?string $descriptionkey = "", $defaultvalue = null, ?array $options = null, ?array $rule = null): void {
$datatype = $datatype ?? 'hidden';
if ($type === 'hidden' || $type === 'static') {
$mform->addElement($type, $name, $defaultvalue);
Expand Down
30 changes: 30 additions & 0 deletions mod/bigbluebuttonbn/tests/behat/edit_instance.feature
@@ -0,0 +1,30 @@
@mod @mod_bigbluebuttonbn @javascript
Feature: I can edit a bigbluebutton instance
When a bibluebutton instance has been created I can edit it

Background: Make sure that a course is created
Given a BigBlueButton mock server is configured
And the following config values are set as admin:
| bigbluebuttonbn_voicebridge_editable | 1 |
And the following "courses" exist:
| fullname | shortname | category |
| Test course | Test course | 0 |

Scenario Outline: Add a mod_bigbluebuttonbn instance with Room/Activity with recordings
Then I log in as "admin"
And I am on "Test course" course homepage with editing mode on
When I add a "BigBlueButton" to section "1" and I fill the form with:
| name | <activityname> |
| Instance type | <instancetype> |
| Virtual classroom name | <activityname> |
Given I am on the "<activityname>" "bigbluebuttonbn activity" page logged in as admin
And I click on "Settings" "link"
And the field "Instance type" matches value "<instancetype>"
And I <shouldseerole> "Role assigned during live session"
And I expand all fieldsets
And I <shouldseesession> "Session can be recorded"
Examples:
| activityname | instancetype | shouldseerole | shouldseesession |
| Activity with recording | Room/Activity with recordings | should see | should see |
| Activity only | Room/Activity only | should see | should see |
| Recordings only | Recordings only | should not see | should not see |

0 comments on commit c7b7061

Please sign in to comment.