@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | defined('MOODLE_INTERNAL') || die; |
25 | 25 | |
26 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php'); |
|
26 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php'); |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * bigbluebuttonbn backup task that provides all the settings and steps to perform one |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | public static function encode_content_links($content) { |
54 | 54 | global $CFG; |
55 | 55 | |
56 | - $base = preg_quote($CFG->wwwroot.'/mod/bigbluebuttonbn', '#'); |
|
56 | + $base = preg_quote($CFG->wwwroot . '/mod/bigbluebuttonbn', '#'); |
|
57 | 57 | |
58 | 58 | // Link to the list of bigbluebuttonbns. |
59 | - $pattern = '#('.$base."\/index.php\?id\=)([0-9]+)#"; |
|
59 | + $pattern = '#(' . $base . "\/index.php\?id\=)([0-9]+)#"; |
|
60 | 60 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNINDEX*$2@$', $content); |
61 | 61 | |
62 | 62 | // Link to bigbluebuttonbn view by moduleid. |
63 | - $pattern = '#('.$base."\/view.php\?id\=)([0-9]+)#"; |
|
63 | + $pattern = '#(' . $base . "\/view.php\?id\=)([0-9]+)#"; |
|
64 | 64 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNVIEWBYID*$2@$', $content); |
65 | 65 | |
66 | 66 | return $content; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | protected function process_bigbluebuttonbn($data) { |
46 | 46 | global $DB; |
47 | 47 | |
48 | - $data = (object) $data; |
|
48 | + $data = (object)$data; |
|
49 | 49 | $data->course = $this->get_courseid(); |
50 | 50 | |
51 | 51 | $data->timemodified = $this->apply_date_offset($data->timemodified); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | protected function process_bigbluebuttonbn_logs($data) { |
60 | 60 | global $DB; |
61 | 61 | |
62 | - $data = (object) $data; |
|
62 | + $data = (object)$data; |
|
63 | 63 | // Apply modifications. |
64 | 64 | $data->courseid = $this->get_mappingid('course', $data->courseid); |
65 | 65 | $data->bigbluebuttonbnid = $this->get_new_parentid('bigbluebuttonbn'); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | defined('MOODLE_INTERNAL') || die(); |
25 | 25 | |
26 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php'); |
|
26 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php'); |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * bigbluebuttonbn restore task that provides all the settings and steps to perform one |
@@ -40,12 +40,12 @@ |
||
40 | 40 | 'moderatorpass', 'viewerpass', 'wait', 'record', 'tagging', |
41 | 41 | 'welcome', 'voicebridge', 'openingtime', 'closingtime', |
42 | 42 | 'timecreated', 'timemodified', 'presentation', 'participants', |
43 | - 'userlimit', )); |
|
43 | + 'userlimit',)); |
|
44 | 44 | |
45 | 45 | $logs = new backup_nested_element('logs'); |
46 | 46 | |
47 | 47 | $log = new backup_nested_element('log', array('id'), array( |
48 | - 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', )); |
|
48 | + 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',)); |
|
49 | 49 | |
50 | 50 | // Build the tree. |
51 | 51 | $bigbluebuttonbn->add_child($logs); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | global $CFG; |
29 | 29 | |
30 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
30 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
31 | 31 | |
32 | 32 | if ($ADMIN->fulltree) { |
33 | 33 | if (!isset($CFG->bigbluebuttonbn['server_url']) || |
@@ -258,8 +258,8 @@ discard block |
||
258 | 258 | } else { |
259 | 259 | $settings->add(new admin_setting_heading('bigbluebuttonbn_feature_preuploadpresentation', |
260 | 260 | get_string('config_feature_preuploadpresentation', 'bigbluebuttonbn'), |
261 | - get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn').'<br><br>'. |
|
262 | - '<div class="form-defaultinfo">'.get_string('config_warning_curl_not_installed', 'bigbluebuttonbn').'</div><br>' |
|
261 | + get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn') . '<br><br>' . |
|
262 | + '<div class="form-defaultinfo">' . get_string('config_warning_curl_not_installed', 'bigbluebuttonbn') . '</div><br>' |
|
263 | 263 | )); |
264 | 264 | } |
265 | 265 | } |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
24 | 24 | */ |
25 | 25 | |
26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
28 | 28 | |
29 | 29 | $id = required_param('id', PARAM_INT); |
30 | 30 | $a = optional_param('a', 0, PARAM_INT); |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | |
93 | 93 | echo get_string('index_ending', 'bigbluebuttonbn'); |
94 | 94 | |
95 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
95 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
96 | 96 | if ($g != '0') { |
97 | - $meetingid .= '['.$g.']'; |
|
97 | + $meetingid .= '[' . $g . ']'; |
|
98 | 98 | } |
99 | 99 | bigbluebuttonbn_wrap_xml_load_file(bigbluebuttonbn_getEndMeetingURL($meetingid)); |
100 | - redirect('index.php?id='.$id); |
|
100 | + redirect('index.php?id=' . $id); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | // Add a the data for the bigbluebuttonbn instance. |
115 | 115 | $groupobj = null; |
116 | 116 | if (groups_get_activity_groupmode($cm) > 0) { |
117 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
117 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
118 | 118 | } |
119 | 119 | $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
120 | 120 | |
@@ -135,13 +135,13 @@ discard block |
||
135 | 135 | |
136 | 136 | // Functions. |
137 | 137 | function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
138 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
138 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
139 | 139 | $paramgroup = ''; |
140 | 140 | $groupname = ''; |
141 | 141 | |
142 | 142 | if ($groupobj) { |
143 | - $meetingid .= '['.$groupobj->id.']'; |
|
144 | - $paramgroup = '&group='.$groupobj->id; |
|
143 | + $meetingid .= '[' . $groupobj->id . ']'; |
|
144 | + $paramgroup = '&group=' . $groupobj->id; |
|
145 | 145 | $groupname = $groupobj->name; |
146 | 146 | } |
147 | 147 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | // Output Users in the meeting. |
163 | - $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>'; |
|
163 | + $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>'; |
|
164 | 164 | $group = $groupname; |
165 | 165 | $users = ''; |
166 | 166 | $viewerlist = ''; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $attendeecount = 0; |
198 | 198 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
199 | 199 | if ($attendee->role == $role) { |
200 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
200 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
201 | 201 | } |
202 | 202 | } |
203 | 203 | } |
@@ -220,15 +220,15 @@ discard block |
||
220 | 220 | $actions = ''; |
221 | 221 | |
222 | 222 | if ($moderator) { |
223 | - $actions .= '<form name="form1" method="post" action="">'.'/n'; |
|
224 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'.'/n'; |
|
225 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'.'/n'; |
|
223 | + $actions .= '<form name="form1" method="post" action="">' . '/n'; |
|
224 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . '/n'; |
|
225 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . '/n'; |
|
226 | 226 | if ($groupobj != null) { |
227 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'.'/n'; |
|
227 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . '/n'; |
|
228 | 228 | } |
229 | - $actions .= ' <INPUT type="submit" name="submit" value="end" onclick="return confirm(\''. |
|
230 | - get_string('index_confirm_end', 'bigbluebuttonbn').'\')">'.'/n'; |
|
231 | - $actions .= '</form>'.'/n'; |
|
229 | + $actions .= ' <INPUT type="submit" name="submit" value="end" onclick="return confirm(\'' . |
|
230 | + get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . '/n'; |
|
231 | + $actions .= '</form>' . '/n'; |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | return $actions; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | |
209 | 209 | $logs = $DB->get_records('bigbluebuttonbn_logs', |
210 | 210 | array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => BIGBLUEBUTTONBN_LOG_EVENT_CREATE, 'meta' => "{\"record\":true}") |
211 | - ); |
|
211 | + ); |
|
212 | 212 | $log->meta = "{\"has_recordings\":false}"; |
213 | 213 | if (!empty($logs)) { |
214 | 214 | $log->meta = "{\"has_recordings\":true}"; |
@@ -233,9 +233,9 @@ discard block |
||
233 | 233 | global $DB; |
234 | 234 | |
235 | 235 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
236 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, |
|
237 | - 'userid' => $user->id, |
|
238 | - 'log' => 'Join', ), '*'); |
|
236 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, |
|
237 | + 'userid' => $user->id, |
|
238 | + 'log' => 'Join', ), '*'); |
|
239 | 239 | |
240 | 240 | if ($completed > 0) { |
241 | 241 | return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. |
@@ -256,9 +256,9 @@ discard block |
||
256 | 256 | global $DB; |
257 | 257 | |
258 | 258 | $completed = $DB->count_recorda('bigbluebuttonbn_logs', array('courseid' => $course->id, |
259 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, |
|
260 | - 'userid' => $user->id, |
|
261 | - 'log' => 'Join', ), '*', IGNORE_MULTIPLE); |
|
259 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, |
|
260 | + 'userid' => $user->id, |
|
261 | + 'log' => 'Join', ), '*', IGNORE_MULTIPLE); |
|
262 | 262 | |
263 | 263 | return $completed > 0; |
264 | 264 | } |
@@ -331,12 +331,12 @@ discard block |
||
331 | 331 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
332 | 332 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
333 | 333 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
334 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
334 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
335 | 335 | $str .= ' </div>'."\n"; |
336 | 336 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
337 | 337 | '</div>'."\n"; |
338 | 338 | $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
339 | - .'</div>'."\n"; |
|
339 | + .'</div>'."\n"; |
|
340 | 340 | $str .= '</div>'."\n"; |
341 | 341 | |
342 | 342 | return $str; |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | * $return->time = the time they did it |
228 | 228 | * $return->info = a short text description. |
229 | 229 | * |
230 | - * @return bool |
|
230 | + * @return string |
|
231 | 231 | */ |
232 | 232 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
233 | 233 | global $DB; |
@@ -317,6 +317,9 @@ discard block |
||
317 | 317 | } |
318 | 318 | } |
319 | 319 | |
320 | +/** |
|
321 | + * @param integer $now |
|
322 | + */ |
|
320 | 323 | function bigbluebuttonbn_print_overview_element($bigbluebuttonbn, $now) { |
321 | 324 | global $CFG; |
322 | 325 | |
@@ -542,6 +545,10 @@ discard block |
||
542 | 545 | send_stored_file($file, 0, 0, $forcedownload, $options); // download MUST be forced - security! |
543 | 546 | } |
544 | 547 | |
548 | +/** |
|
549 | + * @param stdClass $context |
|
550 | + * @param string $filearea |
|
551 | + */ |
|
545 | 552 | function bigbluebuttonbn_pluginfile_valid($context, $filearea) { |
546 | 553 | if ($context->contextlevel != CONTEXT_MODULE) { |
547 | 554 | return false; |
@@ -558,6 +565,12 @@ discard block |
||
558 | 565 | return true; |
559 | 566 | } |
560 | 567 | |
568 | +/** |
|
569 | + * @param stdClass $course |
|
570 | + * @param stdClass $cm |
|
571 | + * @param stdClass $context |
|
572 | + * @param string $filearea |
|
573 | + */ |
|
561 | 574 | function bigbluebuttonbn_pluginfile_file($course, $cm, $context, $filearea, $args) { |
562 | 575 | $filename = bigbluebuttonbn_pluginfile_filename($course, $cm, $context, $args); |
563 | 576 | if (!$filename) { |
@@ -27,32 +27,32 @@ discard block |
||
27 | 27 | |
28 | 28 | global $CFG; |
29 | 29 | |
30 | -require_once($CFG->dirroot.'/calendar/lib.php'); |
|
31 | -require_once($CFG->dirroot.'/message/lib.php'); |
|
32 | -require_once($CFG->dirroot.'/mod/lti/OAuth.php'); |
|
33 | -require_once($CFG->libdir.'/accesslib.php'); |
|
34 | -require_once($CFG->libdir.'/completionlib.php'); |
|
35 | -require_once($CFG->libdir.'/datalib.php'); |
|
36 | -require_once($CFG->libdir.'/coursecatlib.php'); |
|
37 | -require_once($CFG->libdir.'/enrollib.php'); |
|
38 | -require_once($CFG->libdir.'/filelib.php'); |
|
39 | -require_once($CFG->libdir.'/formslib.php'); |
|
40 | - |
|
41 | -if (file_exists(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php')) { |
|
42 | - require_once(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php'); |
|
30 | +require_once($CFG->dirroot . '/calendar/lib.php'); |
|
31 | +require_once($CFG->dirroot . '/message/lib.php'); |
|
32 | +require_once($CFG->dirroot . '/mod/lti/OAuth.php'); |
|
33 | +require_once($CFG->libdir . '/accesslib.php'); |
|
34 | +require_once($CFG->libdir . '/completionlib.php'); |
|
35 | +require_once($CFG->libdir . '/datalib.php'); |
|
36 | +require_once($CFG->libdir . '/coursecatlib.php'); |
|
37 | +require_once($CFG->libdir . '/enrollib.php'); |
|
38 | +require_once($CFG->libdir . '/filelib.php'); |
|
39 | +require_once($CFG->libdir . '/formslib.php'); |
|
40 | + |
|
41 | +if (file_exists(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php')) { |
|
42 | + require_once(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | if (!isset($CFG->bigbluebuttonbn)) { |
46 | 46 | $CFG->bigbluebuttonbn = array(); |
47 | 47 | } |
48 | 48 | |
49 | -if (file_exists(dirname(__FILE__).'/config.php')) { |
|
50 | - require_once(dirname(__FILE__).'/config.php'); |
|
49 | +if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
50 | + require_once(dirname(__FILE__) . '/config.php'); |
|
51 | 51 | // Old BigBlueButtonBN cfg schema. For backward compatibility. |
52 | 52 | global $BIGBLUEBUTTONBN_CFG; |
53 | 53 | |
54 | 54 | if (isset($BIGBLUEBUTTONBN_CFG)) { |
55 | - foreach ((array) $BIGBLUEBUTTONBN_CFG as $key => $value) { |
|
55 | + foreach ((array)$BIGBLUEBUTTONBN_CFG as $key => $value) { |
|
56 | 56 | $cfgkey = str_replace("bigbluebuttonbn_", "", $key); |
57 | 57 | $CFG->bigbluebuttonbn[$cfgkey] = $value; |
58 | 58 | } |
@@ -83,19 +83,19 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | $features = array( |
86 | - (string) FEATURE_IDNUMBER => true, |
|
87 | - (string) FEATURE_GROUPS => true, |
|
88 | - (string) FEATURE_GROUPINGS => true, |
|
89 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
90 | - (string) FEATURE_MOD_INTRO => true, |
|
91 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
92 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
93 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
94 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
95 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
86 | + (string)FEATURE_IDNUMBER => true, |
|
87 | + (string)FEATURE_GROUPS => true, |
|
88 | + (string)FEATURE_GROUPINGS => true, |
|
89 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
90 | + (string)FEATURE_MOD_INTRO => true, |
|
91 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
92 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
93 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
94 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
95 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
96 | 96 | ); |
97 | 97 | |
98 | - if (isset($features[(string) $feature])) { |
|
98 | + if (isset($features[(string)$feature])) { |
|
99 | 99 | return $features[$feature]; |
100 | 100 | } |
101 | 101 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | } |
176 | 176 | |
177 | 177 | // End the session associated with this instance (if it's running). |
178 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
178 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
179 | 179 | $modpw = $bigbluebuttonbn->moderatorpass; |
180 | 180 | |
181 | 181 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
@@ -235,11 +235,11 @@ discard block |
||
235 | 235 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
236 | 236 | 'bigbluebuttonbnid' => $bigbluebuttonbn->id, |
237 | 237 | 'userid' => $user->id, |
238 | - 'log' => 'Join', ), '*'); |
|
238 | + 'log' => 'Join',), '*'); |
|
239 | 239 | |
240 | 240 | if ($completed > 0) { |
241 | - return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. |
|
242 | - get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. |
|
241 | + return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
|
242 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
243 | 243 | get_string('view_message_times', 'bigbluebuttonbn'); |
244 | 244 | } |
245 | 245 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $completed = $DB->count_recorda('bigbluebuttonbn_logs', array('courseid' => $course->id, |
259 | 259 | 'bigbluebuttonbnid' => $bigbluebuttonbn->id, |
260 | 260 | 'userid' => $user->id, |
261 | - 'log' => 'Join', ), '*', IGNORE_MULTIPLE); |
|
261 | + 'log' => 'Join',), '*', IGNORE_MULTIPLE); |
|
262 | 262 | |
263 | 263 | return $completed > 0; |
264 | 264 | } |
@@ -328,16 +328,16 @@ discard block |
||
328 | 328 | if ($bigbluebuttonbn->visible) { |
329 | 329 | $classes = 'class="dimmed" '; |
330 | 330 | } |
331 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
332 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
333 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
334 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
335 | - $str .= ' </div>'."\n"; |
|
336 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
337 | - '</div>'."\n"; |
|
338 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
339 | - .'</div>'."\n"; |
|
340 | - $str .= '</div>'."\n"; |
|
331 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
332 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
333 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
334 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
335 | + $str .= ' </div>' . "\n"; |
|
336 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
337 | + '</div>' . "\n"; |
|
338 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
339 | + .'</div>' . "\n"; |
|
340 | + $str .= '</div>' . "\n"; |
|
341 | 341 | |
342 | 342 | return $str; |
343 | 343 | } |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | /* Now that an id was assigned, generate and set the meetingid property based on |
426 | 426 | * [Moodle Instance + Activity ID + BBB Secret] (but only for new activities) */ |
427 | 427 | if (isset($bigbluebuttonbn->add) && !empty($bigbluebuttonbn->add)) { |
428 | - $meetingid = sha1($CFG->wwwroot.$bigbluebuttonbn->id.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
428 | + $meetingid = sha1($CFG->wwwroot . $bigbluebuttonbn->id . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
429 | 429 | $DB->set_field('bigbluebuttonbn', 'meetingid', $meetingid, array('id' => $bigbluebuttonbn->id)); |
430 | 430 | |
431 | 431 | $action = get_string('mod_form_field_notification_msg_created', 'bigbluebuttonbn'); |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | if (count($files) == 1) { |
508 | 508 | // Get the first (and only) file. |
509 | 509 | $file = reset($files); |
510 | - $filesrc = '/'.$file->get_filename(); |
|
510 | + $filesrc = '/' . $file->get_filename(); |
|
511 | 511 | } |
512 | 512 | // Set the presentation column in the bigbluebuttonbn table. |
513 | 513 | $DB->set_field('bigbluebuttonbn', 'presentation', $filesrc, array('id' => $bigbluebuttonbnid)); |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | return false; |
565 | 565 | } |
566 | 566 | |
567 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
567 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
568 | 568 | $fs = get_file_storage(); |
569 | 569 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
570 | 570 | if (!$file || $file->is_directory()) { |
@@ -96,8 +96,8 @@ |
||
96 | 96 | $output .= html_writer::start_tag('br'); |
97 | 97 | $output .= html_writer::tag('input', '', |
98 | 98 | array('type' => 'button', 'class' => 'btn btn-secondary', |
99 | - 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
100 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
99 | + 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
100 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
101 | 101 | |
102 | 102 | // JavaScript for locales. |
103 | 103 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
23 | 23 | */ |
24 | 24 | |
25 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
26 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
25 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
26 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
27 | 27 | |
28 | 28 | $bn = required_param('bn', PARAM_INT); |
29 | 29 | $tc = optional_param('tc', 0, PARAM_INT); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $output .= html_writer::tag('input', '', |
98 | 98 | array('type' => 'button', 'class' => 'btn btn-secondary', |
99 | 99 | 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
100 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
100 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\'')); |
|
101 | 101 | |
102 | 102 | // JavaScript for locales. |
103 | 103 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
23 | 23 | */ |
24 | 24 | |
25 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
26 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
25 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
26 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
27 | 27 | |
28 | 28 | $action = required_param('action', PARAM_TEXT); |
29 | 29 | $id = optional_param('id', 0, PARAM_INT); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
99 | 99 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
100 | - header('Location: '.$bbbsession['logoutURL']); |
|
100 | + header('Location: ' . $bbbsession['logoutURL']); |
|
101 | 101 | break; |
102 | 102 | } |
103 | 103 | |
@@ -113,17 +113,17 @@ discard block |
||
113 | 113 | // The server is unreachable. |
114 | 114 | if ($bbbsession['administrator']) { |
115 | 115 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
116 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
116 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
117 | 117 | break; |
118 | 118 | } |
119 | 119 | if ($bbbsession['moderator']) { |
120 | 120 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
121 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
121 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
122 | 122 | break; |
123 | 123 | } |
124 | 124 | |
125 | 125 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
126 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
126 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
127 | 127 | break; |
128 | 128 | } |
129 | 129 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | // Moodle event logger: Create an event for meeting left. |
159 | 159 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]); |
160 | 160 | // Execute the redirect. |
161 | - header('Location: '.urldecode($href)); |
|
161 | + header('Location: ' . urldecode($href)); |
|
162 | 162 | break; |
163 | 163 | default: |
164 | 164 | bigbluebutton_bbb_view_close_window(); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | } |
202 | 202 | if ($durationtime > 0) { |
203 | 203 | $data['duration'] = $durationtime; |
204 | - $data['welcome'] .= '<br><br>'.str_replace('%duration%', ''.$durationtime, get_string('bbbdurationwarning', 'bigbluebuttonbn')); |
|
204 | + $data['welcome'] .= '<br><br>' . str_replace('%duration%', '' . $durationtime, get_string('bbbdurationwarning', 'bigbluebuttonbn')); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | $voicebridge = intval($bbbsession['voicebridge']); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | |
248 | 248 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
249 | 249 | // No more users allowed to join. |
250 | - header('Location: '.$bbbsession['logoutURL']); |
|
250 | + header('Location: ' . $bbbsession['logoutURL']); |
|
251 | 251 | return; |
252 | 252 | } |
253 | 253 | |
@@ -266,20 +266,20 @@ discard block |
||
266 | 266 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
267 | 267 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
268 | 268 | // Execute the redirect. |
269 | - header('Location: '.$joinurl); |
|
269 | + header('Location: ' . $joinurl); |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | function bigbluebutton_bbb_view_errors($serrors, $id) { |
273 | 273 | global $CFG, $OUTPUT; |
274 | 274 | |
275 | - $errors = (array) json_decode(urldecode($serrors)); |
|
275 | + $errors = (array)json_decode(urldecode($serrors)); |
|
276 | 276 | $msgerrors = ''; |
277 | 277 | foreach ($errors as $error) { |
278 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
278 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | echo $OUTPUT->header(); |
282 | 282 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
283 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
283 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
284 | 284 | echo $OUTPUT->footer(); |
285 | 285 | } |
@@ -62,106 +62,106 @@ |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | switch (strtolower($action)) { |
65 | - case 'logout': |
|
66 | - if (isset($errors) && $errors != '') { |
|
67 | - bigbluebutton_bbb_view_errors($errors, $id); |
|
68 | - break; |
|
69 | - } |
|
65 | + case 'logout': |
|
66 | + if (isset($errors) && $errors != '') { |
|
67 | + bigbluebutton_bbb_view_errors($errors, $id); |
|
68 | + break; |
|
69 | + } |
|
70 | 70 | |
71 | - if (is_null($bbbsession)) { |
|
72 | - bigbluebutton_bbb_view_close_window_manually(); |
|
73 | - break; |
|
74 | - } |
|
71 | + if (is_null($bbbsession)) { |
|
72 | + bigbluebutton_bbb_view_close_window_manually(); |
|
73 | + break; |
|
74 | + } |
|
75 | 75 | |
76 | - // Moodle event logger: Create an event for meeting left. |
|
77 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm); |
|
76 | + // Moodle event logger: Create an event for meeting left. |
|
77 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm); |
|
78 | 78 | |
79 | - // Update the cache. |
|
80 | - $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_FORCED); |
|
79 | + // Update the cache. |
|
80 | + $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_FORCED); |
|
81 | 81 | |
82 | - // Close the tab or window where BBB was opened. |
|
83 | - bigbluebutton_bbb_view_close_window(); |
|
84 | - break; |
|
85 | - case 'join': |
|
86 | - if (is_null($bbbsession)) { |
|
87 | - print_error('view_error_unable_join', 'bigbluebuttonbn'); |
|
82 | + // Close the tab or window where BBB was opened. |
|
83 | + bigbluebutton_bbb_view_close_window(); |
|
88 | 84 | break; |
89 | - } |
|
85 | + case 'join': |
|
86 | + if (is_null($bbbsession)) { |
|
87 | + print_error('view_error_unable_join', 'bigbluebuttonbn'); |
|
88 | + break; |
|
89 | + } |
|
90 | 90 | |
91 | - // See if the session is in progress. |
|
92 | - if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) { |
|
93 | - // Since the meeting is already running, we just join the session. |
|
94 | - bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
95 | - break; |
|
96 | - } |
|
91 | + // See if the session is in progress. |
|
92 | + if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) { |
|
93 | + // Since the meeting is already running, we just join the session. |
|
94 | + bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
95 | + break; |
|
96 | + } |
|
97 | 97 | |
98 | - // If user is not administrator nor moderator (user is steudent) and waiting is required. |
|
99 | - if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
|
100 | - header('Location: '.$bbbsession['logoutURL']); |
|
101 | - break; |
|
102 | - } |
|
103 | - |
|
104 | - // As the meeting doesn't exist, try to create it. |
|
105 | - $response = bigbluebuttonbn_get_create_meeting_array( |
|
106 | - bigbluebutton_bbb_view_create_meeting_data($bbbsession, $bigbluebuttonbn), |
|
107 | - bigbluebutton_bbb_view_create_meeting_metadata($bbbsession), |
|
108 | - $bbbsession['presentation']['name'], |
|
109 | - $bbbsession['presentation']['url'] |
|
110 | - ); |
|
111 | - |
|
112 | - if (!$response) { |
|
113 | - // The server is unreachable. |
|
114 | - if ($bbbsession['administrator']) { |
|
115 | - print_error('view_error_unable_join', 'bigbluebuttonbn', |
|
116 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
98 | + // If user is not administrator nor moderator (user is steudent) and waiting is required. |
|
99 | + if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
|
100 | + header('Location: '.$bbbsession['logoutURL']); |
|
117 | 101 | break; |
118 | 102 | } |
119 | - if ($bbbsession['moderator']) { |
|
120 | - print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
|
103 | + |
|
104 | + // As the meeting doesn't exist, try to create it. |
|
105 | + $response = bigbluebuttonbn_get_create_meeting_array( |
|
106 | + bigbluebutton_bbb_view_create_meeting_data($bbbsession, $bigbluebuttonbn), |
|
107 | + bigbluebutton_bbb_view_create_meeting_metadata($bbbsession), |
|
108 | + $bbbsession['presentation']['name'], |
|
109 | + $bbbsession['presentation']['url'] |
|
110 | + ); |
|
111 | + |
|
112 | + if (!$response) { |
|
113 | + // The server is unreachable. |
|
114 | + if ($bbbsession['administrator']) { |
|
115 | + print_error('view_error_unable_join', 'bigbluebuttonbn', |
|
116 | + $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
117 | + break; |
|
118 | + } |
|
119 | + if ($bbbsession['moderator']) { |
|
120 | + print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
|
121 | + $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
122 | + break; |
|
123 | + } |
|
124 | + |
|
125 | + print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
|
121 | 126 | $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
122 | 127 | break; |
123 | 128 | } |
124 | 129 | |
125 | - print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
|
126 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
127 | - break; |
|
128 | - } |
|
130 | + if ($response['returncode'] == 'FAILED') { |
|
131 | + // The meeting was not created. |
|
132 | + if (!$printerrorkey) { |
|
133 | + print_error($response['message'], 'bigbluebuttonbn'); |
|
134 | + break; |
|
135 | + } |
|
136 | + $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
137 | + print_error($printerrorkey, 'bigbluebuttonbn'); |
|
138 | + break; |
|
139 | + } |
|
129 | 140 | |
130 | - if ($response['returncode'] == 'FAILED') { |
|
131 | - // The meeting was not created. |
|
132 | - if (!$printerrorkey) { |
|
133 | - print_error($response['message'], 'bigbluebuttonbn'); |
|
141 | + if ($response['hasBeenForciblyEnded'] == 'true') { |
|
142 | + print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn')); |
|
134 | 143 | break; |
135 | 144 | } |
136 | - $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
137 | - print_error($printerrorkey, 'bigbluebuttonbn'); |
|
138 | - break; |
|
139 | - } |
|
140 | 145 | |
141 | - if ($response['hasBeenForciblyEnded'] == 'true') { |
|
142 | - print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn')); |
|
146 | + // Moodle event logger: Create an event for meeting created. |
|
147 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm); |
|
148 | + // Internal logger: Insert a record with the meeting created. |
|
149 | + bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE); |
|
150 | + // Since the meeting is already running, we just join the session. |
|
151 | + bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
152 | + break; |
|
153 | + case 'playback': |
|
154 | + if ($href == '') { |
|
155 | + bigbluebutton_bbb_view_close_window(); |
|
156 | + return; |
|
157 | + } |
|
158 | + // Moodle event logger: Create an event for meeting left. |
|
159 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]); |
|
160 | + // Execute the redirect. |
|
161 | + header('Location: '.urldecode($href)); |
|
143 | 162 | break; |
144 | - } |
|
145 | - |
|
146 | - // Moodle event logger: Create an event for meeting created. |
|
147 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm); |
|
148 | - // Internal logger: Insert a record with the meeting created. |
|
149 | - bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE); |
|
150 | - // Since the meeting is already running, we just join the session. |
|
151 | - bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
152 | - break; |
|
153 | - case 'playback': |
|
154 | - if ($href == '') { |
|
163 | + default: |
|
155 | 164 | bigbluebutton_bbb_view_close_window(); |
156 | - return; |
|
157 | - } |
|
158 | - // Moodle event logger: Create an event for meeting left. |
|
159 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]); |
|
160 | - // Execute the redirect. |
|
161 | - header('Location: '.urldecode($href)); |
|
162 | - break; |
|
163 | - default: |
|
164 | - bigbluebutton_bbb_view_close_window(); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | function bigbluebutton_bbb_view_close_window() { |
@@ -178,10 +178,10 @@ discard block |
||
178 | 178 | |
179 | 179 | function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession, $bigbluebuttonbn) { |
180 | 180 | $data = ['meetingID' => $bbbsession['meetingid'], |
181 | - 'name' => $bbbsession['meetingname'], |
|
182 | - 'attendeePW' => $bbbsession['viewerPW'], |
|
183 | - 'moderatorPW' => $bbbsession['modPW'], |
|
184 | - 'logoutURL' => $bbbsession['logoutURL'], |
|
181 | + 'name' => $bbbsession['meetingname'], |
|
182 | + 'attendeePW' => $bbbsession['viewerPW'], |
|
183 | + 'moderatorPW' => $bbbsession['modPW'], |
|
184 | + 'logoutURL' => $bbbsession['logoutURL'], |
|
185 | 185 | ]; |
186 | 186 | |
187 | 187 | $data['record'] = 'false'; |
@@ -221,14 +221,14 @@ discard block |
||
221 | 221 | global $USER; |
222 | 222 | |
223 | 223 | $metadata = ['bbb-origin' => $bbbsession['origin'], |
224 | - 'bbb-origin-version' => $bbbsession['originVersion'], |
|
225 | - 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
226 | - 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
227 | - 'bbb-origin-tag' => $bbbsession['originTag'], |
|
228 | - 'bbb-context' => $bbbsession['course']->fullname, |
|
229 | - 'bbb-recording-name' => $bbbsession['meetingname'], |
|
230 | - 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
231 | - 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
224 | + 'bbb-origin-version' => $bbbsession['originVersion'], |
|
225 | + 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
226 | + 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
227 | + 'bbb-origin-tag' => $bbbsession['originTag'], |
|
228 | + 'bbb-context' => $bbbsession['course']->fullname, |
|
229 | + 'bbb-recording-name' => $bbbsession['meetingname'], |
|
230 | + 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
231 | + 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
232 | 232 | ]; |
233 | 233 | |
234 | 234 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
@@ -236,8 +236,8 @@ discard block |
||
236 | 236 | array( |
237 | 237 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
238 | 238 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
239 | - ) |
|
240 | - ); |
|
239 | + ) |
|
240 | + ); |
|
241 | 241 | } |
242 | 242 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
243 | 243 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |