?> "; } } </script> <?php } else { // // Join as Viewer, no wait check // print "<br />" . get_string('view_login_viewer', 'bigbluebuttonbn') . "<br /><br />"; print "<center><img src='loading.gif' /></center>"; $response = BigBlueButtonBN::createMeetingArray("", $bigbluebuttonbn->meetingid, "", $modPW, $viewerPW, $salt, $url, $logoutURL); if (!$response) { // If the server is unreachable, then prompts the user of the necessary action error('Unable to join the meeting. Please contact your administrator.'); } if ($response['returncode'] == "FAILED") { // The meeting was not created if ($response['messageKey'] == "checksumError") { error(get_string('index_checksum_error', 'bigbluebuttonbn')); } else { error($response['message']); } } $joinURL = BigBlueButtonBN::joinURL($bigbluebuttonbn->meetingid, $username, $viewerPW, $salt, $url, $userID); redirect($joinURL); } } // Finish the page print_footer($course);
/** *This method creates a meeting and returnS the join url for moderators. * *@param username *@param meetingID -- the unique meeting identifier used to store the meeting in the bigbluebuttonbn server *@param welcomeString -- the welcome message to be displayed when a user logs in to the meeting *@param mPW -- the moderator password of the meeting *@param aPW -- the attendee password of the meeting *@param SALT -- the security salt of the bigbluebuttonbn server *@param URL -- the url of the bigbluebuttonbn server *@param logoutURL -- the url the user should be redirected to when they logout of bigbluebuttonbn *@param record -- the flag which indicate if the meetings will be recorded or not record=true|false, default false * *@return The joinURL if successful or an error message if unsuccessful */ public static function createMeetingAndGetJoinURL($username, $meetingID, $welcomeString, $mPW, $aPW, $SALT, $URL, $logoutURL, $record = 'false', $duration = 0, $voiceBridge = 0, $metadata = array()) { $xml = BigBlueButtonBN::_wrap_simplexml_load_file(BigBlueButtonBN::createMeetingURL($username, $meetingID, $aPW, $mPW, $welcomeString, $logoutURL, $SALT, $URL, $record, $duration, $voiceBridge, $metadata)); if ($xml && $xml->returncode == 'SUCCESS') { return BigBlueButtonBN::joinURL($meetingID, $username, $mPW, $SALT, $URL); } else { if ($xml) { return $xml->messageKey . ' : ' . $xml->message; } else { return 'Unable to fetch URL ' . $url_create . $params . '&checksum=' . sha1("create" . $params . $SALT); } } }
print_error('view_error_no_group_student', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $course->id); echo $OUTPUT->footer(); exit; } } } $bbbsession['meetingid'] = $bigbluebuttonbn->meetingid . '[' . $bbbsession['group'] . ']'; if ($moderator) { // Take off the option visible groups $PAGE->requires->js_init_call('M.mod_bigbluebuttonbn.setusergroups'); } } if ($moderator) { $bbbsession['joinURL'] = BigBlueButtonBN::joinURL($bbbsession['meetingid'], $bbbsession['username'], $bbbsession['modPW'], $bbbsession['salt'], $bbbsession['url'], $bbbsession['userID']); } else { $bbbsession['joinURL'] = BigBlueButtonBN::joinURL($bbbsession['meetingid'], $bbbsession['username'], $bbbsession['viewerPW'], $bbbsession['salt'], $bbbsession['url'], $bbbsession['userID']); } echo '<script type="text/javascript" >var meetingid = "' . $bbbsession['meetingid'] . '";</script>' . "\n"; echo '<script type="text/javascript" >var joinurl = "' . $bbbsession['joinURL'] . '";</script>' . "\n"; if (!$bigbluebuttonbn->timeavailable) { if (!$bigbluebuttonbn->timedue || time() <= $bigbluebuttonbn->timedue) { //GO JOINING bigbluebuttonbn_view_joining($bbbsession); } else { //CALLING AFTER echo $OUTPUT->heading(get_string('bbbfinished', 'bigbluebuttonbn')); echo $OUTPUT->box_start('generalbox boxaligncenter', 'dates'); bigbluebuttonbn_view_after($bbbsession); echo $OUTPUT->box_end(); } } else {