@@ -301,12 +301,12 @@ |
||
301 | 301 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
302 | 302 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
303 | 303 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
304 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
304 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
305 | 305 | $str .= ' </div>'."\n"; |
306 | 306 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
307 | 307 | '</div>'."\n"; |
308 | 308 | $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
309 | - .'</div>'."\n"; |
|
309 | + .'</div>'."\n"; |
|
310 | 310 | $str .= '</div>'."\n"; |
311 | 311 | return $str; |
312 | 312 | } |
@@ -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 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $log->timecreated = time(); |
189 | 189 | $log->log = BIGBLUEBUTTONBN_LOG_EVENT_DELETE; |
190 | 190 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
191 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
191 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
192 | 192 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
193 | 193 | $log->meta = "{\"has_recordings\":false}"; |
194 | 194 | if (!empty($logs)) { |
@@ -211,10 +211,10 @@ discard block |
||
211 | 211 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
212 | 212 | global $DB; |
213 | 213 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
214 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), '*'); |
|
214 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), '*'); |
|
215 | 215 | if ($completed > 0) { |
216 | - return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. |
|
217 | - get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. |
|
216 | + return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
|
217 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
218 | 218 | get_string('view_message_times', 'bigbluebuttonbn'); |
219 | 219 | } |
220 | 220 | return ''; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) { |
230 | 230 | global $DB; |
231 | 231 | $completed = $DB->count_recorda('bigbluebuttonbn_logs', array('courseid' => $course->id, |
232 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), |
|
232 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), |
|
233 | 233 | '*', IGNORE_MULTIPLE); |
234 | 234 | return $completed > 0; |
235 | 235 | } |
@@ -298,16 +298,16 @@ discard block |
||
298 | 298 | if ($bigbluebuttonbn->visible) { |
299 | 299 | $classes = 'class="dimmed" '; |
300 | 300 | } |
301 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
302 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
303 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
304 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
305 | - $str .= ' </div>'."\n"; |
|
306 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
307 | - '</div>'."\n"; |
|
308 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
309 | - .'</div>'."\n"; |
|
310 | - $str .= '</div>'."\n"; |
|
301 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
302 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
303 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
304 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
305 | + $str .= ' </div>' . "\n"; |
|
306 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
307 | + '</div>' . "\n"; |
|
308 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
309 | + .'</div>' . "\n"; |
|
310 | + $str .= '</div>' . "\n"; |
|
311 | 311 | return $str; |
312 | 312 | } |
313 | 313 | |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | if (count($files) == 1) { |
463 | 463 | // Get the first (and only) file. |
464 | 464 | $file = reset($files); |
465 | - $filesrc = '/'.$file->get_filename(); |
|
465 | + $filesrc = '/' . $file->get_filename(); |
|
466 | 466 | } |
467 | 467 | return $filesrc; |
468 | 468 | } |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | if (!$filename) { |
513 | 513 | return false; |
514 | 514 | } |
515 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
515 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
516 | 516 | $fs = get_file_storage(); |
517 | 517 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
518 | 518 | if (!$file || $file->is_directory()) { |
@@ -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 | $bn = optional_param('n', 0, PARAM_INT); |
@@ -56,21 +56,21 @@ discard block |
||
56 | 56 | if (is_null($serverversion)) { |
57 | 57 | if ($bbbsession['administrator']) { |
58 | 58 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
59 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
59 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
60 | 60 | exit; |
61 | 61 | } |
62 | 62 | |
63 | 63 | if ($bbbsession['moderator']) { |
64 | 64 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
65 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
65 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
66 | 66 | exit; |
67 | 67 | } |
68 | 68 | |
69 | 69 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
70 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
70 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
71 | 71 | exit; |
72 | 72 | } |
73 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
73 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
74 | 74 | |
75 | 75 | // Mark viewed by user (if required). |
76 | 76 | $completion = new completion_info($course); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | // Print the page header. |
80 | 80 | $PAGE->set_context($context); |
81 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
81 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
82 | 82 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
83 | 83 | $PAGE->set_cacheable(false); |
84 | 84 | $PAGE->set_heading($course->fullname); |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
89 | 89 | echo $OUTPUT->header(); |
90 | 90 | if (isguestuser()) { |
91 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
92 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
91 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
92 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
93 | 93 | } else { |
94 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
95 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
94 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
95 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
96 | 96 | } |
97 | 97 | echo $OUTPUT->footer(); |
98 | 98 | exit; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | // Operation URLs. |
102 | 102 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
103 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
103 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
104 | 104 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
105 | 105 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
106 | 106 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | echo $OUTPUT->footer(); |
121 | 121 | |
122 | 122 | // Shows version as a comment. |
123 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
123 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
124 | 124 | |
125 | 125 | // Initialize session variable used across views. |
126 | 126 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $bbbsession['viewerPW'] = $bigbluebuttonbn->viewerpass; |
151 | 151 | |
152 | 152 | // Database info related to the activity. |
153 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
153 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
154 | 154 | $bbbsession['bigbluebuttonbn']->id; |
155 | 155 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
156 | 156 | $bbbsession['meetingdescription'] = $bigbluebuttonbn->intro; |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
172 | 172 | } |
173 | 173 | if ($bigbluebuttonbn->record) { |
174 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
174 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | $bbbsession['openingtime'] = $bigbluebuttonbn->openingtime; |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $bbbsession['originServerName'] = $parsedurl['host']; |
188 | 188 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
189 | 189 | $bbbsession['originServerCommonName'] = ''; |
190 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
190 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | function bigbluebuttonbn_view_bbbsession_roles($context, $userid) { |
@@ -249,9 +249,9 @@ discard block |
||
249 | 249 | } |
250 | 250 | |
251 | 251 | // Assign group default values. |
252 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
253 | - $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']'; |
|
254 | - $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')'; |
|
252 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
253 | + $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']'; |
|
254 | + $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')'; |
|
255 | 255 | |
256 | 256 | if (count($groups) == 0) { |
257 | 257 | // Only the All participants group exists. |
@@ -266,12 +266,12 @@ discard block |
||
266 | 266 | } |
267 | 267 | |
268 | 268 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'), 'warning'); |
269 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
269 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
270 | 270 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
271 | 271 | echo '<br><br>'; |
272 | 272 | } |
273 | 273 | |
274 | -function bigbluebuttonbn_view_message_box(&$bbbsession, $message, $type='warning', $onlymoderator=false) { |
|
274 | +function bigbluebuttonbn_view_message_box(&$bbbsession, $message, $type = 'warning', $onlymoderator = false) { |
|
275 | 275 | global $OUTPUT; |
276 | 276 | if ($onlymoderator && !$bbbsession['moderator'] && !$bbbsession['administrator']) { |
277 | 277 | return; |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | |
303 | 303 | // Renders general warning when configured. |
304 | 304 | $cfg = \mod_bigbluebuttonbn\locallib\config::get_options(); |
305 | - $output = bigbluebuttonbn_view_render_warning($cfg['general_warning_message'], 'info', |
|
305 | + $output = bigbluebuttonbn_view_render_warning($cfg['general_warning_message'], 'info', |
|
306 | 306 | (string)$cfg['general_warning_button_href'], |
307 | 307 | (string)$cfg['general_warning_button_text'], |
308 | 308 | (string)$cfg['general_warning_button_class']); |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | 'M.mod_bigbluebuttonbn.recordings.init', array($jsvars)); |
323 | 323 | } |
324 | 324 | |
325 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
325 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
326 | 326 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
327 | 327 | } |
328 | 328 | |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | return $output; |
348 | 348 | } |
349 | 349 | |
350 | -function bigbluebuttonbn_view_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
350 | +function bigbluebuttonbn_view_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
351 | 351 | global $OUTPUT; |
352 | 352 | $output = "\n"; |
353 | 353 | // Evaluates if config_warning is enabled. |
@@ -355,14 +355,14 @@ discard block |
||
355 | 355 | return $output; |
356 | 356 | } |
357 | 357 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
358 | - 'bigbluebuttonbn_view_general_warning')."\n"; |
|
359 | - $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>'.$message."\n"; |
|
360 | - $output .= ' <div class="singlebutton">'."\n"; |
|
358 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
359 | + $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>' . $message . "\n"; |
|
360 | + $output .= ' <div class="singlebutton">' . "\n"; |
|
361 | 361 | if (!empty($href)) { |
362 | 362 | $output .= bigbluebuttonbn_view_render_warning_button($href, $text, $class); |
363 | 363 | } |
364 | - $output .= ' </div>'."\n"; |
|
365 | - $output .= $OUTPUT->box_end()."\n"; |
|
364 | + $output .= ' </div>' . "\n"; |
|
365 | + $output .= $OUTPUT->box_end() . "\n"; |
|
366 | 366 | return $output; |
367 | 367 | } |
368 | 368 | |
@@ -373,11 +373,11 @@ discard block |
||
373 | 373 | if ($class == '') { |
374 | 374 | $class = 'btn btn-secondary'; |
375 | 375 | } |
376 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
377 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
378 | - $output .= ' title=""'."\n"; |
|
379 | - $output .= ' >' . $text . '</button>'."\n"; |
|
380 | - $output .= ' </form>'."\n"; |
|
376 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
377 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
378 | + $output .= ' title=""' . "\n"; |
|
379 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
380 | + $output .= ' </form>' . "\n"; |
|
381 | 381 | return $output; |
382 | 382 | } |
383 | 383 | |
@@ -387,12 +387,12 @@ discard block |
||
387 | 387 | // JavaScript variables for room. |
388 | 388 | $openingtime = ''; |
389 | 389 | if ($bbbsession['openingtime']) { |
390 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
390 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
391 | 391 | userdate($bbbsession['openingtime']); |
392 | 392 | } |
393 | 393 | $closingtime = ''; |
394 | 394 | if ($bbbsession['closingtime']) { |
395 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
395 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
396 | 396 | userdate($bbbsession['closingtime']); |
397 | 397 | } |
398 | 398 | $jsvars += array( |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | $output .= $OUTPUT->box_end(); |
410 | 410 | |
411 | 411 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
412 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
412 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
413 | 413 | $output .= $OUTPUT->box_end(); |
414 | 414 | |
415 | 415 | if ($activity == 'ended') { |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | |
436 | 436 | // Get recordings. |
437 | 437 | $recordings = array(); |
438 | - if ( bigbluebuttonbn_view_include_recordings($bbbsession) ) { |
|
438 | + if (bigbluebuttonbn_view_include_recordings($bbbsession)) { |
|
439 | 439 | $recordings = bigbluebuttonbn_get_recordings( |
440 | 440 | $bbbsession['course']->id, $bigbluebuttonbnid, $showroom, |
441 | 441 | $bbbsession['bigbluebuttonbn']->recordings_deleted |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | // If there are meetings with recordings load the data to the table. |
467 | 467 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
468 | 468 | // Render a plain html table. |
469 | - return bigbluebutton_output_recording_table($bbbsession, $recordings)."\n"; |
|
469 | + return bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n"; |
|
470 | 470 | } |
471 | 471 | |
472 | 472 | // JavaScript variables for recordings with YUI. |
@@ -486,8 +486,8 @@ discard block |
||
486 | 486 | array('type' => 'button', |
487 | 487 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
488 | 488 | 'class' => 'btn btn-secondary', |
489 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
490 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
489 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
490 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
491 | 491 | $output = html_writer::start_tag('br'); |
492 | 492 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
493 | 493 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -502,10 +502,10 @@ discard block |
||
502 | 502 | $attributes = array('title' => $bbbsession['presentation']['name']); |
503 | 503 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
504 | 504 | |
505 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
506 | - ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
|
507 | - ''.$OUTPUT->action_link($bbbsession['presentation']['url'], |
|
508 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
505 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
506 | + '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' . |
|
507 | + '' . $OUTPUT->action_link($bbbsession['presentation']['url'], |
|
508 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
509 | 509 | } |
510 | 510 | |
511 | 511 | return ''; |