Beispiel #1
0
 * This script initiates a video conference session
 */
/**
 * Initialization
 */
$course_plugin = 'openmeetings';
//needed in order to load the plugin lang variables
require_once dirname(__FILE__) . '/config.php';
$tool_name = get_lang('Videoconference');
$tpl = new Template($tool_name);
$om = new \Chamilo\Plugin\OpenMeetings\OpenMeetings();
if ($om->isServerRunning()) {
    if (isset($_GET['launch']) && $_GET['launch'] == 1) {
        $meeting_params = array();
        $meeting_params['meeting_name'] = 'C' . api_get_course_id() . '-' . api_get_session_id();
        $meetings = $om->getCourseMeetings();
        $selectedMeeting = array();
        /*
        // Select the meeting with more participantCount.
        if (!empty($meetings)) {
            $max = 0;
            foreach ($meetings as $meeting) {
                if ($meeting['participantCount'] > $max) {
                    $selectedMeeting = $meeting;
                    $max = $meeting['participantCount'];
                }
            }
        }
        */
        // Check for the first meeting available with status = 1
        // (there should be only one at a time, as createMeeting checks for that first