try { $vm->resizeToMaxLimit(); } catch (\Exception $e) { echo $e->getMessage(); exit; } } } $meeting_params = array(); $meeting_params['meeting_name'] = api_get_course_id() . '-' . api_get_session_id(); if ($bbb->meetingExists($meeting_params['meeting_name'])) { $url = $bbb->joinMeeting($meeting_params['meeting_name']); if ($url) { $bbb->redirectToBBB($url); } else { $url = $bbb->createMeeting($meeting_params); $bbb->redirectToBBB($url); } } else { if ($bbb->isTeacher()) { $url = $bbb->createMeeting($meeting_params); $bbb->redirectToBBB($url); } else { $url = 'listing.php?' . api_get_cidreq(); $bbb->redirectToBBB($url); } } } else { $url = 'listing.php?' . api_get_cidreq(); header('Location: ' . $url); exit;