@@ -36,11 +36,11 @@ |
||
36 | 36 | |
37 | 37 | // Define each element separated |
38 | 38 | $bigbluebuttonbn = new backup_nested_element('bigbluebuttonbn', array('id'), array( |
39 | - 'course', 'name', 'intro', 'introformat', 'meetingid', |
|
40 | - 'moderatorpass', 'viewerpass', 'wait', 'record', 'tagging', |
|
41 | - 'welcome', 'voicebridge', 'openingtime', 'closingtime', |
|
42 | - 'timecreated', 'timemodified', 'presentation', 'participants', |
|
43 | - 'userlimit')); |
|
39 | + 'course', 'name', 'intro', 'introformat', 'meetingid', |
|
40 | + 'moderatorpass', 'viewerpass', 'wait', 'record', 'tagging', |
|
41 | + 'welcome', 'voicebridge', 'openingtime', 'closingtime', |
|
42 | + 'timecreated', 'timemodified', 'presentation', 'participants', |
|
43 | + 'userlimit')); |
|
44 | 44 | |
45 | 45 | $logs = new backup_nested_element('logs'); |
46 | 46 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
41 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
42 | 42 | return get_string('event_meeting_ended_description', 'bigbluebuttonbn', $a); |
43 | 43 | } |
44 | 44 |
@@ -38,8 +38,8 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
43 | 43 | return get_string('event_recording_published_description', 'bigbluebuttonbn', $a); |
44 | 44 | } |
45 | 45 |
@@ -84,8 +84,9 @@ discard block |
||
84 | 84 | $bbbsession['voicebridge'] = ($bigbluebuttonbn->voicebridge > 0)? 70000 + $bigbluebuttonbn->voicebridge: $bigbluebuttonbn->voicebridge; |
85 | 85 | $bbbsession['wait'] = $bigbluebuttonbn->wait; |
86 | 86 | $bbbsession['record'] = $bigbluebuttonbn->record; |
87 | -if( $bigbluebuttonbn->record ) |
|
87 | +if( $bigbluebuttonbn->record ) { |
|
88 | 88 | $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
89 | +} |
|
89 | 90 | $bbbsession['tagging'] = $bigbluebuttonbn->tagging; |
90 | 91 | |
91 | 92 | $bbbsession['openingtime'] = $bigbluebuttonbn->openingtime; |
@@ -112,22 +113,24 @@ discard block |
||
112 | 113 | // Validates if the BigBlueButton server is running |
113 | 114 | $serverVersion = bigbluebuttonbn_getServerVersion($bbbsession['endpoint']); |
114 | 115 | if ( !isset($serverVersion) ) { //Server is not working |
115 | - if ( $bbbsession['administrator'] ) |
|
116 | - print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' ); |
|
117 | - else if ( $bbbsession['moderator'] ) |
|
118 | - print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
119 | - else |
|
120 | - print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
121 | -} else { |
|
122 | - $xml = bigbluebuttonbn_wrap_xml_load_file( bigbluebuttonbn_getMeetingsURL( $bbbsession['endpoint'], $bbbsession['shared_secret'] ) ); |
|
123 | - if ( !isset($xml) || !isset($xml->returncode) || $xml->returncode == 'FAILED' ){ // The shared secret is wrong |
|
124 | - if ( $bbbsession['administrator'] ) |
|
116 | + if ( $bbbsession['administrator'] ) { |
|
125 | 117 | print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' ); |
126 | - else if ( $bbbsession['moderator'] ) |
|
118 | + } else if ( $bbbsession['moderator'] ) { |
|
127 | 119 | print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
128 | - else |
|
120 | + } else { |
|
129 | 121 | print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
130 | 122 | } |
123 | + } else { |
|
124 | + $xml = bigbluebuttonbn_wrap_xml_load_file( bigbluebuttonbn_getMeetingsURL( $bbbsession['endpoint'], $bbbsession['shared_secret'] ) ); |
|
125 | + if ( !isset($xml) || !isset($xml->returncode) || $xml->returncode == 'FAILED' ){ // The shared secret is wrong |
|
126 | + if ( $bbbsession['administrator'] ) { |
|
127 | + print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' ); |
|
128 | + } else if ( $bbbsession['moderator'] ) { |
|
129 | + print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
130 | + } else { |
|
131 | + print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
132 | + } |
|
133 | + } |
|
131 | 134 | } |
132 | 135 | |
133 | 136 | // Mark viewed by user (if required) |
@@ -203,10 +206,11 @@ discard block |
||
203 | 206 | } |
204 | 207 | |
205 | 208 | $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.$bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']'; |
206 | - if( $bbbsession['group'] > 0 ) |
|
207 | - $group_name = groups_get_group_name($bbbsession['group']); |
|
208 | - else |
|
209 | - $group_name = get_string('allparticipants'); |
|
209 | + if( $bbbsession['group'] > 0 ) { |
|
210 | + $group_name = groups_get_group_name($bbbsession['group']); |
|
211 | + } else { |
|
212 | + $group_name = get_string('allparticipants'); |
|
213 | + } |
|
210 | 214 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$group_name.')'; |
211 | 215 | } |
212 | 216 | // Metadata (context) |
@@ -362,7 +366,9 @@ discard block |
||
362 | 366 | } |
363 | 367 | //Generates the meetingID string |
364 | 368 | foreach ($mIDs as $mID) { |
365 | - if (strlen($meetingID) > 0) $meetingID .= ','; |
|
369 | + if (strlen($meetingID) > 0) { |
|
370 | + $meetingID .= ','; |
|
371 | + } |
|
366 | 372 | $meetingID .= $mID; |
367 | 373 | } |
368 | 374 | } |
@@ -289,28 +289,28 @@ discard block |
||
289 | 289 | |
290 | 290 | if( $bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator']) ){ |
291 | 291 | echo ''. |
292 | - '<div id="panelContent" class="hidden">'."\n". |
|
293 | - ' <div class="yui3-widget-bd">'."\n". |
|
294 | - ' <form>'."\n". |
|
295 | - ' <fieldset>'."\n". |
|
296 | - ' <input type="hidden" name="join" id="meeting_join_url" value="">'."\n". |
|
297 | - ' <input type="hidden" name="message" id="meeting_message" value="">'."\n". |
|
298 | - ' <div>'."\n". |
|
299 | - ' <label for="name">'.get_string('view_recording_name', 'bigbluebuttonbn').'</label><br/>'."\n". |
|
300 | - ' <input type="text" name="name" id="recording_name" placeholder="">'."\n". |
|
301 | - ' </div><br>'."\n". |
|
302 | - ' <div>'."\n". |
|
303 | - ' <label for="description">'.get_string('view_recording_description', 'bigbluebuttonbn').'</label><br/>'."\n". |
|
304 | - ' <input type="text" name="description" id="recording_description" value="" placeholder="">'."\n". |
|
305 | - ' </div><br>'."\n". |
|
306 | - ' <div>'."\n". |
|
307 | - ' <label for="tags">'.get_string('view_recording_tags', 'bigbluebuttonbn').'</label><br/>'."\n". |
|
308 | - ' <input type="text" name="tags" id="recording_tags" value="" placeholder="">'."\n". |
|
309 | - ' </div>'."\n". |
|
310 | - ' </fieldset>'."\n". |
|
311 | - ' </form>'."\n". |
|
312 | - ' </div>'."\n". |
|
313 | - '</div>'; |
|
292 | + '<div id="panelContent" class="hidden">'."\n". |
|
293 | + ' <div class="yui3-widget-bd">'."\n". |
|
294 | + ' <form>'."\n". |
|
295 | + ' <fieldset>'."\n". |
|
296 | + ' <input type="hidden" name="join" id="meeting_join_url" value="">'."\n". |
|
297 | + ' <input type="hidden" name="message" id="meeting_message" value="">'."\n". |
|
298 | + ' <div>'."\n". |
|
299 | + ' <label for="name">'.get_string('view_recording_name', 'bigbluebuttonbn').'</label><br/>'."\n". |
|
300 | + ' <input type="text" name="name" id="recording_name" placeholder="">'."\n". |
|
301 | + ' </div><br>'."\n". |
|
302 | + ' <div>'."\n". |
|
303 | + ' <label for="description">'.get_string('view_recording_description', 'bigbluebuttonbn').'</label><br/>'."\n". |
|
304 | + ' <input type="text" name="description" id="recording_description" value="" placeholder="">'."\n". |
|
305 | + ' </div><br>'."\n". |
|
306 | + ' <div>'."\n". |
|
307 | + ' <label for="tags">'.get_string('view_recording_tags', 'bigbluebuttonbn').'</label><br/>'."\n". |
|
308 | + ' <input type="text" name="tags" id="recording_tags" value="" placeholder="">'."\n". |
|
309 | + ' </div>'."\n". |
|
310 | + ' </fieldset>'."\n". |
|
311 | + ' </form>'."\n". |
|
312 | + ' </div>'."\n". |
|
313 | + '</div>'; |
|
314 | 314 | } |
315 | 315 | } |
316 | 316 | |
@@ -322,8 +322,8 @@ discard block |
||
322 | 322 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
323 | 323 | |
324 | 324 | echo '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
325 | - ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
|
326 | - ''.$OUTPUT->action_link($bbbsession['presentation']['url'], $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
325 | + ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
|
326 | + ''.$OUTPUT->action_link($bbbsession['presentation']['url'], $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
327 | 327 | } |
328 | 328 | } |
329 | 329 |
@@ -9,12 +9,12 @@ discard block |
||
9 | 9 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
10 | 10 | */ |
11 | 11 | |
12 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
13 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
12 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
13 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
14 | 14 | |
15 | -$id = required_param('id', PARAM_INT); // Course Module ID, or |
|
16 | -$b = optional_param('n', 0, PARAM_INT); // bigbluebuttonbn instance ID |
|
17 | -$group = optional_param('group', 0, PARAM_INT); // group instance ID |
|
15 | +$id = required_param('id', PARAM_INT); // Course Module ID, or |
|
16 | +$b = optional_param('n', 0, PARAM_INT); // bigbluebuttonbn instance ID |
|
17 | +$group = optional_param('group', 0, PARAM_INT); // group instance ID |
|
18 | 18 | |
19 | 19 | if ($id) { |
20 | 20 | $cm = get_coursemodule_from_id('bigbluebuttonbn', $id, 0, false, MUST_EXIST); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | require_login($course, true, $cm); |
32 | 32 | |
33 | 33 | $version_major = bigbluebuttonbn_get_moodle_version_major(); |
34 | -if ( $version_major < '2013111800' ) { |
|
34 | +if ($version_major < '2013111800') { |
|
35 | 35 | //This is valid before v2.6 |
36 | 36 | $module = $DB->get_record('modules', array('name' => 'bigbluebuttonbn')); |
37 | 37 | $module_version = $module->version; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $bbbsession['roles'] = get_user_roles($context, $USER->id, true); |
57 | 57 | |
58 | 58 | // User roles |
59 | -if( $bigbluebuttonbn->participants == null || $bigbluebuttonbn->participants == "" || $bigbluebuttonbn->participants == "[]" ){ |
|
59 | +if ($bigbluebuttonbn->participants == null || $bigbluebuttonbn->participants == "" || $bigbluebuttonbn->participants == "[]") { |
|
60 | 60 | //The room that is being used comes from a previous version |
61 | 61 | $bbbsession['moderator'] = has_capability('mod/bigbluebuttonbn:moderate', $context); |
62 | 62 | } else { |
@@ -76,16 +76,16 @@ discard block |
||
76 | 76 | // Database info related to the activity |
77 | 77 | $bbbsession['meetingdescription'] = $bigbluebuttonbn->intro; |
78 | 78 | $bbbsession['welcome'] = $bigbluebuttonbn->welcome; |
79 | -if( !isset($bbbsession['welcome']) || $bbbsession['welcome'] == '') { |
|
79 | +if (!isset($bbbsession['welcome']) || $bbbsession['welcome'] == '') { |
|
80 | 80 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
81 | 81 | } |
82 | 82 | |
83 | -$bbbsession['userlimit'] = bigbluebuttonbn_get_cfg_userlimit_editable()? intval($bigbluebuttonbn->userlimit): intval(bigbluebuttonbn_get_cfg_userlimit_default()); |
|
84 | -$bbbsession['voicebridge'] = ($bigbluebuttonbn->voicebridge > 0)? 70000 + $bigbluebuttonbn->voicebridge: $bigbluebuttonbn->voicebridge; |
|
83 | +$bbbsession['userlimit'] = bigbluebuttonbn_get_cfg_userlimit_editable() ? intval($bigbluebuttonbn->userlimit) : intval(bigbluebuttonbn_get_cfg_userlimit_default()); |
|
84 | +$bbbsession['voicebridge'] = ($bigbluebuttonbn->voicebridge > 0) ? 70000 + $bigbluebuttonbn->voicebridge : $bigbluebuttonbn->voicebridge; |
|
85 | 85 | $bbbsession['wait'] = $bigbluebuttonbn->wait; |
86 | 86 | $bbbsession['record'] = $bigbluebuttonbn->record; |
87 | -if( $bigbluebuttonbn->record ) |
|
88 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
87 | +if ($bigbluebuttonbn->record) |
|
88 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
89 | 89 | $bbbsession['tagging'] = $bigbluebuttonbn->tagging; |
90 | 90 | |
91 | 91 | $bbbsession['openingtime'] = $bigbluebuttonbn->openingtime; |
@@ -104,29 +104,29 @@ discard block |
||
104 | 104 | $bbbsession['originServerName'] = $parsedUrl['host']; |
105 | 105 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
106 | 106 | $bbbsession['originServerCommonName'] = ''; |
107 | -$bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.$module_version.')'; |
|
107 | +$bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . $module_version . ')'; |
|
108 | 108 | //////////////////////////////////////////////// |
109 | 109 | ///// BigBlueButton Session Setup Ends ///// |
110 | 110 | //////////////////////////////////////////////// |
111 | 111 | |
112 | 112 | // Validates if the BigBlueButton server is running |
113 | 113 | $serverVersion = bigbluebuttonbn_getServerVersion($bbbsession['endpoint']); |
114 | -if ( !isset($serverVersion) ) { //Server is not working |
|
115 | - if ( $bbbsession['administrator'] ) |
|
116 | - print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' ); |
|
117 | - else if ( $bbbsession['moderator'] ) |
|
118 | - print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
114 | +if (!isset($serverVersion)) { //Server is not working |
|
115 | + if ($bbbsession['administrator']) |
|
116 | + print_error('view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
117 | + else if ($bbbsession['moderator']) |
|
118 | + print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
119 | 119 | else |
120 | - print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
120 | + print_error('view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
121 | 121 | } else { |
122 | - $xml = bigbluebuttonbn_wrap_xml_load_file( bigbluebuttonbn_getMeetingsURL( $bbbsession['endpoint'], $bbbsession['shared_secret'] ) ); |
|
123 | - if ( !isset($xml) || !isset($xml->returncode) || $xml->returncode == 'FAILED' ){ // The shared secret is wrong |
|
124 | - if ( $bbbsession['administrator'] ) |
|
125 | - print_error( 'view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' ); |
|
126 | - else if ( $bbbsession['moderator'] ) |
|
127 | - print_error( 'view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
122 | + $xml = bigbluebuttonbn_wrap_xml_load_file(bigbluebuttonbn_getMeetingsURL($bbbsession['endpoint'], $bbbsession['shared_secret'])); |
|
123 | + if (!isset($xml) || !isset($xml->returncode) || $xml->returncode == 'FAILED') { // The shared secret is wrong |
|
124 | + if ($bbbsession['administrator']) |
|
125 | + print_error('view_error_unable_join', 'bigbluebuttonbn', $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
126 | + else if ($bbbsession['moderator']) |
|
127 | + print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
128 | 128 | else |
129 | - print_error( 'view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course ); |
|
129 | + print_error('view_error_unable_join_student', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
@@ -136,12 +136,12 @@ discard block |
||
136 | 136 | |
137 | 137 | // Print the page header |
138 | 138 | $PAGE->set_context($context); |
139 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
139 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
140 | 140 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
141 | 141 | $PAGE->set_cacheable(false); |
142 | 142 | $PAGE->set_heading($course->fullname); |
143 | 143 | |
144 | -if( $bigbluebuttonbn->newwindow == 1 ) { |
|
144 | +if ($bigbluebuttonbn->newwindow == 1) { |
|
145 | 145 | $PAGE->blocks->show_only_fake_blocks(); |
146 | 146 | |
147 | 147 | } else { |
@@ -149,14 +149,14 @@ discard block |
||
149 | 149 | } |
150 | 150 | |
151 | 151 | // Validate if the user is in a role allowed to join |
152 | -if ( !has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context) ) { |
|
152 | +if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
|
153 | 153 | echo $OUTPUT->header(); |
154 | 154 | if (isguestuser()) { |
155 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
156 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
155 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
156 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
157 | 157 | } else { |
158 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
159 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
158 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
159 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | echo $OUTPUT->footer(); |
@@ -164,30 +164,30 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | // Operation URLs |
167 | -$bbbsession['courseURL'] = $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course; |
|
168 | -$bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id.'&bn='.$bbbsession['bigbluebuttonbn']->id; |
|
169 | -$bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_ready'; |
|
170 | -$bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$id.'&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; |
|
167 | +$bbbsession['courseURL'] = $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course; |
|
168 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
|
169 | +$bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_ready'; |
|
170 | +$bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $id . '&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
171 | 171 | |
172 | 172 | // Output starts here |
173 | 173 | echo $OUTPUT->header(); |
174 | 174 | |
175 | 175 | /// find out current groups mode |
176 | 176 | $groupmode = groups_get_activity_groupmode($bbbsession['cm']); |
177 | -if ($groupmode == NOGROUPS ) { //No groups mode |
|
178 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.$bbbsession['bigbluebuttonbn']->id; |
|
177 | +if ($groupmode == NOGROUPS) { //No groups mode |
|
178 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . $bbbsession['bigbluebuttonbn']->id; |
|
179 | 179 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
180 | 180 | |
181 | 181 | } else { // Separate or visible groups mode |
182 | 182 | echo $OUTPUT->box_start('generalbox boxaligncenter'); |
183 | - echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn').'</div>'; |
|
183 | + echo '<br><div class="alert alert-warning">' . get_string('view_groups_selection_warning', 'bigbluebuttonbn') . '</div>'; |
|
184 | 184 | echo $OUTPUT->box_end(); |
185 | 185 | |
186 | 186 | $bbbsession['group'] = groups_get_activity_group($bbbsession['cm'], true); |
187 | - if ($groupmode == SEPARATEGROUPS ) { |
|
188 | - groups_print_activity_menu($cm, $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, true); |
|
189 | - if( $bbbsession['group'] == 0 ) { |
|
190 | - if ( $bbbsession['administrator'] ) { |
|
187 | + if ($groupmode == SEPARATEGROUPS) { |
|
188 | + groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id, false, true); |
|
189 | + if ($bbbsession['group'] == 0) { |
|
190 | + if ($bbbsession['administrator']) { |
|
191 | 191 | $my_groups = groups_get_all_groups($bbbsession['course']->id); |
192 | 192 | } else { |
193 | 193 | $my_groups = groups_get_activity_allowed_groups($bbbsession['cm']); |
@@ -197,15 +197,15 @@ discard block |
||
197 | 197 | } |
198 | 198 | |
199 | 199 | } else { |
200 | - groups_print_activity_menu($cm, $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id); |
|
200 | + groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id); |
|
201 | 201 | } |
202 | 202 | |
203 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.$bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']'; |
|
204 | - if( $bbbsession['group'] > 0 ) |
|
203 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']'; |
|
204 | + if ($bbbsession['group'] > 0) |
|
205 | 205 | $group_name = groups_get_group_name($bbbsession['group']); |
206 | 206 | else |
207 | 207 | $group_name = get_string('allparticipants'); |
208 | - $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$group_name.')'; |
|
208 | + $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $group_name . ')'; |
|
209 | 209 | } |
210 | 210 | // Metadata (context) |
211 | 211 | $bbbsession['contextActivityName'] = $bbbsession['meetingname']; |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | |
215 | 215 | $bigbluebuttonbn_activity = 'open'; |
216 | 216 | $now = time(); |
217 | -if (!empty($bigbluebuttonbn->openingtime) && $now < $bigbluebuttonbn->openingtime ) { |
|
217 | +if (!empty($bigbluebuttonbn->openingtime) && $now < $bigbluebuttonbn->openingtime) { |
|
218 | 218 | //ACTIVITY HAS NOT BEEN OPENED |
219 | 219 | $bigbluebuttonbn_activity = 'not_started'; |
220 | 220 | |
@@ -238,11 +238,11 @@ discard block |
||
238 | 238 | 'activity' => $bigbluebuttonbn_activity, |
239 | 239 | 'meetingid' => $bbbsession['meetingid'], |
240 | 240 | 'bigbluebuttonbnid' => $bbbsession['bigbluebuttonbn']->id, |
241 | - 'ping_interval' => ($waitformoderator_ping_interval > 0? $waitformoderator_ping_interval * 1000: 15000), |
|
241 | + 'ping_interval' => ($waitformoderator_ping_interval > 0 ? $waitformoderator_ping_interval * 1000 : 15000), |
|
242 | 242 | 'userlimit' => $bbbsession['userlimit'], |
243 | 243 | 'locales' => bigbluebuttonbn_get_locales_for_ui(), |
244 | - 'opening' => ($bbbsession['openingtime'])? get_string('mod_form_field_openingtime','bigbluebuttonbn').': '.userdate($bbbsession['openingtime']) : '', |
|
245 | - 'closing' => ($bbbsession['closingtime'])? get_string('mod_form_field_closingtime','bigbluebuttonbn').': '.userdate($bbbsession['closingtime']) : '' |
|
244 | + 'opening' => ($bbbsession['openingtime']) ? get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . userdate($bbbsession['openingtime']) : '', |
|
245 | + 'closing' => ($bbbsession['closingtime']) ? get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . userdate($bbbsession['closingtime']) : '' |
|
246 | 246 | ); |
247 | 247 | |
248 | 248 | $PAGE->requires->data_for_js('bigbluebuttonbn', $jsVars); |
@@ -269,13 +269,13 @@ discard block |
||
269 | 269 | echo $OUTPUT->box_end(); |
270 | 270 | |
271 | 271 | echo $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
272 | - echo '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
272 | + echo '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
273 | 273 | echo $OUTPUT->box_end(); |
274 | 274 | |
275 | - if ( $activity == 'not_started' ) { |
|
275 | + if ($activity == 'not_started') { |
|
276 | 276 | // Do nothing |
277 | 277 | } else { |
278 | - if ( $activity == 'ended' ) { |
|
278 | + if ($activity == 'ended') { |
|
279 | 279 | bigbluebuttonbn_view_ended($bbbsession); |
280 | 280 | } else { |
281 | 281 | bigbluebuttonbn_view_joining($bbbsession); |
@@ -287,29 +287,29 @@ discard block |
||
287 | 287 | |
288 | 288 | function bigbluebuttonbn_view_joining($bbbsession) { |
289 | 289 | |
290 | - if( $bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator']) ){ |
|
291 | - echo ''. |
|
292 | - '<div id="panelContent" class="hidden">'."\n". |
|
293 | - ' <div class="yui3-widget-bd">'."\n". |
|
294 | - ' <form>'."\n". |
|
295 | - ' <fieldset>'."\n". |
|
296 | - ' <input type="hidden" name="join" id="meeting_join_url" value="">'."\n". |
|
297 | - ' <input type="hidden" name="message" id="meeting_message" value="">'."\n". |
|
298 | - ' <div>'."\n". |
|
299 | - ' <label for="name">'.get_string('view_recording_name', 'bigbluebuttonbn').'</label><br/>'."\n". |
|
300 | - ' <input type="text" name="name" id="recording_name" placeholder="">'."\n". |
|
301 | - ' </div><br>'."\n". |
|
302 | - ' <div>'."\n". |
|
303 | - ' <label for="description">'.get_string('view_recording_description', 'bigbluebuttonbn').'</label><br/>'."\n". |
|
304 | - ' <input type="text" name="description" id="recording_description" value="" placeholder="">'."\n". |
|
305 | - ' </div><br>'."\n". |
|
306 | - ' <div>'."\n". |
|
307 | - ' <label for="tags">'.get_string('view_recording_tags', 'bigbluebuttonbn').'</label><br/>'."\n". |
|
308 | - ' <input type="text" name="tags" id="recording_tags" value="" placeholder="">'."\n". |
|
309 | - ' </div>'."\n". |
|
310 | - ' </fieldset>'."\n". |
|
311 | - ' </form>'."\n". |
|
312 | - ' </div>'."\n". |
|
290 | + if ($bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator'])) { |
|
291 | + echo '' . |
|
292 | + '<div id="panelContent" class="hidden">' . "\n" . |
|
293 | + ' <div class="yui3-widget-bd">' . "\n" . |
|
294 | + ' <form>' . "\n" . |
|
295 | + ' <fieldset>' . "\n" . |
|
296 | + ' <input type="hidden" name="join" id="meeting_join_url" value="">' . "\n" . |
|
297 | + ' <input type="hidden" name="message" id="meeting_message" value="">' . "\n" . |
|
298 | + ' <div>' . "\n" . |
|
299 | + ' <label for="name">' . get_string('view_recording_name', 'bigbluebuttonbn') . '</label><br/>' . "\n" . |
|
300 | + ' <input type="text" name="name" id="recording_name" placeholder="">' . "\n" . |
|
301 | + ' </div><br>' . "\n" . |
|
302 | + ' <div>' . "\n" . |
|
303 | + ' <label for="description">' . get_string('view_recording_description', 'bigbluebuttonbn') . '</label><br/>' . "\n" . |
|
304 | + ' <input type="text" name="description" id="recording_description" value="" placeholder="">' . "\n" . |
|
305 | + ' </div><br>' . "\n" . |
|
306 | + ' <div>' . "\n" . |
|
307 | + ' <label for="tags">' . get_string('view_recording_tags', 'bigbluebuttonbn') . '</label><br/>' . "\n" . |
|
308 | + ' <input type="text" name="tags" id="recording_tags" value="" placeholder="">' . "\n" . |
|
309 | + ' </div>' . "\n" . |
|
310 | + ' </fieldset>' . "\n" . |
|
311 | + ' </form>' . "\n" . |
|
312 | + ' </div>' . "\n" . |
|
313 | 313 | '</div>'; |
314 | 314 | } |
315 | 315 | } |
@@ -317,26 +317,26 @@ discard block |
||
317 | 317 | function bigbluebuttonbn_view_ended($bbbsession) { |
318 | 318 | global $OUTPUT; |
319 | 319 | |
320 | - if( !is_null($bbbsession['presentation']['url']) ) { |
|
320 | + if (!is_null($bbbsession['presentation']['url'])) { |
|
321 | 321 | $attributes = array('title' => $bbbsession['presentation']['name']); |
322 | 322 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
323 | 323 | |
324 | - echo '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
325 | - ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
|
326 | - ''.$OUTPUT->action_link($bbbsession['presentation']['url'], $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
324 | + echo '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
325 | + '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' . |
|
326 | + '' . $OUTPUT->action_link($bbbsession['presentation']['url'], $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
327 | 327 | } |
328 | 328 | } |
329 | 329 | |
330 | 330 | function bigbluebuttonbn_view_recordings($bbbsession) { |
331 | 331 | global $CFG; |
332 | 332 | |
333 | - if( isset($bbbsession['record']) && $bbbsession['record'] ) { |
|
334 | - $output = html_writer::tag('h4', get_string('view_section_title_recordings', 'bigbluebuttonbn') ); |
|
333 | + if (isset($bbbsession['record']) && $bbbsession['record']) { |
|
334 | + $output = html_writer::tag('h4', get_string('view_section_title_recordings', 'bigbluebuttonbn')); |
|
335 | 335 | |
336 | - $meetingID=''; |
|
336 | + $meetingID = ''; |
|
337 | 337 | $results = bigbluebuttonbn_getRecordedMeetings($bbbsession['course']->id, $bbbsession['bigbluebuttonbn']->id); |
338 | 338 | |
339 | - if( $results ){ |
|
339 | + if ($results) { |
|
340 | 340 | //Eliminates duplicates |
341 | 341 | $mIDs = array(); |
342 | 342 | foreach ($results as $result) { |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | } |
351 | 351 | |
352 | 352 | // Get actual recordings |
353 | - if ( $meetingID != '' ) { |
|
353 | + if ($meetingID != '') { |
|
354 | 354 | $recordings = bigbluebuttonbn_getRecordingsArray($meetingID, $bbbsession['endpoint'], $bbbsession['shared_secret']); |
355 | 355 | } else { |
356 | 356 | $recordings = Array(); |
@@ -358,12 +358,12 @@ discard block |
||
358 | 358 | // Get recording links |
359 | 359 | $recordings_imported = bigbluebuttonbn_getRecordingsImportedArray($bbbsession['course']->id, $bbbsession['bigbluebuttonbn']->id); |
360 | 360 | // Merge the recordings |
361 | - $recordings = array_merge( $recordings, $recordings_imported ); |
|
361 | + $recordings = array_merge($recordings, $recordings_imported); |
|
362 | 362 | // Render the table |
363 | - $output .= bigbluebutton_output_recording_table($bbbsession, $recordings)."\n"; |
|
363 | + $output .= bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n"; |
|
364 | 364 | |
365 | - if ( $bbbsession['managerecordings'] && bigbluebuttonbn_get_cfg_importrecordings_enabled() ) { |
|
366 | - $button_import_recordings = html_writer::tag( 'input', '', array('type' => 'button', 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.$bbbsession['bigbluebuttonbn']->id.'\'') ); |
|
365 | + if ($bbbsession['managerecordings'] && bigbluebuttonbn_get_cfg_importrecordings_enabled()) { |
|
366 | + $button_import_recordings = html_writer::tag('input', '', array('type' => 'button', 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
367 | 367 | $output .= html_writer::start_tag('br'); |
368 | 368 | $output .= html_writer::tag('span', $button_import_recordings, ['id'=>"import_recording_links_button"]); |
369 | 369 | $output .= html_writer::tag('span', '', ['id'=>"import_recording_links_table"]); |
@@ -38,8 +38,8 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
43 | 43 | return get_string('event_recording_published_description', 'bigbluebuttonbn', $a); |
44 | 44 | } |
45 | 45 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
41 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
42 | 42 | return get_string('event_meeting_ended_description', 'bigbluebuttonbn', $a); |
43 | 43 | } |
44 | 44 |
@@ -38,8 +38,8 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
43 | 43 | return get_string('event_recording_published_description', 'bigbluebuttonbn', $a); |
44 | 44 | } |
45 | 45 |
@@ -38,8 +38,8 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
43 | 43 | return get_string('event_recording_published_description', 'bigbluebuttonbn', $a); |
44 | 44 | } |
45 | 45 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
41 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
42 | 42 | return get_string('event_meeting_ended_description', 'bigbluebuttonbn', $a); |
43 | 43 | } |
44 | 44 |