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

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

        try {
            $data = DeliveryHelper::terminateExecutions($deliveryExecution, $reason);

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

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

            $this->returnJson($response);
        } catch (ServiceNotFoundException $e) {
            \common_Logger::w('No delivery service defined for proctoring');
            $this->returnError('Proctoring interface not available');
        }
    }
public function terminateExecutions()
    {
        $deliveryExecution = $this->getRequestParameter('execution');
        $reason = $this->getRequestParameter('reason');

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

        try {
            $data = DeliveryHelper::terminateExecutions($deliveryExecution, $reason);

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

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

            $this->returnJson($response);
        } catch (ServiceNotFoundException $e) {
            \common_Logger::w('No delivery service defined for proctoring');
            $this->returnError('Proctoring interface not available');
        }
    }
public function terminateExecutions ( ) { $ deliveryExecution = $ this -> getRequestParameter ( 'execution' ) ; $ reason = $ this -> getRequestParameter ( 'reason' ) ; if ( ! is_array ( $ deliveryExecution ) ) { $ deliveryExecution = array ( $ deliveryExecution ) ; } try { $ data = DeliveryHelper :: terminateExecutions ( $ deliveryExecution , $ reason ) ; $ response = [ 'success' => ! count ( $ data [ 'unprocessed' ] ) , 'data' => $ data ] ; if ( ! $ response [ 'success' ] ) { $ response [ 'errorCode' ] = self :: ERROR_TERMINATE_EXECUTIONS ; $ response [ 'errorMsg' ] = __ ( 'Some delivery executions have not been terminated' ) ; } $ this -> returnJson ( $ response ) ; } catch ( ServiceNotFoundException $ e ) { \ common_Logger :: w ( 'No delivery service defined for proctoring' ) ; $ this -> returnError ( 'Proctoring interface not available' ) ; } }
Terminates delivery executions

@throws \common_Exception
@throws \oat\oatbox\service\ServiceNotFoundException
Terminates delivery executions