function bbb_meeting_attend in BigBlueButton 6
Same name and namespace in other branches
- 7 bbb.module \bbb_meeting_attend()
Redirect to big blue button instance; Menu callback
Parameters
OBJECT $node: A Drupal node object
1 string reference to 'bbb_meeting_attend'
- bbb_menu in ./
bbb.module - Implement HOOK_menu().
File
- ./
bbb.module, line 618 - Big Blue Button - Enables universities and colleges to deliver a high-quality learning experience.
Code
function bbb_meeting_attend($node) {
global $user;
$url = array();
$mode = 'attend';
$meeting = bbb_get_meeting($node->nid);
$params = array(
'meetingID' => $meeting->meetingID,
'password' => $meeting->moderatorPW,
);
$status = bbb_api_getMeetingInfo($params);
if ($status->hasBeenForciblyEnded == 'true') {
drupal_set_message('The meeting has been terminated and is not available for attending.');
drupal_goto('node/' . $node->nid);
}
drupal_set_title($node->title);
if ($meeting->running) {
if (BBB_DISPLAY_MODE == 'blank') {
bbb_redirect($node, $mode);
}
}
else {
drupal_add_js('var bbb_check_status_url = ' . drupal_to_js(url('node/' . $node->nid . '/meeting/status')), 'inline');
drupal_add_js(drupal_get_path('module', 'bbb') . '/js/check_status.bbb.js');
drupal_set_message(t('You signed up for this meeting. Please stay on this page, you will be redirected immediately after the meeting has started.'));
return node_show($node, NULL);
}
return theme('bbb_meeting', $meeting, $mode, BBB_DISPLAY_HEIGHT, BBB_DISPLAY_WIDTH);
}