| @@ 85-113 (lines=29) @@ | ||
| 82 | * @Route("/grupo/{id}", name="admin_group_students", methods={"GET"}) |
|
| 83 | * @Security("is_granted('GROUP_MANAGE', group)") |
|
| 84 | */ |
|
| 85 | public function groupDetailIndexAction(Group $group, Request $request) |
|
| 86 | { |
|
| 87 | /** @var EntityManager $em */ |
|
| 88 | $em = $this->getDoctrine()->getManager(); |
|
| 89 | ||
| 90 | $usersQuery = $em->createQuery('SELECT u FROM AppBundle:User u WHERE u.studentGroup = :group') |
|
| 91 | ->setParameter('group', $group); |
|
| 92 | ||
| 93 | $paginator = $this->get('knp_paginator'); |
|
| 94 | $pagination = $paginator->paginate( |
|
| 95 | $usersQuery, |
|
| 96 | $request->query->getInt('page', 1), |
|
| 97 | $this->getParameter('page.size'), |
|
| 98 | [ |
|
| 99 | 'defaultSortFieldName' => 'u.lastName', |
|
| 100 | 'defaultSortDirection' => 'asc' |
|
| 101 | ] |
|
| 102 | ); |
|
| 103 | ||
| 104 | return $this->render('group/manage_students.html.twig', [ |
|
| 105 | 'menu_item' => $this->get('app.menu_builders_chain')->getMenuItemByRouteName('admin_tutor_group'), |
|
| 106 | 'breadcrumb' => [ |
|
| 107 | ['fixed' => (string) $group], |
|
| 108 | ], |
|
| 109 | 'title' => $group->getName(), |
|
| 110 | 'pagination' => $pagination |
|
| 111 | ]); |
|
| 112 | ||
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * @Route("/alumnado/estudiante/{id}", name="student_detail", methods={"GET", "POST"}) |
|
| @@ 40-69 (lines=30) @@ | ||
| 37 | /** |
|
| 38 | * @Route("/{id}", name="admin_program_training_learning_outcomes", methods={"GET"}) |
|
| 39 | */ |
|
| 40 | public function groupIndexAction(Training $training, Request $request) |
|
| 41 | { |
|
| 42 | /** @var EntityManager $em */ |
|
| 43 | $em = $this->getDoctrine()->getManager(); |
|
| 44 | ||
| 45 | $usersQuery = $em->createQuery('SELECT l FROM AppBundle:LearningOutcome l WHERE l.training = :training') |
|
| 46 | ->setParameter('training', $training); |
|
| 47 | ||
| 48 | $paginator = $this->get('knp_paginator'); |
|
| 49 | $pagination = $paginator->paginate( |
|
| 50 | $usersQuery, |
|
| 51 | $request->query->getInt('page', 1), |
|
| 52 | $this->getParameter('page.size'), |
|
| 53 | [ |
|
| 54 | 'defaultSortFieldName' => 'l.code', |
|
| 55 | 'defaultSortDirection' => 'asc' |
|
| 56 | ] |
|
| 57 | ); |
|
| 58 | ||
| 59 | return $this->render('activity/manage_learning_outcomes.html.twig', |
|
| 60 | [ |
|
| 61 | 'menu_item' => $this->get('app.menu_builders_chain')->getMenuItemByRouteName('admin_program'), |
|
| 62 | 'breadcrumb' => [ |
|
| 63 | ['fixed' => $training->getName()], |
|
| 64 | ], |
|
| 65 | 'title' => $training->getName(), |
|
| 66 | 'pagination' => $pagination, |
|
| 67 | 'training' => $training |
|
| 68 | ]); |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * @Route("/resultado/nuevo/{training}", name="admin_program_learning_outcome_new", methods={"GET", "POST"}, requirements={"training": "\d+"}) |
|