@@ -282,12 +282,12 @@ |
||
| 282 | 282 | $noActivity = htmlentities($translator->trans('form.no_activities', [], 'calendar')); |
| 283 | 283 | $noWorkday = htmlentities($translator->trans('form.no_workday', [], 'calendar')); |
| 284 | 284 | |
| 285 | - foreach($weekDays as $workDay) { |
|
| 285 | + foreach ($weekDays as $workDay) { |
|
| 286 | 286 | $day = $workDay->getDate()->format('N'); |
| 287 | 287 | $activities[$day] = ''; |
| 288 | 288 | $hours[$day] = ''; |
| 289 | 289 | |
| 290 | - foreach($workDay->getTrackingActivities() as $trackingActivity) { |
|
| 290 | + foreach ($workDay->getTrackingActivities() as $trackingActivity) { |
|
| 291 | 291 | $activities[$day] .= '<li style="list-style-position: inside; list-style: square;">'; |
| 292 | 292 | if ($trackingActivity->getActivity()->getCode()) { |
| 293 | 293 | $activities[$day] .= '<b>' . htmlentities($trackingActivity->getActivity()->getCode()) . ': </b>'; |
@@ -80,6 +80,10 @@ discard block |
||
| 80 | 80 | ]); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | + /** |
|
| 84 | + * @param boolean $status |
|
| 85 | + * @param string $routeName |
|
| 86 | + */ |
|
| 83 | 87 | protected function lockWorkdayAction(Agreement $agreement, Request $request, $status, $routeName) |
| 84 | 88 | { |
| 85 | 89 | $this->denyAccessUnlessGranted($status ? 'AGREEMENT_LOCK' : 'AGREEMENT_UNLOCK', $agreement); |
@@ -105,6 +109,10 @@ discard block |
||
| 105 | 109 | return $this->redirectToRoute($routeName, ['id' => $agreement->getId()]); |
| 106 | 110 | } |
| 107 | 111 | |
| 112 | + /** |
|
| 113 | + * @param boolean $status |
|
| 114 | + * @param string $routeName |
|
| 115 | + */ |
|
| 108 | 116 | protected function lockWeekAction(Agreement $agreement, Request $request, $status, $routeName) |
| 109 | 117 | { |
| 110 | 118 | $this->denyAccessUnlessGranted($status ? 'AGREEMENT_LOCK' : 'AGREEMENT_UNLOCK', $agreement); |
@@ -170,6 +178,10 @@ discard block |
||
| 170 | 178 | return $this->redirectToRoute('admin_group_student_calendar', ['id' => $agreement->getId()]); |
| 171 | 179 | } |
| 172 | 180 | |
| 181 | + /** |
|
| 182 | + * @param string[] $routes |
|
| 183 | + * @param string $template |
|
| 184 | + */ |
|
| 173 | 185 | protected function workTutorReportAction(Agreement $agreement, Request $request, $breadcrumb, $routes, $template) |
| 174 | 186 | { |
| 175 | 187 | $em = $this->getDoctrine()->getManager(); |
@@ -233,7 +233,7 @@ |
||
| 233 | 233 | $workDays = $workday->getAgreement()->getWorkdays(); |
| 234 | 234 | |
| 235 | 235 | /** @var Workday $day */ |
| 236 | - foreach($workDays as $day) { |
|
| 236 | + foreach ($workDays as $day) { |
|
| 237 | 237 | $numWeek = $day->getDate()->format('W'); |
| 238 | 238 | |
| 239 | 239 | if ($numWeek != $oldNumWeek) { |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | $outcomes = new ArrayCollection(); |
| 16 | 16 | |
| 17 | 17 | /** @var Activity $activity */ |
| 18 | - foreach($activities as $activity) { |
|
| 18 | + foreach ($activities as $activity) { |
|
| 19 | 19 | if (false === $outcomes->contains($activity->getLearningOutcome())) { |
| 20 | 20 | $outcomes->add($activity->getLearningOutcome()); |
| 21 | 21 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $learningOutcomes = $this->getFromAgreement($agreement); |
| 31 | 31 | $result = []; |
| 32 | 32 | |
| 33 | - foreach($learningOutcomes as $learningOutcome) { |
|
| 33 | + foreach ($learningOutcomes as $learningOutcome) { |
|
| 34 | 34 | $item = []; |
| 35 | 35 | $item['learning_outcome'] = $learningOutcome; |
| 36 | 36 | $item['activities'] = $this->getEntityManager()->getRepository('AppBundle:Activity')->getFromAgreementAndLearningOutcome($agreement, $learningOutcome); |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | 'required' => false |
| 55 | 55 | ]); |
| 56 | 56 | |
| 57 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 57 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 58 | 58 | /** @var Activity $activity */ |
| 59 | 59 | $activity = $event->getData(); |
| 60 | 60 | |
@@ -260,7 +260,7 @@ |
||
| 260 | 260 | $totalHours = $this->getDoctrine()->getRepository('AppBundle:User')->countAgreementHours($agreement->getStudent()); |
| 261 | 261 | |
| 262 | 262 | $activities = []; |
| 263 | - foreach($agreements as $a) { |
|
| 263 | + foreach ($agreements as $a) { |
|
| 264 | 264 | $activities[] = [$a, $this->getDoctrine()->getRepository('AppBundle:Agreement')->getActivitiesStats($a)]; |
| 265 | 265 | } |
| 266 | 266 | |