/**
  * Render browser detection view
  */
 public function whichBrowser()
 {
     $osService = OSService::singleton();
     $browserService = WebBrowserService::singleton();
     $result = ['browser' => $browserService->getClientName(), 'browserVersion' => $browserService->getClientVersion(), 'os' => $osService->getClientName(), 'osVersion' => $osService->getClientVersion()];
     $this->returnJson($result);
 }
 /**
  * CompatibilityChecker constructor
  * Check parameter required
  * Extract compatibility file
  * @throws \common_exception_MissingParameter
  * @throws \tao_models_classes_FileNotFoundException
  */
 function __construct()
 {
     $osService = OSService::singleton();
     $browserService = WebBrowserService::singleton();
     $this->browser = $browserService->getClientName();
     $this->browserVersion = $browserService->getClientVersion();
     $this->os = $osService->getClientName();
     $this->osVersion = $osService->getClientVersion();
     $compatibilityFile = __DIR__ . '/../include/compatibility.json';
     if (!file_exists($compatibilityFile)) {
         throw new \tao_models_classes_FileNotFoundException("Unable to find the compatibility file");
     }
     $this->compatibility = json_decode(file_get_contents($compatibilityFile));
 }
 /**
  * Sets a delivery execution in the in progress state
  *
  * @param DeliveryExecution $deliveryExecution
  * @return bool
  */
 public function resumeExecution(DeliveryExecution $deliveryExecution)
 {
     $session = $this->getTestSessionService()->getTestSession($deliveryExecution);
     $logData = ['web_browser_name' => WebBrowserService::singleton()->getClientName(), 'web_browser_version' => WebBrowserService::singleton()->getClientVersion(), 'os_name' => OSService::singleton()->getClientName(), 'os_version' => OSService::singleton()->getClientVersion(), 'timestamp' => microtime(true)];
     if ($session) {
         $session->resume();
         $this->getTestSessionService()->persist($session);
         $this->getDeliveryLogService()->log($deliveryExecution->getIdentifier(), 'TEST_RESUME', $logData);
     } else {
         $this->getDeliveryLogService()->log($deliveryExecution->getIdentifier(), 'TEST_RUN', $logData);
     }
     $deliveryExecution->setState(ProctoredDeliveryExecution::STATE_ACTIVE);
     $result = true;
     return $result;
 }
 /**
  * constructor: initialize the service and the default data
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     // the service is initialized by default
     $this->service = WebBrowserService::singleton();
 }