Skip to content

Commit

Permalink
Add help button to the header section
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentdavid committed Dec 7, 2023
1 parent bd02ecf commit 8ab8e51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions classes/bigbluebuttonbn/mod_form_addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
namespace bbbext_flexurl\bigbluebuttonbn;

use bbbext_flexurl\utils;
use MoodleQuickForm;
use stdClass;

/**
Expand Down Expand Up @@ -163,9 +162,8 @@ public function definition_after_data() {
* Add new form field definition
*/
public function add_fields(): void {
global $CFG;
$this->mform->addElement('header', 'flexurl', get_string('pluginname', 'bbbext_flexurl'));

$this->mform->addHelpButton('flexurl', 'flexurl', 'bbbext_flexurl');
$paramcount = optional_param('flexurl_paramcount', $this->bigbluebuttonbndata->flexurl_paramcount ?? 0, PARAM_RAW);
$paramcount += optional_param('flexurl_addparamgroup', 0, PARAM_RAW) ? 1 : 0;
$isdeleting = optional_param_array('flexurl_paramdelete', [], PARAM_RAW);
Expand Down Expand Up @@ -217,6 +215,7 @@ public function add_fields(): void {
$this->mform->setType("flexurl_paramvalue[$index]", utils::PARAM_TYPES['paramvalue']);
$this->mform->setType("flexurl_eventtype[$index]", utils::PARAM_TYPES['eventtype']);
$this->mform->setType("flexurl_paramdelete[$index]", PARAM_RAW);

$this->mform->registerNoSubmitButton("flexurl_paramdelete[$index]");
}
// Add a button to add new param groups.
Expand Down
3 changes: 3 additions & 0 deletions lang/en/bbbext_flexurl.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
$string['event_create'] = 'Create';
$string['event_join'] = 'Join';
$string['event_all'] = 'All';
$string['flexurl_help'] = 'This allows you to add additional parameters to the join/create URL of a BigBlueButton activity.
So you need first to choose a name for your parameter, then the value of the parameter and finally the event type
(create, join or both).';
$string['user_info'] = 'Basic user info (USER)';
$string['pluginname'] = 'BigBlueButton FlexURL';
$string['paramgroup'] = 'Parameter';
Expand Down

0 comments on commit 8ab8e51

Please sign in to comment.