/** * To create new paper * * @access private * * @param integer $id id of exercise * @param \UJM\ExoBundle\Entity\Exercise $exercise * * @return array */ private function prepareInteractionsPaper($id, $exercise) { $em = $this->getDoctrine()->getManager(); $orderInter = ''; $tabOrderInter = array(); $tab = array(); $interactions = $this->getDoctrine()->getManager()->getRepository('UJMExoBundle:Interaction')->getExerciseInteraction($this->getDoctrine()->getManager(), $id, $exercise->getShuffle(), $exercise->getNbQuestion()); foreach ($interactions as $interaction) { $orderInter = $orderInter . $interaction->getId() . ';'; $tabOrderInter[] = $interaction->getId(); } $tab['interactions'] = $interactions; $tab['orderInter'] = $orderInter; $tab['tabOrderInter'] = $tabOrderInter; return $tab; }