|
@@ -24,8 +24,8 @@ discard block |
|
|
block discarded – undo |
|
24
|
24
|
* @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com) |
|
25
|
25
|
*/ |
|
26
|
26
|
|
|
27
|
|
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
28
|
|
-require_once(dirname(__FILE__).'/locallib.php'); |
|
|
27
|
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
|
28
|
+require_once(dirname(__FILE__) . '/locallib.php'); |
|
29
|
29
|
|
|
30
|
30
|
$id = required_param('id', PARAM_INT); |
|
31
|
31
|
$bn = optional_param('n', 0, PARAM_INT); |
|
@@ -60,19 +60,19 @@ discard block |
|
|
block discarded – undo |
|
60
|
60
|
if (is_null($serverversion)) { |
|
61
|
61
|
if ($bbbsession['administrator']) { |
|
62
|
62
|
print_error('view_error_unable_join', 'bigbluebuttonbn', |
|
63
|
|
- $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
|
63
|
+ $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
64
|
64
|
exit; |
|
65
|
65
|
} |
|
66
|
66
|
if ($bbbsession['moderator']) { |
|
67
|
67
|
print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
|
68
|
|
- $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
|
68
|
+ $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
69
|
69
|
exit; |
|
70
|
70
|
} |
|
71
|
71
|
print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
|
72
|
|
- $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
|
72
|
+ $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
73
|
73
|
exit; |
|
74
|
74
|
} |
|
75
|
|
-$bbbsession['serverversion'] = (string) $serverversion; |
|
|
75
|
+$bbbsession['serverversion'] = (string)$serverversion; |
|
76
|
76
|
|
|
77
|
77
|
// Mark viewed by user (if required). |
|
78
|
78
|
$completion = new completion_info($course); |
|
@@ -80,7 +80,7 @@ discard block |
|
|
block discarded – undo |
|
80
|
80
|
|
|
81
|
81
|
// Print the page header. |
|
82
|
82
|
$PAGE->set_context($context); |
|
83
|
|
-$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
|
83
|
+$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
84
|
84
|
$PAGE->set_title(format_string($bigbluebuttonbn->name)); |
|
85
|
85
|
$PAGE->set_cacheable(false); |
|
86
|
86
|
$PAGE->set_heading($course->fullname); |
|
@@ -90,11 +90,11 @@ discard block |
|
|
block discarded – undo |
|
90
|
90
|
if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
|
91
|
91
|
echo $OUTPUT->header(); |
|
92
|
92
|
if (isguestuser()) { |
|
93
|
|
- echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
94
|
|
- get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
|
93
|
+ echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
|
94
|
+ get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
95
|
95
|
} else { |
|
96
|
|
- echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
97
|
|
- get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
|
96
|
+ echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
|
97
|
+ get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
98
|
98
|
} |
|
99
|
99
|
echo $OUTPUT->footer(); |
|
100
|
100
|
exit; |
|
@@ -102,7 +102,7 @@ discard block |
|
|
block discarded – undo |
|
102
|
102
|
|
|
103
|
103
|
// Operation URLs. |
|
104
|
104
|
$bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
105
|
|
-$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
|
105
|
+$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
106
|
106
|
'&bn=' . $bbbsession['bigbluebuttonbn']->id; |
|
107
|
107
|
$bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
|
108
|
108
|
'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
@@ -122,7 +122,7 @@ discard block |
|
|
block discarded – undo |
|
122
|
122
|
echo $OUTPUT->footer(); |
|
123
|
123
|
|
|
124
|
124
|
// Shows version as a comment. |
|
125
|
|
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
|
125
|
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
126
|
126
|
|
|
127
|
127
|
// Initialize session variable used across views. |
|
128
|
128
|
$SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
|
@@ -152,7 +152,7 @@ discard block |
|
|
block discarded – undo |
|
152
|
152
|
$bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
|
153
|
153
|
$bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
|
154
|
154
|
// Database info related to the activity. |
|
155
|
|
- $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
|
155
|
+ $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
156
|
156
|
$bbbsession['bigbluebuttonbn']->id; |
|
157
|
157
|
$bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
|
158
|
158
|
$bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
|
@@ -172,7 +172,7 @@ discard block |
|
|
block discarded – undo |
|
172
|
172
|
$bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
|
173
|
173
|
} |
|
174
|
174
|
if ($bbbsession['bigbluebuttonbn']->record) { |
|
175
|
|
- $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
|
175
|
+ $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
176
|
176
|
} |
|
177
|
177
|
$bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
|
178
|
178
|
$bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
|
@@ -185,7 +185,7 @@ discard block |
|
|
block discarded – undo |
|
185
|
185
|
$bbbsession['originServerName'] = $parsedurl['host']; |
|
186
|
186
|
$bbbsession['originServerUrl'] = $CFG->wwwroot; |
|
187
|
187
|
$bbbsession['originServerCommonName'] = ''; |
|
188
|
|
- $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
|
188
|
+ $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
189
|
189
|
$bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
|
190
|
190
|
} |
|
191
|
191
|
|
|
@@ -257,8 +257,8 @@ discard block |
|
|
block discarded – undo |
|
257
|
257
|
$groupname = groups_get_group_name($bbbsession['group']); |
|
258
|
258
|
} |
|
259
|
259
|
// Assign group default values. |
|
260
|
|
- $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
261
|
|
- $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
|
260
|
+ $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
|
261
|
+ $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
262
|
262
|
if (count($groups) == 0) { |
|
263
|
263
|
// Only the All participants group exists. |
|
264
|
264
|
bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
|
@@ -269,7 +269,7 @@ discard block |
|
|
block discarded – undo |
|
269
|
269
|
return; |
|
270
|
270
|
} |
|
271
|
271
|
bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
|
272
|
|
- $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
|
272
|
+ $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
273
|
273
|
groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
|
274
|
274
|
echo '<br><br>'; |
|
275
|
275
|
} |
|
@@ -316,7 +316,7 @@ discard block |
|
|
block discarded – undo |
|
316
|
316
|
'locale' => bigbluebuttonbn_get_localcode(), 'profile_features' => $typeprofiles[0]['features']); |
|
317
|
317
|
// Renders general warning when configured. |
|
318
|
318
|
$cfg = \mod_bigbluebuttonbn\locallib\config::get_options(); |
|
319
|
|
- $output = ''; |
|
|
319
|
+ $output = ''; |
|
320
|
320
|
if (bigbluebuttonbn_view_warning_shown($bbbsession)) { |
|
321
|
321
|
$output .= bigbluebuttonbn_view_render_warning( |
|
322
|
322
|
(string)$cfg['general_warning_message'], |
|
@@ -340,7 +340,7 @@ discard block |
|
|
block discarded – undo |
|
340
|
340
|
$recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
|
341
|
341
|
$output .= bigbluebuttonbn_view_render_warning($recordingsdisabled, 'danger'); |
|
342
|
342
|
} |
|
343
|
|
- echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
|
343
|
+ echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
344
|
344
|
$PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
|
345
|
345
|
} |
|
346
|
346
|
|
|
@@ -400,7 +400,7 @@ discard block |
|
|
block discarded – undo |
|
400
|
400
|
* |
|
401
|
401
|
* @return string |
|
402
|
402
|
*/ |
|
403
|
|
-function bigbluebuttonbn_view_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
|
403
|
+function bigbluebuttonbn_view_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
404
|
404
|
global $OUTPUT; |
|
405
|
405
|
$output = "\n"; |
|
406
|
406
|
// Evaluates if config_warning is enabled. |
|
@@ -408,14 +408,14 @@ discard block |
|
|
block discarded – undo |
|
408
|
408
|
return $output; |
|
409
|
409
|
} |
|
410
|
410
|
$output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
411
|
|
- 'bigbluebuttonbn_view_general_warning')."\n"; |
|
412
|
|
- $output .= ' '.$message."\n"; |
|
413
|
|
- $output .= ' <div class="singlebutton">'."\n"; |
|
|
411
|
+ 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
|
412
|
+ $output .= ' ' . $message . "\n"; |
|
|
413
|
+ $output .= ' <div class="singlebutton">' . "\n"; |
|
414
|
414
|
if (!empty($href)) { |
|
415
|
415
|
$output .= bigbluebuttonbn_view_render_warning_button($href, $text, $class); |
|
416
|
416
|
} |
|
417
|
|
- $output .= ' </div>'."\n"; |
|
418
|
|
- $output .= $OUTPUT->box_end()."\n"; |
|
|
417
|
+ $output .= ' </div>' . "\n"; |
|
|
418
|
+ $output .= $OUTPUT->box_end() . "\n"; |
|
419
|
419
|
return $output; |
|
420
|
420
|
} |
|
421
|
421
|
|
|
@@ -435,11 +435,11 @@ discard block |
|
|
block discarded – undo |
|
435
|
435
|
if ($class == '') { |
|
436
|
436
|
$class = 'btn btn-secondary'; |
|
437
|
437
|
} |
|
438
|
|
- $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
439
|
|
- $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
440
|
|
- $output .= ' title=""'."\n"; |
|
441
|
|
- $output .= ' >' . $text . '</button>'."\n"; |
|
442
|
|
- $output .= ' </form>'."\n"; |
|
|
438
|
+ $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
|
439
|
+ $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
|
440
|
+ $output .= ' title=""' . "\n"; |
|
|
441
|
+ $output .= ' >' . $text . '</button>' . "\n"; |
|
|
442
|
+ $output .= ' </form>' . "\n"; |
|
443
|
443
|
return $output; |
|
444
|
444
|
} |
|
445
|
445
|
|
|
@@ -457,12 +457,12 @@ discard block |
|
|
block discarded – undo |
|
457
|
457
|
// JavaScript variables for room. |
|
458
|
458
|
$openingtime = ''; |
|
459
|
459
|
if ($bbbsession['openingtime']) { |
|
460
|
|
- $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
|
460
|
+ $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
461
|
461
|
userdate($bbbsession['openingtime']); |
|
462
|
462
|
} |
|
463
|
463
|
$closingtime = ''; |
|
464
|
464
|
if ($bbbsession['closingtime']) { |
|
465
|
|
- $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
|
465
|
+ $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
466
|
466
|
userdate($bbbsession['closingtime']); |
|
467
|
467
|
} |
|
468
|
468
|
$jsvars += array( |
|
@@ -479,7 +479,7 @@ discard block |
|
|
block discarded – undo |
|
479
|
479
|
$output .= $OUTPUT->box_end(); |
|
480
|
480
|
// Action button box. |
|
481
|
481
|
$output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
|
482
|
|
- $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
|
482
|
+ $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
483
|
483
|
$output .= $OUTPUT->box_end(); |
|
484
|
484
|
if ($activity == 'ended') { |
|
485
|
485
|
$output .= bigbluebuttonbn_view_ended($bbbsession); |
|
@@ -528,7 +528,7 @@ discard block |
|
|
block discarded – undo |
|
528
|
528
|
// If there are meetings with recordings load the data to the table. |
|
529
|
529
|
if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
|
530
|
530
|
// Render a plain html table. |
|
531
|
|
- return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
|
531
|
+ return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
532
|
532
|
} |
|
533
|
533
|
// JavaScript variables for recordings with YUI. |
|
534
|
534
|
$jsvars += array( |
|
@@ -556,8 +556,8 @@ discard block |
|
|
block discarded – undo |
|
556
|
556
|
array('type' => 'button', |
|
557
|
557
|
'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
558
|
558
|
'class' => 'btn btn-secondary', |
|
559
|
|
- 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
560
|
|
- $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
|
559
|
+ 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
|
560
|
+ $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
561
|
561
|
$output = html_writer::start_tag('br'); |
|
562
|
562
|
$output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
|
563
|
563
|
$output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
|
@@ -576,10 +576,10 @@ discard block |
|
|
block discarded – undo |
|
576
|
576
|
if (!is_null($bbbsession['presentation']['url'])) { |
|
577
|
577
|
$attributes = array('title' => $bbbsession['presentation']['name']); |
|
578
|
578
|
$icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
|
579
|
|
- return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
580
|
|
- $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
|
579
|
+ return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
|
580
|
+ $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
581
|
581
|
$OUTPUT->action_link($bbbsession['presentation']['url'], |
|
582
|
|
- $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
|
582
|
+ $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
583
|
583
|
} |
|
584
|
584
|
return ''; |
|
585
|
585
|
} |