public function authoriseExecutions()
    {
        $deliveryExecution = $this->getRequestParameter('execution');
        $reason = $this->getRequestParameter('reason');
        $testCenter = $this->getRequestParameter('testCenter');

        if (!is_array($deliveryExecution)) {
            $deliveryExecution = array($deliveryExecution);
        }

        try {

            $data = DeliveryHelper::authoriseExecutions($deliveryExecution, $reason, $testCenter);

            $response = [
                'success' => !count($data['unprocessed']),
                'data' => $data
            ];

            if (!$response['success']) {
                $response['errorCode'] = self::ERROR_AUTHORIZE_EXECUTIONS;
                $response['errorMsg'] = __('Some delivery executions have not been authorized');
            }

            $this->returnJson($response);
        } catch (QtiTestExtractionFailedException $e) {
            $response = [
                'success' => false,
                'data' => [],
                'errorCode' => self::ERROR_AUTHORIZE_EXECUTIONS,
                'errorMsg' => __('Decryption failed because of using the wrong customer app key.'),
            ];

            $this->returnJson($response);
        } catch (ServiceNotFoundException $e) {
            \common_Logger::w('No delivery service defined for proctoring');
            $this->returnError('Proctoring interface not available');
        }
    }