/**
  * Get informations about a paper response, maxExoScore, scorePaper, scoreTemp (all questions marked or no)
  *
  * @access public
  *
  * @param \UJM\ExoBundle\Entity\Paper\paper $paper
  *
  * @return array
  */
 public function getInfosPaper($paper)
 {
     $infosPaper = array();
     $scorePaper = 0;
     $scoreTemp = false;
     $em = $this->doctrine->getManager();
     $interactions = $this->om->getRepository('UJMExoBundle:Interaction')->getPaperInteraction($em, str_replace(';', '\',\'', substr($paper->getOrdreQuestion(), 0, -1)));
     $interactions = $this->orderInteractions($interactions, $paper->getOrdreQuestion());
     $infosPaper['interactions'] = $interactions;
     $responses = $this->om->getRepository('UJMExoBundle:Response')->getPaperResponses($paper->getUser()->getId(), $paper->getId());
     $responses = $this->orderResponses($responses, $paper->getOrdreQuestion());
     $infosPaper['responses'] = $responses;
     $infosPaper['maxExoScore'] = $this->getExercisePaperTotalScore($paper->getId());
     foreach ($responses as $response) {
         if ($response->getMark() != -1) {
             $scorePaper += $response->getMark();
         } else {
             $scoreTemp = true;
         }
     }
     $infosPaper['scorePaper'] = $scorePaper;
     $infosPaper['scoreTemp'] = $scoreTemp;
     return $infosPaper;
 }
 /**
  * Get informations about a paper response, maxExoScore, scorePaper, scoreTemp (all questions graphiced or no).
  *
  *
  * @param \UJM\ExoBundle\Entity\Paper\paper $paper
  *
  * @return array
  */
 public function getInfosPaper($paper)
 {
     $infosPaper = array();
     $scorePaper = 0;
     $scoreTemp = false;
     $interactions = $this->getInteractions($paper->getOrdreQuestion());
     $interactionsSorted = $this->sortInteractions($interactions, $paper->getOrdreQuestion());
     $infosPaper['interactions'] = $interactionsSorted;
     $responses = $this->getResponses($paper->getId());
     $responsesSorted = $this->sortResponses($responses, $paper->getOrdreQuestion());
     $infosPaper['responses'] = $responsesSorted;
     $infosPaper['maxExoScore'] = $this->getPaperTotalScore($paper->getId());
     foreach ($responses as $response) {
         if ($response->getMark() != -1) {
             $scorePaper += $response->getMark();
         } else {
             $scoreTemp = true;
         }
     }
     $infosPaper['scorePaper'] = $scorePaper;
     $infosPaper['scoreTemp'] = $scoreTemp;
     return $infosPaper;
 }