/**
  * Pauses delivery executions
  *
  * @throws \common_Exception
  * @throws \oat\oatbox\service\ServiceNotFoundException
  */
 public function pauseExecutions()
 {
     $deliveryExecution = $this->getRequestParameter('execution');
     $reason = $this->getRequestParameter('reason');
     if (!is_array($deliveryExecution)) {
         $deliveryExecution = array($deliveryExecution);
     }
     try {
         $paused = DeliveryHelper::pauseExecutions($deliveryExecution, $reason);
         $notPaused = array_diff($deliveryExecution, $paused);
         $this->returnJson(array('success' => !count($notPaused), 'processed' => $paused, 'unprocessed' => $notPaused));
     } catch (ServiceNotFoundException $e) {
         \common_Logger::w('No delivery service defined for proctoring');
         $this->returnError('Proctoring interface not available');
     }
 }