Skip to content

Commit

Permalink
CONTRIB-9623: Fix moodlechecker errors (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssj365 authored Jul 15, 2024
1 parent 32f09a5 commit a78d458
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 14 deletions.
1 change: 1 addition & 0 deletions backup/moodle2/backup_bbbext_flexurl_subplugin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Provides the information for backup.
*
Expand Down
1 change: 1 addition & 0 deletions classes/bigbluebuttonbn/action_url_addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace bbbext_flexurl\bigbluebuttonbn;

use bbbext_flexurl\utils;
Expand Down
3 changes: 2 additions & 1 deletion classes/bigbluebuttonbn/mod_form_addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace bbbext_flexurl\bigbluebuttonbn;

use bbbext_flexurl\utils;
Expand All @@ -35,7 +36,7 @@ class mod_form_addons extends \mod_bigbluebuttonbn\local\extension\mod_form_addo
* @param stdClass|null $bigbluebuttonbndata
* @param string|null $suffix
*/
public function __construct(\MoodleQuickForm &$mform, ?stdClass $bigbluebuttonbndata = null, string $suffix = null) {
public function __construct(\MoodleQuickForm &$mform, ?stdClass $bigbluebuttonbndata = null, ?string $suffix = null) {
parent::__construct($mform, $bigbluebuttonbndata, $suffix);
// Supplement BBB data with additional information.
if (!empty($bigbluebuttonbndata->id)) {
Expand Down
1 change: 1 addition & 0 deletions classes/bigbluebuttonbn/mod_instance_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace bbbext_flexurl\bigbluebuttonbn;

use bbbext_flexurl\utils;
Expand Down
1 change: 1 addition & 0 deletions classes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace bbbext_flexurl;

use core_course\external\course_module_summary_exporter;
Expand Down
21 changes: 12 additions & 9 deletions lang/en/bbbext_flexurl.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Language File.
*
Expand All @@ -23,20 +24,22 @@
*/

defined('MOODLE_INTERNAL') || die();
$string['activity_info'] = 'Activity information (ACTIVITY)';
$string['addparamgroup'] = 'Add a new parameter';
$string['available_info'] = 'Available information that can be passed to the additional parameter in the URL';
$string['available_info_desc'] = 'Available information that can be passed to the additional parameter in the URL. This can be used
to pass information dynamically to join or create URL (i.e. when a user joins a meeting or create the meeting).';
$string['activity_info'] = 'Activity information (ACTIVITY)';
$string['course_info'] = 'Course info (COURSE)';
$string['event_all'] = 'Both';
$string['event_create'] = 'Create';
$string['event_join'] = 'Join';
$string['event_all'] = 'Both';
$string['user_info'] = 'Basic user info (USER)';
$string['pluginname'] = 'BigBlueButton FlexURL';
$string['paramgroup'] = 'Parameter';
$string['param_name'] = 'Parameter name';
$string['param_value'] = 'Parameter value';
$string['param_eventtype'] = 'Parameter event type';
$string['addparamgroup'] = 'Add a new parameter';
$string['formname'] = 'Extra parameters';
$string['formname_help'] = 'The keys and values added in this section are sent to BigBlueButton as \'extra parameters\' when the room is created or the user joins the meeting.';
$string['param_eventtype'] = 'Parameter event type';
$string['param_name'] = 'Parameter name';
$string['param_value'] = 'Parameter value';
$string['paramgroup'] = 'Parameter';
$string['pluginname'] = 'BigBlueButton FlexURL';
$string['user_info'] = 'Basic user info (USER)';


1 change: 1 addition & 0 deletions tests/bigbluebutton/action_url_addons_tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace bbbext_flexurl\bigbluebuttonbn;

use bbbext_flexurl\utils;
Expand Down
9 changes: 5 additions & 4 deletions tests/utils_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace bbbext_flexurl;

use mod_bigbluebuttonbn\instance;
Expand All @@ -26,7 +27,7 @@
* @author Laurent David ([email protected])
* @coversDefaultClass \bbbext_flexurl\utils
*/
class utils_test extends \advanced_testcase {
final class utils_test extends \advanced_testcase {
/**
* @var \stdClass $bbb
*/
Expand Down Expand Up @@ -109,7 +110,7 @@ public function setUp(): void {
*
* @covers \bbbext_flexurl\utils::get_options_for_parameters
*/
public function test_get_options_for_parameters() {
public function test_get_options_for_parameters(): void {
$this->setAdminUser(); // To get the email.
$options = utils::get_options_for_parameters();
$this->assertNotEmpty($options);
Expand Down Expand Up @@ -161,7 +162,7 @@ public function test_get_options_for_parameters() {
* @covers \bbbext_flexurl\utils::get_fields_for_parameter
* @dataProvider provider_get_fields_for_parameter
*/
public function test_get_fields_for_parameter(string $paramtype, array $expected) {
public function test_get_fields_for_parameter(string $paramtype, array $expected): void {
$this->setAdminUser(); // To get the email.
$fields = utils::get_fields_for_parameter($paramtype);
$this->assertNotEmpty($fields);
Expand All @@ -175,7 +176,7 @@ public function test_get_fields_for_parameter(string $paramtype, array $expected
* @covers \bbbext_flexurl\utils::get_value_for_field
* @dataProvider provider_get_value_for_fields
*/
public function test_get_value_for_field(array $expected) {
public function test_get_value_for_field(array $expected): void {
$instance = instance::get_from_instanceid($this->bbb->id);

$this->setUser($this->user);
Expand Down

0 comments on commit a78d458

Please sign in to comment.