function bbb_meeting_moderate in BigBlueButton 7
Same name and namespace in other branches
- 6 bbb.module \bbb_meeting_moderate()
Redirect to big blue button instance; Menu callback
Parameters
OBJECT $node: A Drupal node object
1 string reference to 'bbb_meeting_moderate'
- bbb_menu in ./
bbb.module - Implement HOOK_menu().
File
- ./
bbb.module, line 759 - Big Blue Button - Enables universities and colleges to deliver a high-quality learning experience.
Code
function bbb_meeting_moderate($node) {
global $user;
$url = array();
$mode = 'moderate';
$meeting = bbb_get_meeting($node->nid);
$params = array(
'meetingID' => $meeting->meetingID,
'password' => $meeting->moderatorPW,
);
$status = bbb_api_getMeetingInfo($params);
if ($status && property_exists($status, 'hasBeenForciblyEnded') && $status->hasBeenForciblyEnded == 'true') {
drupal_set_message('The meeting has been terminated and is not available for reopening.');
drupal_goto('node/' . $node->nid);
}
drupal_set_title($node->title);
// Implicitly create meeting
if (empty($meeting->initialized)) {
if ($data = bbb_create_meeting($node, (array) $params)) {
// Update local data
bbb_update_meeting($node, array_merge((array) $meeting, (array) $data));
}
}
if (BIGBLUEBUTTON_DISPLAY_MODE == 'blank') {
bbb_redirect($node, $mode);
}
$variables = array(
'meeting' => $meeting,
'mode' => $mode,
'height' => BIGBLUEBUTTON_DISPLAY_HEIGHT,
'width' => BIGBLUEBUTTON_DISPLAY_WIDTH,
);
return theme('bbb_meeting', $variables);
}