예제 #1
0
 /**
  * implement the abstract method
  * Get score max possible for a graphic question.
  *
  * @param \UJM\ExoBundle\Entity\InteractionGraphic $interGraph
  *
  * @return float
  */
 public function maxScore($interGraph = null)
 {
     $em = $this->doctrine->getManager();
     $scoreMax = 0;
     $rightCoords = $em->getRepository('UJMExoBundle:Coords')->findBy(['interactionGraphic' => $interGraph->getId()]);
     foreach ($rightCoords as $score) {
         $scoreMax += $score->getScoreCoords();
     }
     return $scoreMax;
 }