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