@@ -46,7 +46,7 @@ |
||
46 | 46 | */ |
47 | 47 | public function onKernelController(FilterControllerEvent $event) |
48 | 48 | { |
49 | - $request = $event->getRequest(); |
|
49 | + $request = $event->getRequest(); |
|
50 | 50 | $controller = $request->get('_controller'); |
51 | 51 | // Only process legacy listener when loading legacy controller |
52 | 52 | /*if ($controller != 'Chamilo\CoreBundle\Controller\LegacyController::classicAction') { |
@@ -72,9 +72,9 @@ discard block |
||
72 | 72 | return $this->groupManager; |
73 | 73 | } |
74 | 74 | |
75 | - /** |
|
76 | - * @inheritdoc |
|
77 | - */ |
|
75 | + /** |
|
76 | + * @inheritdoc |
|
77 | + */ |
|
78 | 78 | protected function supports($attribute, $subject) |
79 | 79 | { |
80 | 80 | $options = [ |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | return true; |
97 | 97 | } |
98 | 98 | |
99 | - /** |
|
100 | - * @inheritdoc |
|
101 | - */ |
|
99 | + /** |
|
100 | + * @inheritdoc |
|
101 | + */ |
|
102 | 102 | protected function voteOnAttribute($attribute, $group, TokenInterface $token) |
103 | 103 | { |
104 | 104 | $user = $token->getUser(); |
@@ -169,37 +169,37 @@ discard block |
||
169 | 169 | sru.relation_type <> ".SESSION_RELATION_TYPE_RRHH." AND |
170 | 170 | srcru.session_id = '".intval($sessionId)."'"; |
171 | 171 | |
172 | - $rs = Database::query($sql); |
|
172 | + $rs = Database::query($sql); |
|
173 | 173 | $numberOfUsers = Database::result($rs, 0, 0); |
174 | 174 | |
175 | - // Get coachs of the courses in session |
|
175 | + // Get coachs of the courses in session |
|
176 | 176 | |
177 | - $sql = "SELECT user.lastname, user.firstname, user.username |
|
177 | + $sql = "SELECT user.lastname, user.firstname, user.username |
|
178 | 178 | FROM $tbl_session_rel_course_rel_user session_rcru, $tbl_user user |
179 | 179 | WHERE |
180 | 180 | session_rcru.user_id = user.user_id AND |
181 | 181 | session_rcru.session_id = '".intval($sessionId)."' AND |
182 | 182 | session_rcru.c_id ='".intval($course->getId())."' AND |
183 | 183 | session_rcru.status=2"; |
184 | - $rs = Database::query($sql); |
|
184 | + $rs = Database::query($sql); |
|
185 | 185 | |
186 | - $coachs = array(); |
|
187 | - if (Database::num_rows($rs) > 0) { |
|
188 | - while($info_coach = Database::fetch_array($rs)) { |
|
186 | + $coachs = array(); |
|
187 | + if (Database::num_rows($rs) > 0) { |
|
188 | + while($info_coach = Database::fetch_array($rs)) { |
|
189 | 189 | $coachs[] = api_get_person_name( |
190 | 190 | $info_coach['firstname'], |
191 | 191 | $info_coach['lastname'] |
192 | 192 | ).' ('.$info_coach['username'].')'; |
193 | - } |
|
194 | - } else { |
|
195 | - $coach = get_lang('None'); |
|
196 | - } |
|
193 | + } |
|
194 | + } else { |
|
195 | + $coach = get_lang('None'); |
|
196 | + } |
|
197 | 197 | |
198 | - if (count($coachs) > 0) { |
|
199 | - $coach = implode('<br />',$coachs); |
|
200 | - } else { |
|
201 | - $coach = get_lang('None'); |
|
202 | - } |
|
198 | + if (count($coachs) > 0) { |
|
199 | + $coach = implode('<br />',$coachs); |
|
200 | + } else { |
|
201 | + $coach = get_lang('None'); |
|
202 | + } |
|
203 | 203 | |
204 | 204 | $orderButtons = null; |
205 | 205 | |
@@ -235,8 +235,8 @@ discard block |
||
235 | 235 | |
236 | 236 | $courseUrl = api_get_course_url($course->getCode(), $sessionId); |
237 | 237 | |
238 | - // hide_course_breadcrumb the parameter has been added to hide the name |
|
239 | - // of the course, that appeared in the default $interbreadcrumb |
|
238 | + // hide_course_breadcrumb the parameter has been added to hide the name |
|
239 | + // of the course, that appeared in the default $interbreadcrumb |
|
240 | 240 | $courseItem .= ' |
241 | 241 | <tr> |
242 | 242 | <td class="title">'.Display::url( |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | </td> |
263 | 263 | </tr>'; |
264 | 264 | $count++; |
265 | - } |
|
265 | + } |
|
266 | 266 | $courseListToShow .= $courseItem; |
267 | 267 | } |
268 | 268 | $courseListToShow .= '</table><br />'; |
@@ -132,7 +132,7 @@ |
||
132 | 132 | if ($session->hasUserInCourse($user, $course)) { |
133 | 133 | $user->addRole('ROLE_CURRENT_SESSION_COURSE_STUDENT'); |
134 | 134 | |
135 | - // Session duration per student. |
|
135 | + // Session duration per student. |
|
136 | 136 | if (!empty($session->getDuration())) { |
137 | 137 | $duration = $session->getDuration() * 24 * 60 * 60; |
138 | 138 |