コード例 #1
0
 public function getActiveTable()
 {
     require_once $GLOBALS['where_scs'] . '/lib/lib.conference.php';
     $conference_man = new Conference_Manager();
     $conference = $this->model->getActiveConference();
     $course_name = $this->model->getCourseName();
     require_once _base_ . '/lib/lib.table.php';
     $tb = new Table(NULL, Lang::t('_ACTIVE', 'course'), Lang::t('_ACTIVE', 'course'));
     $tb_h = array(Lang::t('_VIDEOCONFERENCE', 'course'), Lang::t('_TYPE', 'course'), Lang::t('_NAME', 'course'), Lang::t('_START_DATE', 'course'), Lang::t('_DATE_END', 'course'), Lang::t('_HOURS', 'course'), Lang::t('_MAX_PARTICIPANTS', 'conference'), '');
     $tb_s = array('', '', '', '', '', '', '', 'image');
     $tb->setColsStyle($tb_s);
     $tb->addHead($tb_h);
     foreach ($conference as $conference_info) {
         $tb->addBody(array($conference_info['name'], $conference_info['room_type'], $course_name[$conference_info['idCourse']], Format::date(date('Y-m-d H:i:s', $conference_info['starttime']), 'datetime'), Format::date(date('Y-m-d H:i:s', $conference_info['endtime']), 'datetime'), $conference_info['meetinghours'], $conference_info['maxparticipants'], $conference_man->getUrl($conference_info['id'], $conference_info['room_type'])));
     }
     return $tb;
 }
コード例 #2
0
ファイル: conference.php プロジェクト: abhinay100/forma_app
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&amp;op=log&amp;id=' . $id) . $tb->getTable() . Form::closeForm() . '<br/>' . getBackUi('index.php?modname=conference&amp;op=history', $lang->def('_BACK')), 'content');
    cout('</div>', 'content');
}
コード例 #3
0
ファイル: lib.bbb.php プロジェクト: abhinay100/forma_app
 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('&', '&amp;', $_url) . '">' . $lang->def('_JOIN_CONFERENCE') . '</a>';
     return $url;
 }
コード例 #4
0
    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;
    }
コード例 #5
0
ファイル: lib.dimdim.php プロジェクト: abhinay100/forma_app
 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('&', '&amp;', $_url) . '">' . $lang->def('_JOIN_CONFERENCE') . '</a>';
     return $url;
 }