@@ -190,27 +190,27 @@ |
||
| 190 | 190 | |
| 191 | 191 | //// Configuration for "scheduled duration" feature |
| 192 | 192 | if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_scheduled_duration_enabled) ) { |
| 193 | - $settings->add( new admin_setting_heading('config_scheduled', |
|
| 194 | - get_string('config_scheduled', 'bigbluebuttonbn'), |
|
| 195 | - get_string('config_scheduled_description', 'bigbluebuttonbn'))); |
|
| 193 | + $settings->add( new admin_setting_heading('config_scheduled', |
|
| 194 | + get_string('config_scheduled', 'bigbluebuttonbn'), |
|
| 195 | + get_string('config_scheduled_description', 'bigbluebuttonbn'))); |
|
| 196 | 196 | |
| 197 | - // calculated duration for 'scheduled session' feature |
|
| 198 | - $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_scheduled_duration_enabled', |
|
| 199 | - get_string('config_scheduled_duration_enabled', 'bigbluebuttonbn'), |
|
| 200 | - get_string('config_scheduled_duration_enabled_description', 'bigbluebuttonbn'), |
|
| 201 | - 1)); |
|
| 197 | + // calculated duration for 'scheduled session' feature |
|
| 198 | + $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_scheduled_duration_enabled', |
|
| 199 | + get_string('config_scheduled_duration_enabled', 'bigbluebuttonbn'), |
|
| 200 | + get_string('config_scheduled_duration_enabled_description', 'bigbluebuttonbn'), |
|
| 201 | + 1)); |
|
| 202 | 202 | |
| 203 | - // compensatory time for 'scheduled session' feature |
|
| 204 | - $settings->add(new admin_setting_configtext('bigbluebuttonbn_scheduled_duration_compensation', |
|
| 205 | - get_string('config_scheduled_duration_compensation', 'bigbluebuttonbn'), |
|
| 206 | - get_string('config_scheduled_duration_compensation_description', 'bigbluebuttonbn'), |
|
| 207 | - 10, PARAM_INT)); |
|
| 203 | + // compensatory time for 'scheduled session' feature |
|
| 204 | + $settings->add(new admin_setting_configtext('bigbluebuttonbn_scheduled_duration_compensation', |
|
| 205 | + get_string('config_scheduled_duration_compensation', 'bigbluebuttonbn'), |
|
| 206 | + get_string('config_scheduled_duration_compensation_description', 'bigbluebuttonbn'), |
|
| 207 | + 10, PARAM_INT)); |
|
| 208 | 208 | |
| 209 | - // pre-opening time for 'scheduled session' feature |
|
| 210 | - $settings->add(new admin_setting_configtext('bigbluebuttonbn_scheduled_pre_opening', |
|
| 211 | - get_string('config_scheduled_pre_opening', 'bigbluebuttonbn'), |
|
| 212 | - get_string('config_scheduled_pre_opening_description', 'bigbluebuttonbn'), |
|
| 213 | - 10, PARAM_INT)); |
|
| 209 | + // pre-opening time for 'scheduled session' feature |
|
| 210 | + $settings->add(new admin_setting_configtext('bigbluebuttonbn_scheduled_pre_opening', |
|
| 211 | + get_string('config_scheduled_pre_opening', 'bigbluebuttonbn'), |
|
| 212 | + get_string('config_scheduled_pre_opening_description', 'bigbluebuttonbn'), |
|
| 213 | + 10, PARAM_INT)); |
|
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | //// Configuration for defining the default role/user that will be moderator on new activities |
@@ -13,52 +13,52 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | global $BIGBLUEBUTTONBN_CFG; |
| 15 | 15 | |
| 16 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 16 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 17 | 17 | |
| 18 | 18 | if ($ADMIN->fulltree) { |
| 19 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_server_url) || |
|
| 20 | - !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_shared_secret) ) { |
|
| 21 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_config_general', |
|
| 19 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_server_url) || |
|
| 20 | + !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_shared_secret)) { |
|
| 21 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_config_general', |
|
| 22 | 22 | get_string('config_general', 'bigbluebuttonbn'), |
| 23 | 23 | get_string('config_general_description', 'bigbluebuttonbn'))); |
| 24 | 24 | |
| 25 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_server_url) ) { |
|
| 26 | - $settings->add( new admin_setting_configtext( 'bigbluebuttonbn_server_url', |
|
| 27 | - get_string( 'config_server_url', 'bigbluebuttonbn' ), |
|
| 28 | - get_string( 'config_server_url_description', 'bigbluebuttonbn' ), |
|
| 25 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_server_url)) { |
|
| 26 | + $settings->add(new admin_setting_configtext('bigbluebuttonbn_server_url', |
|
| 27 | + get_string('config_server_url', 'bigbluebuttonbn'), |
|
| 28 | + get_string('config_server_url_description', 'bigbluebuttonbn'), |
|
| 29 | 29 | bigbluebuttonbn_get_cfg_server_url_default())); |
| 30 | 30 | } |
| 31 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_shared_secret) ) { |
|
| 32 | - $settings->add( new admin_setting_configtext( 'bigbluebuttonbn_shared_secret', |
|
| 33 | - get_string( 'config_shared_secret', 'bigbluebuttonbn' ), |
|
| 34 | - get_string( 'config_shared_secret_description', 'bigbluebuttonbn' ), |
|
| 31 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_shared_secret)) { |
|
| 32 | + $settings->add(new admin_setting_configtext('bigbluebuttonbn_shared_secret', |
|
| 33 | + get_string('config_shared_secret', 'bigbluebuttonbn'), |
|
| 34 | + get_string('config_shared_secret_description', 'bigbluebuttonbn'), |
|
| 35 | 35 | bigbluebuttonbn_get_cfg_shared_secret_default())); |
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | //// Configuration for recording feature |
| 40 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_default) || |
|
| 40 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_default) || |
|
| 41 | 41 | !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_editable) || |
| 42 | - !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_icons_enabled) ) { |
|
| 43 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_recording', |
|
| 42 | + !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_icons_enabled)) { |
|
| 43 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_recording', |
|
| 44 | 44 | get_string('config_feature_recording', 'bigbluebuttonbn'), |
| 45 | 45 | get_string('config_feature_recording_description', 'bigbluebuttonbn'))); |
| 46 | 46 | |
| 47 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_default) ) { |
|
| 47 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_default)) { |
|
| 48 | 48 | // default value for 'recording' feature |
| 49 | 49 | $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_recording_default', |
| 50 | 50 | get_string('config_feature_recording_default', 'bigbluebuttonbn'), |
| 51 | 51 | get_string('config_feature_recording_default_description', 'bigbluebuttonbn'), |
| 52 | 52 | 1)); |
| 53 | 53 | } |
| 54 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_editable) ) { |
|
| 54 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_editable)) { |
|
| 55 | 55 | // UI for 'recording' feature |
| 56 | 56 | $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_recording_editable', |
| 57 | 57 | get_string('config_feature_recording_editable', 'bigbluebuttonbn'), |
| 58 | 58 | get_string('config_feature_recording_editable_description', 'bigbluebuttonbn'), |
| 59 | 59 | 1)); |
| 60 | 60 | } |
| 61 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_icons_enabled) ) { |
|
| 61 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recording_icons_enabled)) { |
|
| 62 | 62 | // Front panel for 'recording' managment feature |
| 63 | 63 | $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_recording_icons_enabled', |
| 64 | 64 | get_string('config_feature_recording_icons_enabled', 'bigbluebuttonbn'), |
@@ -68,13 +68,13 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | //// Configuration for recording feature |
| 71 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingtagging_default) || |
|
| 72 | - !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingtagging_editable) ) { |
|
| 73 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_recordingtagging', |
|
| 71 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingtagging_default) || |
|
| 72 | + !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingtagging_editable)) { |
|
| 73 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_recordingtagging', |
|
| 74 | 74 | get_string('config_feature_recordingtagging', 'bigbluebuttonbn'), |
| 75 | 75 | get_string('config_feature_recordingtagging_description', 'bigbluebuttonbn'))); |
| 76 | 76 | |
| 77 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingtagging_default) ) { |
|
| 77 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingtagging_default)) { |
|
| 78 | 78 | // default value for 'recording tagging' feature |
| 79 | 79 | $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_recordingtagging_default', |
| 80 | 80 | get_string('config_feature_recordingtagging_default', 'bigbluebuttonbn'), |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | 0)); |
| 83 | 83 | } |
| 84 | 84 | // UI for 'recording tagging' feature |
| 85 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingtagging_editable) ) { |
|
| 85 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingtagging_editable)) { |
|
| 86 | 86 | $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_recordingtagging_editable', |
| 87 | 87 | get_string('config_feature_recordingtagging_editable', 'bigbluebuttonbn'), |
| 88 | 88 | get_string('config_feature_recordingtagging_editable_description', 'bigbluebuttonbn'), |
@@ -91,36 +91,36 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | //// Configuration for wait for moderator feature |
| 94 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_default) || |
|
| 94 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_default) || |
|
| 95 | 95 | !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_editable) || |
| 96 | 96 | !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_ping_interval) || |
| 97 | - !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_cache_ttl) ) { |
|
| 98 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_feature_waitformoderator', |
|
| 97 | + !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_cache_ttl)) { |
|
| 98 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_feature_waitformoderator', |
|
| 99 | 99 | get_string('config_feature_waitformoderator', 'bigbluebuttonbn'), |
| 100 | 100 | get_string('config_feature_waitformoderator_description', 'bigbluebuttonbn'))); |
| 101 | 101 | |
| 102 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_default) ) { |
|
| 102 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_default)) { |
|
| 103 | 103 | //default value for 'wait for moderator' feature |
| 104 | 104 | $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_waitformoderator_default', |
| 105 | 105 | get_string('config_feature_waitformoderator_default', 'bigbluebuttonbn'), |
| 106 | 106 | get_string('config_feature_waitformoderator_default_description', 'bigbluebuttonbn'), |
| 107 | 107 | 0)); |
| 108 | 108 | } |
| 109 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_editable) ) { |
|
| 109 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_editable)) { |
|
| 110 | 110 | // UI for 'wait for moderator' feature |
| 111 | 111 | $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_waitformoderator_editable', |
| 112 | 112 | get_string('config_feature_waitformoderator_editable', 'bigbluebuttonbn'), |
| 113 | 113 | get_string('config_feature_waitformoderator_editable_description', 'bigbluebuttonbn'), |
| 114 | 114 | 1)); |
| 115 | 115 | } |
| 116 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_ping_interval) ) { |
|
| 116 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_ping_interval)) { |
|
| 117 | 117 | //ping interval value for 'wait for moderator' feature |
| 118 | 118 | $settings->add(new admin_setting_configtext('bigbluebuttonbn_waitformoderator_ping_interval', |
| 119 | 119 | get_string('config_feature_waitformoderator_ping_interval', 'bigbluebuttonbn'), |
| 120 | 120 | get_string('config_feature_waitformoderator_ping_interval_description', 'bigbluebuttonbn'), |
| 121 | 121 | 10, PARAM_INT)); |
| 122 | 122 | } |
| 123 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_cache_ttl) ) { |
|
| 123 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_waitformoderator_cache_ttl)) { |
|
| 124 | 124 | //cache TTL value for 'wait for moderator' feature |
| 125 | 125 | $settings->add(new admin_setting_configtext('bigbluebuttonbn_waitformoderator_cache_ttl', |
| 126 | 126 | get_string('config_feature_waitformoderator_cache_ttl', 'bigbluebuttonbn'), |
@@ -130,8 +130,8 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | //// Configuration for "static voice bridge" feature |
| 133 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_voicebridge_editable) ) { |
|
| 134 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_feature_voicebridge', |
|
| 133 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_voicebridge_editable)) { |
|
| 134 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_feature_voicebridge', |
|
| 135 | 135 | get_string('config_feature_voicebridge', 'bigbluebuttonbn'), |
| 136 | 136 | get_string('config_feature_voicebridge_description', 'bigbluebuttonbn'))); |
| 137 | 137 | |
@@ -143,10 +143,10 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | //// Configuration for "preupload presentation" feature |
| 146 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_preuploadpresentation_enabled) ) { |
|
| 146 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_preuploadpresentation_enabled)) { |
|
| 147 | 147 | // This feature only works if curl is installed |
| 148 | 148 | if (extension_loaded('curl')) { |
| 149 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_feature_preuploadpresentation', |
|
| 149 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_feature_preuploadpresentation', |
|
| 150 | 150 | get_string('config_feature_preuploadpresentation', 'bigbluebuttonbn'), |
| 151 | 151 | get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn') |
| 152 | 152 | )); |
@@ -157,29 +157,29 @@ discard block |
||
| 157 | 157 | get_string('config_feature_preuploadpresentation_enabled_description', 'bigbluebuttonbn'), |
| 158 | 158 | 0)); |
| 159 | 159 | } else { |
| 160 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_feature_preuploadpresentation', |
|
| 160 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_feature_preuploadpresentation', |
|
| 161 | 161 | get_string('config_feature_preuploadpresentation', 'bigbluebuttonbn'), |
| 162 | - get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn').'<br><br>'. |
|
| 163 | - '<div class="form-defaultinfo">'.get_string('config_warning_curl_not_installed', 'bigbluebuttonbn').'</div><br>' |
|
| 162 | + get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn') . '<br><br>' . |
|
| 163 | + '<div class="form-defaultinfo">' . get_string('config_warning_curl_not_installed', 'bigbluebuttonbn') . '</div><br>' |
|
| 164 | 164 | )); |
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | //// Configuration for "user limit" feature |
| 169 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_userlimit_default) || |
|
| 170 | - !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_userlimit_editable) ) { |
|
| 171 | - $settings->add( new admin_setting_heading('config_userlimit', |
|
| 169 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_userlimit_default) || |
|
| 170 | + !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_userlimit_editable)) { |
|
| 171 | + $settings->add(new admin_setting_heading('config_userlimit', |
|
| 172 | 172 | get_string('config_feature_userlimit', 'bigbluebuttonbn'), |
| 173 | 173 | get_string('config_feature_userlimit_description', 'bigbluebuttonbn'))); |
| 174 | 174 | |
| 175 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_userlimit_default) ) { |
|
| 175 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_userlimit_default)) { |
|
| 176 | 176 | //default value for 'user limit' feature |
| 177 | 177 | $settings->add(new admin_setting_configtext('bigbluebuttonbn_userlimit_default', |
| 178 | 178 | get_string('config_feature_userlimit_default', 'bigbluebuttonbn'), |
| 179 | 179 | get_string('config_feature_userlimit_default_description', 'bigbluebuttonbn'), |
| 180 | 180 | 0, PARAM_INT)); |
| 181 | 181 | } |
| 182 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_userlimit_editable) ) { |
|
| 182 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_userlimit_editable)) { |
|
| 183 | 183 | // UI for 'user limit' feature |
| 184 | 184 | $settings->add(new admin_setting_configcheckbox('bigbluebuttonbn_userlimit_editable', |
| 185 | 185 | get_string('config_feature_userlimit_editable', 'bigbluebuttonbn'), |
@@ -189,8 +189,8 @@ discard block |
||
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | //// Configuration for "scheduled duration" feature |
| 192 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_scheduled_duration_enabled) ) { |
|
| 193 | - $settings->add( new admin_setting_heading('config_scheduled', |
|
| 192 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_scheduled_duration_enabled)) { |
|
| 193 | + $settings->add(new admin_setting_heading('config_scheduled', |
|
| 194 | 194 | get_string('config_scheduled', 'bigbluebuttonbn'), |
| 195 | 195 | get_string('config_scheduled_description', 'bigbluebuttonbn'))); |
| 196 | 196 | |
@@ -214,8 +214,8 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | //// Configuration for defining the default role/user that will be moderator on new activities |
| 217 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_moderator_default) ) { |
|
| 218 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_permission', |
|
| 217 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_moderator_default)) { |
|
| 218 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_permission', |
|
| 219 | 219 | get_string('config_permission', 'bigbluebuttonbn'), |
| 220 | 220 | get_string('config_permission_description', 'bigbluebuttonbn'))); |
| 221 | 221 | |
@@ -229,8 +229,8 @@ discard block |
||
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | //// Configuration for "send notifications" feature |
| 232 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_sendnotifications_enabled) ) { |
|
| 233 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_feature_sendnotifications', |
|
| 232 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_sendnotifications_enabled)) { |
|
| 233 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_feature_sendnotifications', |
|
| 234 | 234 | get_string('config_feature_sendnotifications', 'bigbluebuttonbn'), |
| 235 | 235 | get_string('config_feature_sendnotifications_description', 'bigbluebuttonbn'))); |
| 236 | 236 | |
@@ -242,10 +242,10 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | //// Configuration for extended BN capabilities |
| 245 | - if( bigbluebuttonbn_server_offers_bn_capabilities() ) { |
|
| 245 | + if (bigbluebuttonbn_server_offers_bn_capabilities()) { |
|
| 246 | 246 | //// Configuration for 'notify users when recording ready' feature |
| 247 | - if( !isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingready_enabled) ) { |
|
| 248 | - $settings->add( new admin_setting_heading('bigbluebuttonbn_extended_capabilities', |
|
| 247 | + if (!isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingready_enabled)) { |
|
| 248 | + $settings->add(new admin_setting_heading('bigbluebuttonbn_extended_capabilities', |
|
| 249 | 249 | get_string('config_extended_capabilities', 'bigbluebuttonbn'), |
| 250 | 250 | get_string('config_extended_capabilities_description', 'bigbluebuttonbn'))); |
| 251 | 251 | |
@@ -183,30 +183,30 @@ discard block |
||
| 183 | 183 | $mform->setType('participants', PARAM_TEXT); |
| 184 | 184 | |
| 185 | 185 | $html_participant_selection = ''. |
| 186 | - '<div id="fitem_bigbluebuttonbn_participant_selection" class="fitem fitem_fselect">'."\n". |
|
| 187 | - ' <div class="fitemtitle">'."\n". |
|
| 188 | - ' <label for="bigbluebuttonbn_participant_selectiontype">'.get_string('mod_form_field_participant_add', 'bigbluebuttonbn').' </label>'."\n". |
|
| 189 | - ' </div>'."\n". |
|
| 190 | - ' <div class="felement fselect">'."\n". |
|
| 191 | - ' <select id="bigbluebuttonbn_participant_selection_type" onchange="bigbluebuttonbn_participant_selection_set(); return 0;">'."\n". |
|
| 192 | - ' <option value="all" selected="selected">'.get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn').'</option>'."\n". |
|
| 193 | - ' <option value="role">'.get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn').'</option>'."\n". |
|
| 194 | - ' <option value="user">'.get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn').'</option>'."\n". |
|
| 195 | - ' </select>'."\n". |
|
| 196 | - ' '."\n". |
|
| 197 | - ' <select id="bigbluebuttonbn_participant_selection" disabled="disabled">'."\n". |
|
| 198 | - ' <option value="all" selected="selected">---------------</option>'."\n". |
|
| 199 | - ' </select>'."\n". |
|
| 200 | - ' '."\n". |
|
| 201 | - ' <input value="'.get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn').'" type="button" id="id_addselectionid" onclick="bigbluebuttonbn_participant_add(); return 0;" />'."\n". |
|
| 202 | - ' </div>'."\n". |
|
| 203 | - '</div>'."\n". |
|
| 204 | - '<div id="fitem_bigbluebuttonbn_participant_list" class="fitem">'."\n". |
|
| 205 | - ' <div class="fitemtitle">'."\n". |
|
| 206 | - ' <label for="bigbluebuttonbn_participant_list">'.get_string('mod_form_field_participant_list', 'bigbluebuttonbn').' </label>'."\n". |
|
| 207 | - ' </div>'."\n". |
|
| 208 | - ' <div class="felement fselect">'."\n". |
|
| 209 | - ' <table id="participant_list_table">'."\n"; |
|
| 186 | + '<div id="fitem_bigbluebuttonbn_participant_selection" class="fitem fitem_fselect">'."\n". |
|
| 187 | + ' <div class="fitemtitle">'."\n". |
|
| 188 | + ' <label for="bigbluebuttonbn_participant_selectiontype">'.get_string('mod_form_field_participant_add', 'bigbluebuttonbn').' </label>'."\n". |
|
| 189 | + ' </div>'."\n". |
|
| 190 | + ' <div class="felement fselect">'."\n". |
|
| 191 | + ' <select id="bigbluebuttonbn_participant_selection_type" onchange="bigbluebuttonbn_participant_selection_set(); return 0;">'."\n". |
|
| 192 | + ' <option value="all" selected="selected">'.get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn').'</option>'."\n". |
|
| 193 | + ' <option value="role">'.get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn').'</option>'."\n". |
|
| 194 | + ' <option value="user">'.get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn').'</option>'."\n". |
|
| 195 | + ' </select>'."\n". |
|
| 196 | + ' '."\n". |
|
| 197 | + ' <select id="bigbluebuttonbn_participant_selection" disabled="disabled">'."\n". |
|
| 198 | + ' <option value="all" selected="selected">---------------</option>'."\n". |
|
| 199 | + ' </select>'."\n". |
|
| 200 | + ' '."\n". |
|
| 201 | + ' <input value="'.get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn').'" type="button" id="id_addselectionid" onclick="bigbluebuttonbn_participant_add(); return 0;" />'."\n". |
|
| 202 | + ' </div>'."\n". |
|
| 203 | + '</div>'."\n". |
|
| 204 | + '<div id="fitem_bigbluebuttonbn_participant_list" class="fitem">'."\n". |
|
| 205 | + ' <div class="fitemtitle">'."\n". |
|
| 206 | + ' <label for="bigbluebuttonbn_participant_list">'.get_string('mod_form_field_participant_list', 'bigbluebuttonbn').' </label>'."\n". |
|
| 207 | + ' </div>'."\n". |
|
| 208 | + ' <div class="felement fselect">'."\n". |
|
| 209 | + ' <table id="participant_list_table">'."\n"; |
|
| 210 | 210 | |
| 211 | 211 | // Add participant list |
| 212 | 212 | foreach($participant_list as $participant){ |
@@ -243,11 +243,11 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | $html_participant_selection .= ''. |
| 246 | - ' </table>'."\n". |
|
| 247 | - ' </div>'."\n". |
|
| 248 | - '</div>'."\n". |
|
| 249 | - '<script type="text/javascript" src="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/mod_form.js">'."\n". |
|
| 250 | - '</script>'."\n"; |
|
| 246 | + ' </table>'."\n". |
|
| 247 | + ' </div>'."\n". |
|
| 248 | + '</div>'."\n". |
|
| 249 | + '<script type="text/javascript" src="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/mod_form.js">'."\n". |
|
| 250 | + '</script>'."\n"; |
|
| 251 | 251 | |
| 252 | 252 | $mform->addElement('html', $html_participant_selection); |
| 253 | 253 | |
@@ -255,9 +255,9 @@ discard block |
||
| 255 | 255 | $mform->addElement('html', '<script type="text/javascript">var bigbluebuttonbn_participant_selection = {"all": [], "role": '.json_encode($roles).', "user": '.bigbluebuttonbn_get_users_json($users).'}; </script>'); |
| 256 | 256 | $mform->addElement('html', '<script type="text/javascript">var bigbluebuttonbn_participant_list = '.json_encode($participant_list).'; </script>'); |
| 257 | 257 | $bigbluebuttonbn_strings = Array( "as" => get_string('mod_form_field_participant_list_text_as', 'bigbluebuttonbn'), |
| 258 | - "viewer" => get_string('mod_form_field_participant_bbb_role_viewer', 'bigbluebuttonbn'), |
|
| 259 | - "moderator" => get_string('mod_form_field_participant_bbb_role_moderator', 'bigbluebuttonbn'), |
|
| 260 | - "remove" => get_string('mod_form_field_participant_list_action_remove', 'bigbluebuttonbn'), |
|
| 258 | + "viewer" => get_string('mod_form_field_participant_bbb_role_viewer', 'bigbluebuttonbn'), |
|
| 259 | + "moderator" => get_string('mod_form_field_participant_bbb_role_moderator', 'bigbluebuttonbn'), |
|
| 260 | + "remove" => get_string('mod_form_field_participant_list_action_remove', 'bigbluebuttonbn'), |
|
| 261 | 261 | ); |
| 262 | 262 | $mform->addElement('html', '<script type="text/javascript">var bigbluebuttonbn_strings = '.json_encode($bigbluebuttonbn_strings).'; </script>'); |
| 263 | 263 | //------------------------------------------------------------------------------- |
@@ -11,8 +11,8 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | defined('MOODLE_INTERNAL') || die(); |
| 13 | 13 | |
| 14 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 15 | -require_once($CFG->dirroot.'/course/moodleform_mod.php'); |
|
| 14 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 15 | +require_once($CFG->dirroot . '/course/moodleform_mod.php'); |
|
| 16 | 16 | |
| 17 | 17 | class mod_bigbluebuttonbn_mod_form extends moodleform_mod { |
| 18 | 18 | |
@@ -51,24 +51,24 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | //Validates if the BigBlueButton server is running |
| 53 | 53 | $serverVersion = bigbluebuttonbn_getServerVersion($endpoint); |
| 54 | - if ( !isset($serverVersion) ) { |
|
| 55 | - print_error( 'general_error_unable_connect', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' ); |
|
| 54 | + if (!isset($serverVersion)) { |
|
| 55 | + print_error('general_error_unable_connect', 'bigbluebuttonbn', $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $mform =& $this->_form; |
|
| 59 | - $current_activity =& $this->current; |
|
| 58 | + $mform = & $this->_form; |
|
| 59 | + $current_activity = & $this->current; |
|
| 60 | 60 | |
| 61 | 61 | //------------------------------------------------------------------------------- |
| 62 | 62 | // First block starts here |
| 63 | 63 | //------------------------------------------------------------------------------- |
| 64 | 64 | $mform->addElement('header', 'general', get_string('mod_form_block_general', 'bigbluebuttonbn')); |
| 65 | 65 | |
| 66 | - $mform->addElement('text', 'name', get_string('mod_form_field_name','bigbluebuttonbn'), 'maxlength="64" size="32"'); |
|
| 66 | + $mform->addElement('text', 'name', get_string('mod_form_field_name', 'bigbluebuttonbn'), 'maxlength="64" size="32"'); |
|
| 67 | 67 | $mform->setType('name', PARAM_TEXT); |
| 68 | 68 | $mform->addRule('name', null, 'required', null, 'client'); |
| 69 | 69 | |
| 70 | 70 | $version_major = bigbluebuttonbn_get_moodle_version_major(); |
| 71 | - if ( $version_major < '2015051100' ) { |
|
| 71 | + if ($version_major < '2015051100') { |
|
| 72 | 72 | //This is valid before v2.9 |
| 73 | 73 | $this->add_intro_editor(false, get_string('mod_form_field_intro', 'bigbluebuttonbn')); |
| 74 | 74 | } else { |
@@ -78,62 +78,62 @@ discard block |
||
| 78 | 78 | $mform->setAdvanced('introeditor'); |
| 79 | 79 | $mform->setAdvanced('showdescription'); |
| 80 | 80 | |
| 81 | - $mform->addElement('textarea', 'welcome', get_string('mod_form_field_welcome','bigbluebuttonbn'), 'wrap="virtual" rows="5" cols="60"'); |
|
| 81 | + $mform->addElement('textarea', 'welcome', get_string('mod_form_field_welcome', 'bigbluebuttonbn'), 'wrap="virtual" rows="5" cols="60"'); |
|
| 82 | 82 | $mform->addHelpButton('welcome', 'mod_form_field_welcome', 'bigbluebuttonbn'); |
| 83 | 83 | $mform->setType('welcome', PARAM_TEXT); |
| 84 | 84 | $mform->setAdvanced('welcome'); |
| 85 | 85 | |
| 86 | - if ( $voicebridge_editable ) { |
|
| 87 | - $mform->addElement('text', 'voicebridge', get_string('mod_form_field_voicebridge','bigbluebuttonbn'), array('maxlength'=>4, 'size'=>6)); |
|
| 86 | + if ($voicebridge_editable) { |
|
| 87 | + $mform->addElement('text', 'voicebridge', get_string('mod_form_field_voicebridge', 'bigbluebuttonbn'), array('maxlength'=>4, 'size'=>6)); |
|
| 88 | 88 | $mform->setType('voicebridge', PARAM_INT); |
| 89 | 89 | $mform->addRule('voicebridge', get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), 'numeric', '####', 'server'); |
| 90 | - $mform->setDefault( 'voicebridge', 0 ); |
|
| 90 | + $mform->setDefault('voicebridge', 0); |
|
| 91 | 91 | $mform->addHelpButton('voicebridge', 'mod_form_field_voicebridge', 'bigbluebuttonbn'); |
| 92 | 92 | $mform->setAdvanced('voicebridge'); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - if ( $waitformoderator_editable ) { |
|
| 95 | + if ($waitformoderator_editable) { |
|
| 96 | 96 | $mform->addElement('checkbox', 'wait', get_string('mod_form_field_wait', 'bigbluebuttonbn')); |
| 97 | 97 | $mform->addHelpButton('wait', 'mod_form_field_wait', 'bigbluebuttonbn'); |
| 98 | 98 | $mform->setType('wait', PARAM_INT); |
| 99 | - $mform->setDefault( 'wait', $waitformoderator_default ); |
|
| 99 | + $mform->setDefault('wait', $waitformoderator_default); |
|
| 100 | 100 | $mform->setAdvanced('wait'); |
| 101 | 101 | } else { |
| 102 | - $mform->addElement('hidden', 'wait', $waitformoderator_default ); |
|
| 102 | + $mform->addElement('hidden', 'wait', $waitformoderator_default); |
|
| 103 | 103 | $mform->setType('wait', PARAM_INT); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - if ( $userlimit_editable ) { |
|
| 107 | - $mform->addElement('text', 'userlimit', get_string('mod_form_field_userlimit','bigbluebuttonbn'), 'maxlength="3" size="5"' ); |
|
| 106 | + if ($userlimit_editable) { |
|
| 107 | + $mform->addElement('text', 'userlimit', get_string('mod_form_field_userlimit', 'bigbluebuttonbn'), 'maxlength="3" size="5"'); |
|
| 108 | 108 | $mform->addHelpButton('userlimit', 'mod_form_field_userlimit', 'bigbluebuttonbn'); |
| 109 | - $mform->setDefault( 'userlimit', $userlimit_default ); |
|
| 109 | + $mform->setDefault('userlimit', $userlimit_default); |
|
| 110 | 110 | $mform->setType('userlimit', PARAM_TEXT); |
| 111 | 111 | } else { |
| 112 | - $mform->addElement('hidden', 'userlimit', $userlimit_default ); |
|
| 112 | + $mform->addElement('hidden', 'userlimit', $userlimit_default); |
|
| 113 | 113 | $mform->setType('userlimit', PARAM_INT); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - if ( floatval($serverVersion) >= 0.8 ) { |
|
| 117 | - if ( $recording_editable ) { |
|
| 116 | + if (floatval($serverVersion) >= 0.8) { |
|
| 117 | + if ($recording_editable) { |
|
| 118 | 118 | $mform->addElement('checkbox', 'record', get_string('mod_form_field_record', 'bigbluebuttonbn')); |
| 119 | - $mform->setDefault( 'record', $recording_default ); |
|
| 119 | + $mform->setDefault('record', $recording_default); |
|
| 120 | 120 | $mform->setAdvanced('record'); |
| 121 | 121 | } else { |
| 122 | 122 | $mform->addElement('hidden', 'record', $recording_default); |
| 123 | 123 | } |
| 124 | 124 | $mform->setType('record', PARAM_INT); |
| 125 | 125 | |
| 126 | - if ( $recording_tagging_editable ) { |
|
| 126 | + if ($recording_tagging_editable) { |
|
| 127 | 127 | $mform->addElement('checkbox', 'tagging', get_string('mod_form_field_recordingtagging', 'bigbluebuttonbn')); |
| 128 | 128 | $mform->setDefault('tagging', $recording_tagging_default); |
| 129 | 129 | $mform->setAdvanced('tagging'); |
| 130 | 130 | } else { |
| 131 | - $mform->addElement('hidden', 'tagging', $recording_tagging_default ); |
|
| 131 | + $mform->addElement('hidden', 'tagging', $recording_tagging_default); |
|
| 132 | 132 | } |
| 133 | 133 | $mform->setType('tagging', PARAM_INT); |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - if ( $sendnotifications_enabled ) { |
|
| 136 | + if ($sendnotifications_enabled) { |
|
| 137 | 137 | $mform->addElement('checkbox', 'notification', get_string('mod_form_field_notification', 'bigbluebuttonbn')); |
| 138 | 138 | if ($this->current->instance) { |
| 139 | 139 | $mform->addHelpButton('notification', 'mod_form_field_notification', 'bigbluebuttonbn'); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | //------------------------------------------------------------------------------- |
| 151 | 151 | // Second block starts here |
| 152 | 152 | //------------------------------------------------------------------------------- |
| 153 | - if ( $preuploadpresentation_enabled ) { |
|
| 153 | + if ($preuploadpresentation_enabled) { |
|
| 154 | 154 | $mform->addElement('header', 'preupload', get_string('mod_form_block_presentation', 'bigbluebuttonbn')); |
| 155 | 155 | $mform->setExpanded('preupload'); |
| 156 | 156 | |
@@ -182,84 +182,84 @@ discard block |
||
| 182 | 182 | $mform->addElement('hidden', 'participants', json_encode($participant_list)); |
| 183 | 183 | $mform->setType('participants', PARAM_TEXT); |
| 184 | 184 | |
| 185 | - $html_participant_selection = ''. |
|
| 186 | - '<div id="fitem_bigbluebuttonbn_participant_selection" class="fitem fitem_fselect">'."\n". |
|
| 187 | - ' <div class="fitemtitle">'."\n". |
|
| 188 | - ' <label for="bigbluebuttonbn_participant_selectiontype">'.get_string('mod_form_field_participant_add', 'bigbluebuttonbn').' </label>'."\n". |
|
| 189 | - ' </div>'."\n". |
|
| 190 | - ' <div class="felement fselect">'."\n". |
|
| 191 | - ' <select id="bigbluebuttonbn_participant_selection_type" onchange="bigbluebuttonbn_participant_selection_set(); return 0;">'."\n". |
|
| 192 | - ' <option value="all" selected="selected">'.get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn').'</option>'."\n". |
|
| 193 | - ' <option value="role">'.get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn').'</option>'."\n". |
|
| 194 | - ' <option value="user">'.get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn').'</option>'."\n". |
|
| 195 | - ' </select>'."\n". |
|
| 196 | - ' '."\n". |
|
| 197 | - ' <select id="bigbluebuttonbn_participant_selection" disabled="disabled">'."\n". |
|
| 198 | - ' <option value="all" selected="selected">---------------</option>'."\n". |
|
| 199 | - ' </select>'."\n". |
|
| 200 | - ' '."\n". |
|
| 201 | - ' <input value="'.get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn').'" type="button" id="id_addselectionid" onclick="bigbluebuttonbn_participant_add(); return 0;" />'."\n". |
|
| 202 | - ' </div>'."\n". |
|
| 203 | - '</div>'."\n". |
|
| 204 | - '<div id="fitem_bigbluebuttonbn_participant_list" class="fitem">'."\n". |
|
| 205 | - ' <div class="fitemtitle">'."\n". |
|
| 206 | - ' <label for="bigbluebuttonbn_participant_list">'.get_string('mod_form_field_participant_list', 'bigbluebuttonbn').' </label>'."\n". |
|
| 207 | - ' </div>'."\n". |
|
| 208 | - ' <div class="felement fselect">'."\n". |
|
| 209 | - ' <table id="participant_list_table">'."\n"; |
|
| 185 | + $html_participant_selection = '' . |
|
| 186 | + '<div id="fitem_bigbluebuttonbn_participant_selection" class="fitem fitem_fselect">' . "\n" . |
|
| 187 | + ' <div class="fitemtitle">' . "\n" . |
|
| 188 | + ' <label for="bigbluebuttonbn_participant_selectiontype">' . get_string('mod_form_field_participant_add', 'bigbluebuttonbn') . ' </label>' . "\n" . |
|
| 189 | + ' </div>' . "\n" . |
|
| 190 | + ' <div class="felement fselect">' . "\n" . |
|
| 191 | + ' <select id="bigbluebuttonbn_participant_selection_type" onchange="bigbluebuttonbn_participant_selection_set(); return 0;">' . "\n" . |
|
| 192 | + ' <option value="all" selected="selected">' . get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn') . '</option>' . "\n" . |
|
| 193 | + ' <option value="role">' . get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn') . '</option>' . "\n" . |
|
| 194 | + ' <option value="user">' . get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn') . '</option>' . "\n" . |
|
| 195 | + ' </select>' . "\n" . |
|
| 196 | + ' ' . "\n" . |
|
| 197 | + ' <select id="bigbluebuttonbn_participant_selection" disabled="disabled">' . "\n" . |
|
| 198 | + ' <option value="all" selected="selected">---------------</option>' . "\n" . |
|
| 199 | + ' </select>' . "\n" . |
|
| 200 | + ' ' . "\n" . |
|
| 201 | + ' <input value="' . get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn') . '" type="button" id="id_addselectionid" onclick="bigbluebuttonbn_participant_add(); return 0;" />' . "\n" . |
|
| 202 | + ' </div>' . "\n" . |
|
| 203 | + '</div>' . "\n" . |
|
| 204 | + '<div id="fitem_bigbluebuttonbn_participant_list" class="fitem">' . "\n" . |
|
| 205 | + ' <div class="fitemtitle">' . "\n" . |
|
| 206 | + ' <label for="bigbluebuttonbn_participant_list">' . get_string('mod_form_field_participant_list', 'bigbluebuttonbn') . ' </label>' . "\n" . |
|
| 207 | + ' </div>' . "\n" . |
|
| 208 | + ' <div class="felement fselect">' . "\n" . |
|
| 209 | + ' <table id="participant_list_table">' . "\n"; |
|
| 210 | 210 | |
| 211 | 211 | // Add participant list |
| 212 | - foreach($participant_list as $participant){ |
|
| 212 | + foreach ($participant_list as $participant) { |
|
| 213 | 213 | $participant_selectionid = ''; |
| 214 | 214 | $participant_selectiontype = $participant['selectiontype']; |
| 215 | - if( $participant_selectiontype == 'all') { |
|
| 216 | - $participant_selectiontype = '<b><i>'.get_string('mod_form_field_participant_list_type_'.$participant_selectiontype, 'bigbluebuttonbn').'</i></b>'; |
|
| 215 | + if ($participant_selectiontype == 'all') { |
|
| 216 | + $participant_selectiontype = '<b><i>' . get_string('mod_form_field_participant_list_type_' . $participant_selectiontype, 'bigbluebuttonbn') . '</i></b>'; |
|
| 217 | 217 | } else { |
| 218 | - if ( $participant_selectiontype == 'role') { |
|
| 218 | + if ($participant_selectiontype == 'role') { |
|
| 219 | 219 | $participant_selectionid = bigbluebuttonbn_get_role_name($participant['selectionid']); |
| 220 | 220 | } else { |
| 221 | - foreach($users as $user){ |
|
| 222 | - if( $user->id == $participant['selectionid']) { |
|
| 223 | - $participant_selectionid = $user->firstname.' '.$user->lastname; |
|
| 221 | + foreach ($users as $user) { |
|
| 222 | + if ($user->id == $participant['selectionid']) { |
|
| 223 | + $participant_selectionid = $user->firstname . ' ' . $user->lastname; |
|
| 224 | 224 | break; |
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | - $participant_selectiontype = '<b><i>'.get_string('mod_form_field_participant_list_type_'.$participant_selectiontype, 'bigbluebuttonbn').':</i></b> '; |
|
| 228 | + $participant_selectiontype = '<b><i>' . get_string('mod_form_field_participant_list_type_' . $participant_selectiontype, 'bigbluebuttonbn') . ':</i></b> '; |
|
| 229 | 229 | } |
| 230 | - $participant_role = get_string('mod_form_field_participant_bbb_role_'.$participant['role'], 'bigbluebuttonbn'); |
|
| 231 | - |
|
| 232 | - $html_participant_selection .= ''. |
|
| 233 | - ' <tr id="participant_list_tr_'.$participant['selectiontype'].'-'.$participant['selectionid'].'">'."\n". |
|
| 234 | - ' <td width="20px"><a onclick="bigbluebuttonbn_participant_remove(\''.$participant['selectiontype'].'\', \''.$participant['selectionid'].'\'); return 0;" title="'.get_string('mod_form_field_participant_list_action_remove', 'bigbluebuttonbn').'">x</a></td>'."\n". |
|
| 235 | - ' <td width="125px">'.$participant_selectiontype.'</td>'."\n". |
|
| 236 | - ' <td>'.$participant_selectionid.'</td>'."\n". |
|
| 237 | - ' <td><i> '.get_string('mod_form_field_participant_list_text_as', 'bigbluebuttonbn').' </i>'."\n". |
|
| 238 | - ' <select id="participant_list_role_'.$participant['selectiontype'].'-'.$participant['selectionid'].'" onchange="bigbluebuttonbn_participant_list_role_update(\''.$participant['selectiontype'].'\', \''.$participant['selectionid'].'\'); return 0;">'."\n". |
|
| 239 | - ' <option value="'.BIGBLUEBUTTONBN_ROLE_VIEWER.'" '.($participant['role'] == BIGBLUEBUTTONBN_ROLE_VIEWER? 'selected="selected" ': '').'>'.get_string('mod_form_field_participant_bbb_role_'.BIGBLUEBUTTONBN_ROLE_VIEWER, 'bigbluebuttonbn').'</option>'."\n". |
|
| 240 | - ' <option value="'.BIGBLUEBUTTONBN_ROLE_MODERATOR.'" '.($participant['role'] == BIGBLUEBUTTONBN_ROLE_MODERATOR? 'selected="selected" ': '').'>'.get_string('mod_form_field_participant_bbb_role_'.BIGBLUEBUTTONBN_ROLE_MODERATOR, 'bigbluebuttonbn').'</option><select>'."\n". |
|
| 241 | - ' </td>'."\n". |
|
| 242 | - ' </tr>'."\n"; |
|
| 230 | + $participant_role = get_string('mod_form_field_participant_bbb_role_' . $participant['role'], 'bigbluebuttonbn'); |
|
| 231 | + |
|
| 232 | + $html_participant_selection .= '' . |
|
| 233 | + ' <tr id="participant_list_tr_' . $participant['selectiontype'] . '-' . $participant['selectionid'] . '">' . "\n" . |
|
| 234 | + ' <td width="20px"><a onclick="bigbluebuttonbn_participant_remove(\'' . $participant['selectiontype'] . '\', \'' . $participant['selectionid'] . '\'); return 0;" title="' . get_string('mod_form_field_participant_list_action_remove', 'bigbluebuttonbn') . '">x</a></td>' . "\n" . |
|
| 235 | + ' <td width="125px">' . $participant_selectiontype . '</td>' . "\n" . |
|
| 236 | + ' <td>' . $participant_selectionid . '</td>' . "\n" . |
|
| 237 | + ' <td><i> ' . get_string('mod_form_field_participant_list_text_as', 'bigbluebuttonbn') . ' </i>' . "\n" . |
|
| 238 | + ' <select id="participant_list_role_' . $participant['selectiontype'] . '-' . $participant['selectionid'] . '" onchange="bigbluebuttonbn_participant_list_role_update(\'' . $participant['selectiontype'] . '\', \'' . $participant['selectionid'] . '\'); return 0;">' . "\n" . |
|
| 239 | + ' <option value="' . BIGBLUEBUTTONBN_ROLE_VIEWER . '" ' . ($participant['role'] == BIGBLUEBUTTONBN_ROLE_VIEWER ? 'selected="selected" ' : '') . '>' . get_string('mod_form_field_participant_bbb_role_' . BIGBLUEBUTTONBN_ROLE_VIEWER, 'bigbluebuttonbn') . '</option>' . "\n" . |
|
| 240 | + ' <option value="' . BIGBLUEBUTTONBN_ROLE_MODERATOR . '" ' . ($participant['role'] == BIGBLUEBUTTONBN_ROLE_MODERATOR ? 'selected="selected" ' : '') . '>' . get_string('mod_form_field_participant_bbb_role_' . BIGBLUEBUTTONBN_ROLE_MODERATOR, 'bigbluebuttonbn') . '</option><select>' . "\n" . |
|
| 241 | + ' </td>' . "\n" . |
|
| 242 | + ' </tr>' . "\n"; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | - $html_participant_selection .= ''. |
|
| 246 | - ' </table>'."\n". |
|
| 247 | - ' </div>'."\n". |
|
| 248 | - '</div>'."\n". |
|
| 249 | - '<script type="text/javascript" src="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/mod_form.js">'."\n". |
|
| 250 | - '</script>'."\n"; |
|
| 245 | + $html_participant_selection .= '' . |
|
| 246 | + ' </table>' . "\n" . |
|
| 247 | + ' </div>' . "\n" . |
|
| 248 | + '</div>' . "\n" . |
|
| 249 | + '<script type="text/javascript" src="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/mod_form.js">' . "\n" . |
|
| 250 | + '</script>' . "\n"; |
|
| 251 | 251 | |
| 252 | 252 | $mform->addElement('html', $html_participant_selection); |
| 253 | 253 | |
| 254 | 254 | // Add data |
| 255 | - $mform->addElement('html', '<script type="text/javascript">var bigbluebuttonbn_participant_selection = {"all": [], "role": '.json_encode($roles).', "user": '.bigbluebuttonbn_get_users_json($users).'}; </script>'); |
|
| 256 | - $mform->addElement('html', '<script type="text/javascript">var bigbluebuttonbn_participant_list = '.json_encode($participant_list).'; </script>'); |
|
| 257 | - $bigbluebuttonbn_strings = Array( "as" => get_string('mod_form_field_participant_list_text_as', 'bigbluebuttonbn'), |
|
| 255 | + $mform->addElement('html', '<script type="text/javascript">var bigbluebuttonbn_participant_selection = {"all": [], "role": ' . json_encode($roles) . ', "user": ' . bigbluebuttonbn_get_users_json($users) . '}; </script>'); |
|
| 256 | + $mform->addElement('html', '<script type="text/javascript">var bigbluebuttonbn_participant_list = ' . json_encode($participant_list) . '; </script>'); |
|
| 257 | + $bigbluebuttonbn_strings = Array("as" => get_string('mod_form_field_participant_list_text_as', 'bigbluebuttonbn'), |
|
| 258 | 258 | "viewer" => get_string('mod_form_field_participant_bbb_role_viewer', 'bigbluebuttonbn'), |
| 259 | 259 | "moderator" => get_string('mod_form_field_participant_bbb_role_moderator', 'bigbluebuttonbn'), |
| 260 | 260 | "remove" => get_string('mod_form_field_participant_list_action_remove', 'bigbluebuttonbn'), |
| 261 | 261 | ); |
| 262 | - $mform->addElement('html', '<script type="text/javascript">var bigbluebuttonbn_strings = '.json_encode($bigbluebuttonbn_strings).'; </script>'); |
|
| 262 | + $mform->addElement('html', '<script type="text/javascript">var bigbluebuttonbn_strings = ' . json_encode($bigbluebuttonbn_strings) . '; </script>'); |
|
| 263 | 263 | //------------------------------------------------------------------------------- |
| 264 | 264 | // Third block ends here |
| 265 | 265 | //------------------------------------------------------------------------------- |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | // Fourth block starts here |
| 270 | 270 | //------------------------------------------------------------------------------- |
| 271 | 271 | $mform->addElement('header', 'schedule', get_string('mod_form_block_schedule', 'bigbluebuttonbn')); |
| 272 | - if( isset($current_activity->openingtime) && $current_activity->openingtime != 0 || isset($current_activity->closingtime) && $current_activity->closingtime != 0 ) |
|
| 272 | + if (isset($current_activity->openingtime) && $current_activity->openingtime != 0 || isset($current_activity->closingtime) && $current_activity->closingtime != 0) |
|
| 273 | 273 | $mform->setExpanded('schedule'); |
| 274 | 274 | |
| 275 | 275 | $mform->addElement('date_time_selector', 'openingtime', get_string('mod_form_field_openingtime', 'bigbluebuttonbn'), array('optional' => true)); |
@@ -303,14 +303,14 @@ discard block |
||
| 303 | 303 | |
| 304 | 304 | $errors = parent::validation($data, $files); |
| 305 | 305 | |
| 306 | - if ( isset($data['openingtime']) && isset($data['closingtime']) ) { |
|
| 307 | - if ( $data['openingtime'] != 0 && $data['closingtime'] != 0 && $data['closingtime'] < $data['openingtime']) { |
|
| 306 | + if (isset($data['openingtime']) && isset($data['closingtime'])) { |
|
| 307 | + if ($data['openingtime'] != 0 && $data['closingtime'] != 0 && $data['closingtime'] < $data['openingtime']) { |
|
| 308 | 308 | $errors['closingtime'] = get_string('bbbduetimeoverstartingtime', 'bigbluebuttonbn'); |
| 309 | 309 | } |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | - if ( isset($data['voicebridge']) ) { |
|
| 313 | - if ( !bigbluebuttonbn_voicebridge_unique($data['voicebridge'], $data['instance'])) { |
|
| 312 | + if (isset($data['voicebridge'])) { |
|
| 313 | + if (!bigbluebuttonbn_voicebridge_unique($data['voicebridge'], $data['instance'])) { |
|
| 314 | 314 | $errors['voicebridge'] = get_string('mod_form_field_voicebridge_notunique_error', 'bigbluebuttonbn'); |
| 315 | 315 | } |
| 316 | 316 | } |
@@ -269,8 +269,9 @@ |
||
| 269 | 269 | // Fourth block starts here |
| 270 | 270 | //------------------------------------------------------------------------------- |
| 271 | 271 | $mform->addElement('header', 'schedule', get_string('mod_form_block_schedule', 'bigbluebuttonbn')); |
| 272 | - if( isset($current_activity->openingtime) && $current_activity->openingtime != 0 || isset($current_activity->closingtime) && $current_activity->closingtime != 0 ) |
|
| 273 | - $mform->setExpanded('schedule'); |
|
| 272 | + if( isset($current_activity->openingtime) && $current_activity->openingtime != 0 || isset($current_activity->closingtime) && $current_activity->closingtime != 0 ) { |
|
| 273 | + $mform->setExpanded('schedule'); |
|
| 274 | + } |
|
| 274 | 275 | |
| 275 | 276 | $mform->addElement('date_time_selector', 'openingtime', get_string('mod_form_field_openingtime', 'bigbluebuttonbn'), array('optional' => true)); |
| 276 | 277 | $mform->setDefault('openingtime', 0); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * @return string |
| 39 | 39 | */ |
| 40 | 40 | public function get_description() { |
| 41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
| 41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
| 42 | 42 | return "The user with id '$this->userid' has deleted a recording with id '$rid' for " . |
| 43 | 43 | "the course id '$this->contextinstanceid'."; |
| 44 | 44 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * @return string |
| 39 | 39 | */ |
| 40 | 40 | public function get_description() { |
| 41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
| 41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
| 42 | 42 | return "The user with id '$this->userid' has deleted a recording with id '$rid' for " . |
| 43 | 43 | "the course id '$this->contextinstanceid'."; |
| 44 | 44 | } |