@@ -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 | } |
@@ -8,12 +8,12 @@ discard block |
||
8 | 8 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
9 | 9 | */ |
10 | 10 | |
11 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
12 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
11 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
12 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
13 | 13 | |
14 | 14 | global $PAGE, $USER, $CFG, $SESSION, $DB; |
15 | 15 | |
16 | -$params['action'] = optional_param('action', '', PARAM_TEXT); |
|
16 | +$params['action'] = optional_param('action', '', PARAM_TEXT); |
|
17 | 17 | $params['callback'] = optional_param('callback', '', PARAM_TEXT); |
18 | 18 | $params['id'] = optional_param('id', '', PARAM_TEXT); |
19 | 19 | $params['idx'] = optional_param('idx', '', PARAM_TEXT); |
@@ -25,13 +25,13 @@ discard block |
||
25 | 25 | |
26 | 26 | $error = ''; |
27 | 27 | |
28 | -if( empty($params['action']) ) { |
|
28 | +if (empty($params['action'])) { |
|
29 | 29 | $error = bigbluebuttonbn_bbb_broker_add_error($error, "Parameter [action] was not included"); |
30 | 30 | |
31 | 31 | } else { |
32 | 32 | $error = bigbluebuttonbn_bbb_broker_validate_parameters($params); |
33 | 33 | |
34 | - if( empty($error) && $params['action'] != "recording_ready" ) { |
|
34 | + if (empty($error) && $params['action'] != "recording_ready") { |
|
35 | 35 | |
36 | 36 | if ($params['bigbluebuttonbn'] != 0) { |
37 | 37 | $bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $params['bigbluebuttonbn']), '*', MUST_EXIST); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $context = bigbluebuttonbn_get_context_module($cm->id); |
41 | 41 | } |
42 | 42 | |
43 | - if ( isset($SESSION->bigbluebuttonbn_bbbsession) && !is_null($SESSION->bigbluebuttonbn_bbbsession) ) { |
|
43 | + if (isset($SESSION->bigbluebuttonbn_bbbsession) && !is_null($SESSION->bigbluebuttonbn_bbbsession)) { |
|
44 | 44 | $bbbsession = $SESSION->bigbluebuttonbn_bbbsession; |
45 | 45 | } else { |
46 | 46 | $error = bigbluebuttonbn_bbb_broker_add_error($error, "No session variable set"); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | header('Content-Type: application/javascript; charset=utf-8'); |
52 | -if ( empty($error) ) { |
|
52 | +if (empty($error)) { |
|
53 | 53 | |
54 | 54 | if (!isloggedin() && $PAGE->course->id == SITEID) { |
55 | 55 | $userid = guest_user()->id; |
@@ -58,21 +58,21 @@ discard block |
||
58 | 58 | } |
59 | 59 | $hascourseaccess = ($PAGE->course->id == SITEID) || can_access_course($PAGE->course, $userid); |
60 | 60 | |
61 | - if( !$hascourseaccess ){ |
|
61 | + if (!$hascourseaccess) { |
|
62 | 62 | header("HTTP/1.0 401 Unauthorized"); |
63 | 63 | return; |
64 | 64 | } else { |
65 | 65 | try { |
66 | - switch ( strtolower($params['action']) ){ |
|
66 | + switch (strtolower($params['action'])) { |
|
67 | 67 | case 'meeting_info': |
68 | 68 | $meeting_info = bigbluebuttonbn_bbb_broker_get_meeting_info($params['id'], $bbbsession['modPW']); |
69 | 69 | $meeting_running = bigbluebuttonbn_bbb_broker_is_meeting_running($meeting_info); |
70 | 70 | |
71 | 71 | $status_can_end = ''; |
72 | 72 | $status_can_tag = ''; |
73 | - if( $meeting_running ) { |
|
73 | + if ($meeting_running) { |
|
74 | 74 | $join_button_text = get_string('view_conference_action_join', 'bigbluebuttonbn'); |
75 | - if( $bbbsession['userlimit'] == 0 || $meeting_info->participantCount < $bbbsession['userlimit'] ) { |
|
75 | + if ($bbbsession['userlimit'] == 0 || $meeting_info->participantCount < $bbbsession['userlimit']) { |
|
76 | 76 | $initial_message = get_string('view_message_conference_in_progress', 'bigbluebuttonbn'); |
77 | 77 | $can_join = true; |
78 | 78 | |
@@ -81,50 +81,50 @@ discard block |
||
81 | 81 | $can_join = false; |
82 | 82 | } |
83 | 83 | |
84 | - if( $bbbsession['administrator'] || $bbbsession['moderator'] ) { |
|
84 | + if ($bbbsession['administrator'] || $bbbsession['moderator']) { |
|
85 | 85 | $end_button_text = get_string('view_conference_action_end', 'bigbluebuttonbn'); |
86 | 86 | $can_end = true; |
87 | - $status_can_end = '"can_end": true, "end_button_text": "'.$end_button_text.'", '; |
|
87 | + $status_can_end = '"can_end": true, "end_button_text": "' . $end_button_text . '", '; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | } else { |
91 | 91 | // If user is administrator, moderator or if is viewer and no waiting is required |
92 | - if ( $bbbsession['administrator'] || $bbbsession['moderator'] || !$bbbsession['wait'] ) { |
|
92 | + if ($bbbsession['administrator'] || $bbbsession['moderator'] || !$bbbsession['wait']) { |
|
93 | 93 | $initial_message = get_string('view_message_conference_room_ready', 'bigbluebuttonbn'); |
94 | 94 | $join_button_text = get_string('view_conference_action_join', 'bigbluebuttonbn'); |
95 | 95 | $can_join = true; |
96 | 96 | |
97 | 97 | } else { |
98 | 98 | $initial_message = get_string('view_message_conference_not_started', 'bigbluebuttonbn'); |
99 | - if ( $bbbsession['wait'] ) { |
|
100 | - $initial_message .= ' '.get_string('view_message_conference_wait_for_moderator', 'bigbluebuttonbn'); |
|
99 | + if ($bbbsession['wait']) { |
|
100 | + $initial_message .= ' ' . get_string('view_message_conference_wait_for_moderator', 'bigbluebuttonbn'); |
|
101 | 101 | } |
102 | 102 | $join_button_text = get_string('view_conference_action_lineup', 'bigbluebuttonbn'); |
103 | 103 | $can_join = false; |
104 | 104 | } |
105 | 105 | |
106 | - if( $bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator']) ) { |
|
106 | + if ($bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator'])) { |
|
107 | 107 | $can_tag = true; |
108 | 108 | |
109 | 109 | } else { |
110 | 110 | $can_tag = false; |
111 | 111 | } |
112 | - $status_can_end = '"can_tag": '.($can_tag? 'true': 'false').', '; |
|
112 | + $status_can_end = '"can_tag": ' . ($can_tag ? 'true' : 'false') . ', '; |
|
113 | 113 | } |
114 | 114 | |
115 | - echo $params['callback'].'({ "running": '.($meeting_running? 'true':'false').', "info": '.json_encode($meeting_info).', "status": {"can_join": '.($can_join? 'true':'false').',"join_url": "'.$bbbsession['joinURL'].'","join_button_text": "'.$join_button_text.'", '.$status_can_end.$status_can_tag.'"message": "'.$initial_message.'"} });'; |
|
115 | + echo $params['callback'] . '({ "running": ' . ($meeting_running ? 'true' : 'false') . ', "info": ' . json_encode($meeting_info) . ', "status": {"can_join": ' . ($can_join ? 'true' : 'false') . ',"join_url": "' . $bbbsession['joinURL'] . '","join_button_text": "' . $join_button_text . '", ' . $status_can_end . $status_can_tag . '"message": "' . $initial_message . '"} });'; |
|
116 | 116 | break; |
117 | 117 | case 'meeting_end': |
118 | - if( $bbbsession['administrator'] || $bbbsession['moderator'] ) { |
|
118 | + if ($bbbsession['administrator'] || $bbbsession['moderator']) { |
|
119 | 119 | //Execute the end command |
120 | 120 | $meeting_info = bigbluebuttonbn_bbb_broker_do_end_meeting($params['id'], $bbbsession['modPW']); |
121 | 121 | // Moodle event logger: Create an event for meeting ended |
122 | - if( isset($bigbluebuttonbn) ) |
|
122 | + if (isset($bigbluebuttonbn)) |
|
123 | 123 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $context, $cm); |
124 | 124 | /// Update the cache |
125 | 125 | $meeting_info = bigbluebuttonbn_bbb_broker_get_meeting_info($params['id'], $bbbsession['modPW'], true); |
126 | 126 | |
127 | - echo $params['callback'].'({ "status": true });'; |
|
127 | + echo $params['callback'] . '({ "status": true });'; |
|
128 | 128 | } else { |
129 | 129 | error_log("ERROR: User not authorized to execute end command"); |
130 | 130 | header("HTTP/1.0 401 Unauthorized. User not authorized to execute end command"); |
@@ -134,41 +134,41 @@ discard block |
||
134 | 134 | break; |
135 | 135 | case 'recording_info': |
136 | 136 | $recording = bigbluebuttonbn_getRecordingArray($params['id'], $params['idx'], $endpoint, $shared_secret); |
137 | - if ( isset($recording) && !empty($recording) && !array_key_exists('messageKey', $recording)) { // The recording was found |
|
138 | - echo $params['callback'].'({ "status": "true", "published": "'.$recording['published'].'"});'; |
|
137 | + if (isset($recording) && !empty($recording) && !array_key_exists('messageKey', $recording)) { // The recording was found |
|
138 | + echo $params['callback'] . '({ "status": "true", "published": "' . $recording['published'] . '"});'; |
|
139 | 139 | } else { |
140 | - echo $params['callback'].'({ "status": "false" });'; |
|
140 | + echo $params['callback'] . '({ "status": "false" });'; |
|
141 | 141 | } |
142 | 142 | break; |
143 | 143 | case 'recording_publish': |
144 | - if( $bbbsession['managerecordings'] ) { |
|
144 | + if ($bbbsession['managerecordings']) { |
|
145 | 145 | $meeting_info = bigbluebuttonbn_bbb_broker_do_publish_recording($params['id'], true); |
146 | 146 | // Moodle event logger: Create an event for recording published |
147 | - if( isset($bigbluebuttonbn) ) { |
|
147 | + if (isset($bigbluebuttonbn)) { |
|
148 | 148 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, $bigbluebuttonbn, $context, $cm); |
149 | 149 | } |
150 | 150 | } |
151 | - echo $params['callback'].'({ "status": "true" });'; |
|
151 | + echo $params['callback'] . '({ "status": "true" });'; |
|
152 | 152 | break; |
153 | 153 | case 'recording_unpublish': |
154 | - if( $bbbsession['managerecordings'] ) { |
|
154 | + if ($bbbsession['managerecordings']) { |
|
155 | 155 | $meeting_info = bigbluebuttonbn_bbb_broker_do_publish_recording($params['id'], false); |
156 | 156 | // Moodle event logger: Create an event for recording unpublished |
157 | - if( isset($bigbluebuttonbn) ) { |
|
157 | + if (isset($bigbluebuttonbn)) { |
|
158 | 158 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, $bigbluebuttonbn, $context, $cm); |
159 | 159 | } |
160 | 160 | } |
161 | - echo $params['callback'].'({ "status": "true" });'; |
|
161 | + echo $params['callback'] . '({ "status": "true" });'; |
|
162 | 162 | break; |
163 | 163 | case 'recording_delete': |
164 | - if( $bbbsession['managerecordings'] ) { |
|
164 | + if ($bbbsession['managerecordings']) { |
|
165 | 165 | $meeting_info = bigbluebuttonbn_bbb_broker_do_delete_recording($params['id']); |
166 | 166 | // Moodle event logger: Create an event for recording deleted |
167 | - if( isset($bigbluebuttonbn) ) { |
|
167 | + if (isset($bigbluebuttonbn)) { |
|
168 | 168 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_DELETED, $bigbluebuttonbn, $context, $cm); |
169 | 169 | } |
170 | 170 | } |
171 | - echo $params['callback'].'({ "status": "true" });'; |
|
171 | + echo $params['callback'] . '({ "status": "true" });'; |
|
172 | 172 | break; |
173 | 173 | case 'recording_ready': |
174 | 174 | //Decodes the received JWT string |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | $decoded_parameters = JWT::decode($params['signed_parameters'], $shared_secret, array('HS256')); |
177 | 177 | |
178 | 178 | } catch (Exception $e) { |
179 | - $error = 'Caught exception: '.$e->getMessage(); |
|
179 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
180 | 180 | error_log($error); |
181 | - header("HTTP/1.0 400 Bad Request. ".$error); |
|
181 | + header("HTTP/1.0 400 Bad Request. " . $error); |
|
182 | 182 | return; |
183 | 183 | } |
184 | 184 | |
@@ -189,9 +189,9 @@ discard block |
||
189 | 189 | $bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $meeting_id_elements[2]), '*', MUST_EXIST); |
190 | 190 | |
191 | 191 | } catch (Exception $e) { |
192 | - $error = 'Caught exception: '.$e->getMessage(); |
|
192 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
193 | 193 | error_log($error); |
194 | - header("HTTP/1.0 410 Gone. ".$error); |
|
194 | + header("HTTP/1.0 410 Gone. " . $error); |
|
195 | 195 | return; |
196 | 196 | } |
197 | 197 | |
@@ -201,9 +201,9 @@ discard block |
||
201 | 201 | header("HTTP/1.0 202 Accepted"); |
202 | 202 | return; |
203 | 203 | } catch (Exception $e) { |
204 | - $error = 'Caught exception: '.$e->getMessage(); |
|
204 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
205 | 205 | error_log($error); |
206 | - header("HTTP/1.0 503 Service Unavailable. ".$error); |
|
206 | + header("HTTP/1.0 503 Service Unavailable. " . $error); |
|
207 | 207 | return; |
208 | 208 | } |
209 | 209 | break; |
@@ -213,14 +213,14 @@ discard block |
||
213 | 213 | break; |
214 | 214 | } |
215 | 215 | |
216 | - } catch(Exception $e) { |
|
217 | - error_log("BBB_BROKER ERROR: ".$e->getCode().", ".$e->getMessage()); |
|
218 | - header("HTTP/1.0 502 Bad Gateway. ".$e->getMessage()); |
|
216 | + } catch (Exception $e) { |
|
217 | + error_log("BBB_BROKER ERROR: " . $e->getCode() . ", " . $e->getMessage()); |
|
218 | + header("HTTP/1.0 502 Bad Gateway. " . $e->getMessage()); |
|
219 | 219 | return; |
220 | 220 | } |
221 | 221 | } |
222 | 222 | |
223 | 223 | } else { |
224 | - header("HTTP/1.0 400 Bad Request. ".$error); |
|
224 | + header("HTTP/1.0 400 Bad Request. " . $error); |
|
225 | 225 | return; |
226 | 226 | } |
227 | 227 | \ No newline at end of file |
@@ -119,8 +119,9 @@ |
||
119 | 119 | //Execute the end command |
120 | 120 | $meeting_info = bigbluebuttonbn_bbb_broker_do_end_meeting($params['id'], $bbbsession['modPW']); |
121 | 121 | // Moodle event logger: Create an event for meeting ended |
122 | - if( isset($bigbluebuttonbn) ) |
|
123 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $context, $cm); |
|
122 | + if( isset($bigbluebuttonbn) ) { |
|
123 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $context, $cm); |
|
124 | + } |
|
124 | 125 | /// Update the cache |
125 | 126 | $meeting_info = bigbluebuttonbn_bbb_broker_get_meeting_info($params['id'], $bbbsession['modPW'], true); |
126 | 127 |
@@ -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); |