function bbb_link in BigBlueButton 7
Same name and namespace in other branches
- 6 bbb.module \bbb_link()
Implement HOOK_link().
File
- ./
bbb.module, line 480 - Big Blue Button - Enables universities and colleges to deliver a high-quality learning experience.
Code
function bbb_link($type, $object, $teaser = FALSE) {
$links = array();
if ($type == 'node' && bbb_is_meeting_type($object->type)) {
$show = variable_get('bbb_content_type_show_links_' . $object->type, FALSE);
if (!$teaser && $show) {
$meeting = bbb_get_meeting($object->nid);
if (user_access('attend meetings') || user_access('administer big blue button')) {
$links['bbb_meeting_attend'] = array(
'title' => t('Attend meeting'),
'href' => "node/{$object->nid}/meeting/attend",
);
}
if (user_access('moderate meetings') || user_access('administer big blue button') || $user->uid == $node->uid && user_access('moderate own meetings')) {
$links['bbb_meeting_moderate'] = array(
'title' => t('Moderate meeting'),
'href' => "node/{$object->nid}/meeting/moderate",
);
}
if (user_access('moderate meetings') || user_access('administer big blue button') || $user->uid == $node->uid && user_access('moderate own meetings') && $meeting->running) {
$links['bbb_meeting_end'] = array(
'title' => t('Terminate meeting'),
'href' => "node/{$object->nid}/meeting/end-confirm",
);
}
}
}
return $links;
}