function showLog() { require_once _base_ . '/lib/lib.form.php'; require_once _base_ . '/lib/lib.table.php'; $lang =& DoceboLanguage::createInstance('conference', 'lms'); $id = Get::req('id', DOTY_INT, 0); $conference = new Conference_Manager(); $room_info = $conference->roomInfo($id); $acl_man =& Docebo::user()->getAclManager(); cout(getTitleArea('') . '<div class="std_block">', 'content'); $room_log = array(); switch ($room_info['room_type']) { case 'teleskill': require_once $GLOBALS['where_scs'] . '/lib/lib.teleskill.php'; $teleskill = new Teleskill_Management(); $roomid = $teleskill->getRoomId($id); if (isset($_POST['update_log'])) { $teleskill->updateRoomLog($roomid); } $room_log = $teleskill->getRoomLog($roomid); break; } $tb = new Table(0, $lang->def('_ROOM_LOG'), $lang->def('_ROOM_LOG')); $cont_h = array($lang->def('_FULLNAME'), $lang->def('_ROLE'), $lang->def('_DATE'), $lang->def('_TOTAL_TIME'), $lang->def('_NUMBER_OF_ACCESS')); $type_h = array('', '', '', '', ''); $tb->setColsStyle($type_h); $tb->addHead($cont_h); foreach ($room_log as $log_row) { $user_info = $acl_man->getUser($log_row['idUser'], false); $cont = array(); if ($user_info[ACL_INFO_FIRSTNAME] !== '' && $user_info[ACL_INFO_LASTNAME]) { $cont[] = $user_info[ACL_INFO_FIRSTNAME] . ' ' . $user_info[ACL_INFO_LASTNAME] . ' (' . $acl_man->relativeId($user_info[ACL_INFO_USERID]) . ')'; } elseif ($user_info[ACL_INFO_FIRSTNAME] !== '') { $cont[] = $user_info[ACL_INFO_FIRSTNAME] . ' (' . $acl_man->relativeId($user_info[ACL_INFO_USERID]) . ')'; } elseif ($user_info[ACL_INFO_LASTNAME] !== '') { $cont[] = $user_info[ACL_INFO_LASTNAME] . ' (' . $acl_man->relativeId($user_info[ACL_INFO_USERID]) . ')'; } else { $cont[] = $acl_man->relativeId($user_info[ACL_INFO_USERID]); } $cont[] = $log_row['role'] == 1 ? $lang->def('_USER_ROLE') : $lang->def('_TUTOR_ROLE'); $cont[] = Format::date($log_row['date'], 'datetime'); $duration_s = 0; $duration_m = 0; $duration_h = 0; $duration = $log_row['duration']; $duration_s = $duration % 60; $duration -= $duration_s; if ($duration) { $duration_m = $duration % 3600 / 60; $duration -= $duration_m * 60; if ($duration) { $duration_h = $duration / 3600; } } $cont[] = $duration_h . ' ' . $lang->def('_HOURS') . ' ' . $duration_m . ' ' . $lang->def('_MINUTS') . ' ' . $duration_s . ' ' . $lang->def('_SECONDS'); $cont[] = $log_row['access']; $tb->addBody($cont); } $tb->addActionAdd(Form::getButton('update_log', 'update_log', $lang->def('_UPDATE_LOG'))); cout(Form::openForm('log_table', 'index.php?modname=conference&op=log&id=' . $id) . $tb->getTable() . Form::closeForm() . '<br/>' . getBackUi('index.php?modname=conference&op=history', $lang->def('_BACK')), 'content'); cout('</div>', 'content'); }
function getUrl($idConference, $room_type) { $lang =& DoceboLanguage::createInstance('conference', 'lms'); $conf = new Conference_Manager(); $conference = $conf->roomInfo($idConference); $room_open = "\r\n\t\tSELECT * FROM " . $this->_getRoomTable() . "\r\n\t\tWHERE idConference = '" . $idConference . "' "; $re_room = $this->_query($room_open); $teleskill_room = $this->nextRow($re_room); $room_id = $teleskill_room["roomid"]; if (getLogUserId() == $conference["idSt"]) { $role = 2; } else { $role = 1; } $login_info = $this->loginIntoRoom($room_id, $role, getLogUserId(), Docebo::user()->getUserName()); if ($login_info['errorcode']) { $url = $login_info['errormessage']; } else { $url = '<a href="' . $login_info['url'] . '" onclick="window.open(\'' . $login_info['url'] . '\', \'TeleSkill\', \'location=0,status=1,menubar=0,toolbar=0,resizable=1,scrollbars=1,width=1000,height=700\'); return false;" onkeypress="window.open(\'' . $login_info['url'] . '\', \'TeleSkill\', \'location=0,status=1,menubar=0,toolbar=0,resizable=1,scrollbars=1,width=1000,height=700\'); return false;">' . $lang->def('_ENTER') . '</a>'; } return $url; }
function getUrl($idConference, $room_type) { $lang =& DoceboLanguage::createInstance('conference', 'lms'); $conf = new Conference_Manager(); $conference = $conf->roomInfo($idConference); $acl_manager =& Docebo::user()->getAclManager(); $username = Docebo::user()->getUserName(); $u_info = $acl_manager->getUser(getLogUserId(), false); $user_email = $u_info[ACL_INFO_EMAIL]; $query2 = "SELECT * FROM " . $this->_getRoomTable() . " WHERE idConference = '" . $idConference . "'"; $re_room = $this->_query($query2); $room = $this->nextRow($re_room); if ($room["audiovideosettings"] == 0) { $av = "audio"; } else { $av = "av"; } $exit_url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . "?modname=conference&op=list"; $clientId = ""; /*$res = $this->api_join_meeting(); if ($res && $res->result) { $clientId = ""; }*/ $name = $this->getRoomName($idConference); $url = Get::sett('bbb_server', ""); $salt = Get::sett('bbb_salt', ""); $moderator_password = Get::sett('bbb_password_moderator', ""); $viewer_password = Get::sett('bbb_password_viewer', ""); $response = BigBlueButton::createMeetingArray($username, $name, null, $moderator_password, $viewer_password, $salt, $url, $returnurl); if (checkPerm('mod', true)) { $password = $moderator_password; } else { $password = $viewer_password; } if (!$response) { //If the server is unreachable $msg = 'Unable to join the meeting. Please check the url of the video conference server AND check to see if the video conference server is running.'; } else { if ($response['returncode'] == 'FAILED') { //The meeting was not created if ($response['messageKey'] == 'checksumError') { $msg = 'A checksum error occured. Make sure you entered the correct salt.'; } else { $msg = $response['message']; } } else { $_url = BigBlueButton::joinURL($name, $username, $password, $salt, $url); } } //////////////////////////////////////////////////// $url = '<a onclick="window.open(this.href, \'\', \'\');return false;" href="' . str_replace('&', '&', $_url) . '">' . $lang->def('_JOIN_CONFERENCE') . '</a>'; return $url; }
function getUrl($idConference, $room_type) { $lang =& DoceboLanguage::createInstance('conference', 'lms'); $conf = new Conference_Manager(); $conference = $conf->roomInfo($idConference); $acl_manager =& Docebo::user()->getAclManager(); $display_name = Docebo::user()->getUserName(); $u_info = $acl_manager->getUser(getLogUserId(), false); $user_email = $u_info[ACL_INFO_EMAIL]; $query2 = "SELECT * FROM " . $this->_getRoomTable() . " WHERE idConference = '" . $idConference . "'"; $re_room = $this->_query($query2); $room = $this->nextRow($re_room); if ($room["audiovideosettings"] == 0) { $av = "audio"; } else { $av = "av"; } $returnurl = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . "?modname=conference&op=list"; /* $error = false; if (getLogUserId()==$conference["idSt"]) { $url='<a onclick="window.open(this.href, \'\', \'\');return false;" href="http://'.$this->server.'/dimdim/html/envcheck/connect.action' .'?action=host' .'&email='.urlencode(Get::sett('dimdim_user')) .'&confKey='.$room["confkey"] .'&confName='.urlencode($conference["name"]) .'&lobby=false' .'&networkProfile=2' .'&meetingHours='.$conference["meetinghours"] .'&meetingMinutes=0' .'&presenterAV=av' .'&maxAttendeeMikes='.$room["maxmikes"] .'&displayName='.urlencode($acl_manager->getConvertedUserName($u_info)) .'&attendees='.$user_email .'&maxParticipants='.$conference["maxparticipants"] .'&submitFormOnLoad=true' ."&returnUrl=".urlencode($returnurl)."\">".$lang->def('_START_CONFERENCE')."</a>"; } else { $url='<a onclick="window.open(this.href, \'\', \'\');return false;" href="http://'.$this->server.'/dimdim/html/envcheck/connect.action' .'?action=join' .'&email='.$user_email .'&displayName='.urlencode($acl_manager->getConvertedUserName($u_info)) .'&confKey='.$room["confkey"] ."&returnUrl=".urlencode($returnurl)."\">".$lang->def('_ENTER')."</a>"; } */ $clientId = ""; /*$res = $this->api_join_meeting(); if ($res && $res->result) { $clientId = ""; }*/ $name = $this->getRoomName($idConference); $_url = 'http://' . Get::sett('dimdim_server', "") . '/console?clientId=' . $clientId . '&group=all&account=' . Get::sett('dimdim_user', "") . '&room=' . urlencode($name); $url = '<a onclick="window.open(this.href, \'\', \'\');return false;" href="' . str_replace('&', '&', $_url) . '">' . $lang->def('_JOIN_CONFERENCE') . '</a>'; return $url; }