Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-9110

waitformoderator_editable false disables waitformoderator_default and "wait for moderator" is inactiv

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 3.11.10
    • None
    • MOODLE_311_STABLE

      If all four settings are set to 0

       

      $CFG->bigbluebuttonbn_voicebridge_editable = "0";
      $CFG->bigbluebuttonbn_waitformoderator_editable = "0";
      $CFG->bigbluebuttonbn_userlimit_editable = "0";
      $CFG->bigbluebuttonbn_recording_editable = "0";
      

       

      in config.php then when adding a new bbb-activity to a course the section to edit the waitformoderator-setting is not shown.

      So the default values like

      waitformoderator_default = "1"

       are NOT set and so the waitformoderator-feature is disabled because it is NOT set to 1. A user can then enter the bbb-room although there is no moderator.

      So the following config does not work as expected if the other settings are disabled as mentioned before:

      $CFG->bigbluebuttonbn_waitformoderator_default = "1";
      $CFG->bigbluebuttonbn_waitformoderator_editable = "0";

      The problem seems to be that the for settings to configure if voicebridge, waitformoderator, userlimit AND recording are ALL disabled and set to = "0".

      $CFG->bigbluebuttonbn_voicebridge_editable = "0";
      $CFG->bigbluebuttonbn_waitformoderator_editable = "0"; 
      $CFG->bigbluebuttonbn_userlimit_editable = "0";
      $CFG->bigbluebuttonbn_recording_editable = "0";

      In this case the default-settings ar not supported and the values are 0.

       

      See line 548 in mod/bigbluebuttonbn/mod_form.php:

      private function bigbluebuttonbn_mform_add_block_room(&$mform, $cfg) {        
          if ($cfg['voicebridge_editable'] || $cfg['waitformoderator_editable'] ||         $cfg['userlimit_editable'] || $cfg['recording_editable']) {          
                  $mform->addElement('header', 'room', get_string('mod_form_block_room', 'bigbluebuttonbn'));    
                  $this->bigbluebuttonbn_mform_add_block_room_room($mform, $cfg);        
          }
      

      Thus the following setting does not work too if ALL the four editable-settings are set to 0.

      $CFG->bigbluebuttonbn_userlimit_default = "100"; 
      $CFG->bigbluebuttonbn_recording_default = 1;

       

      Solution might me to make the header of the sections depending on at least one editable setting and ALLWAYS call bigbluebuttonbn_mform_add_block_room_room. bigbluebuttonbn_mform_add_block_room_room adds hidden parameters with the correct default settings:

       

      private function bigbluebuttonbn_mform_add_block_room(MoodleQuickForm &$mform, array $cfg) {
          if ($cfg['voicebridge_editable'] || $cfg['waitformoderator_editable'] ||
              $cfg['userlimit_editable'] || $cfg['recording_editable'] || $cfg['muteonstart_editable']) {
              $mform->addElement('header', 'room', get_string('mod_form_block_room', 'bigbluebuttonbn'));
          }
          $this->bigbluebuttonbn_mform_add_block_room_room($mform, $cfg);
          if ($cfg['recordings_imported_editable'] || $cfg['recordings_preview_editable']) {
              $mform->addElement('header', 'recordings', get_string('mod_form_block_recordings', 'bigbluebuttonbn'));
          }
          $this->bigbluebuttonbn_mform_add_block_room_recordings($mform, $cfg);
      } 

      If all recordingsettings are not editable then there is a message "No settings can be edited" that would not be nesseccary because the settings are hidden. So the following code might be not nesseccary:

      if (!$recordingsettings) {
          $field = ['type' => 'static', 'name' => 'no_recordings',
              'defaultvalue' => get_string('mod_form_field_nosettings', 'bigbluebuttonbn')];
          $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], null, null,
              $field['defaultvalue']);
      }

       

       

            shamiso.jaravaza Shamiso Jaravaza
            shamiso.jaravaza Shamiso Jaravaza
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.