|
@@ -84,8 +84,9 @@ discard block |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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
|
} |