echo '<td style="width: ' . $blocks_preferred_width . 'px;" id="left-column">'; blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT); echo '</td>'; } echo '<td id="middle-column">'; print_heading(format_string($bigbluebutton->meetingname)); /// Get all of the variables required by Web conference $ip = $CFG->wc_serverhost; $securitySalt = $CFG->wc_securitysalt; $provider = $CFG->wc_provider; $accountid = $CFG->wc_accountid; $accountpwd = $CFG->wc_accountpwd; $serverid = "FAILURE"; // See if Moodle can authenticate against the BigBlueButton server if ($provider == "dualcode") { $serverid = dc_authenticate($accountid, $accountpwd); } if ($provider == "self" || $serverid != "FAILURE") { $fullname = urlencode($USER->firstname . " " . $USER->lastname); $meetingname = urlencode(get_field('bigbluebutton', 'meetingname', 'id', $bigbluebutton->id)); $meetingid = urlencode(get_field('bigbluebutton', 'meetingid', 'id', $bigbluebutton->id)); $attendeePW = urlencode(get_field('bigbluebutton', 'attendeepw', 'id', $bigbluebutton->id)); $moderatorPW = urlencode(get_field('bigbluebutton', 'moderatorpw', 'id', $bigbluebutton->id)); $loginRule = urlencode(get_field('bigbluebutton', 'autologin', 'id', $bigbluebutton->id)); $newwindow = urlencode(get_field('bigbluebutton', 'newwindow', 'id', $bigbluebutton->id)); $welcomeMsg = urlencode(get_field('bigbluebutton', 'welcomemsg', 'id', $bigbluebutton->id)); $logoutURL = urlencode(wc_currentPageURL()); $myURL = wc_currentPageURL(); /// Create string to see if the meeting is running if ($provider == "self") { $isRunningURL = wc_isMeetingRunningURL($ip, $securitySalt, $meetingid);
function dc_joinMeetingURL($myAccountID, $myAccountPWD, $myName, $myMeetingID, $myPassword) { $myIP = dc_authenticate($myAccountID, $myAccountPWD); if ($myIP != "FAILURE") { $joinAPI = "/bigbluebutton/api/join?"; $queryStr = "fullName=" . $myName . "&meetingID=" . $myMeetingID . "&password="******"http://" . $myIP . $joinAPI . $queryStr . "&checksum=" . $checksum; return $createStr; } else { return "FAILURE"; } }