@@ -208,8 +208,8 @@ |
||
208 | 208 | foreach ($course->enrollments as $enrollment) { |
209 | 209 | // if a student has no attendance record for the class (event) |
210 | 210 | $hasNotAttended = $course->attendance->where('student_id', $enrollment->student_id) |
211 | - ->where('event_id', $event->id) |
|
212 | - ->isEmpty(); |
|
211 | + ->where('event_id', $event->id) |
|
212 | + ->isEmpty(); |
|
213 | 213 | |
214 | 214 | // count one and break loop |
215 | 215 | if ($hasNotAttended) { |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | protected function mapWebRoutes() |
53 | 53 | { |
54 | 54 | Route::middleware('web') |
55 | - ->namespace($this->namespace) |
|
56 | - ->group(base_path('routes/web.php')); |
|
55 | + ->namespace($this->namespace) |
|
56 | + ->group(base_path('routes/web.php')); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | protected function mapApiRoutes() |
67 | 67 | { |
68 | 68 | Route::prefix('api') |
69 | - ->middleware('api') |
|
70 | - ->namespace($this->namespace) |
|
71 | - ->group(base_path('routes/api.php')); |
|
69 | + ->middleware('api') |
|
70 | + ->namespace($this->namespace) |
|
71 | + ->group(base_path('routes/api.php')); |
|
72 | 72 | } |
73 | 73 | } |
@@ -228,8 +228,8 @@ |
||
228 | 228 | $user = Student::where('id', $this->guard()->user()->id)->first(); |
229 | 229 | |
230 | 230 | $user |
231 | - ->addMedia($request->fileToUpload) |
|
232 | - ->toMediaCollection('profile-picture'); |
|
231 | + ->addMedia($request->fileToUpload) |
|
232 | + ->toMediaCollection('profile-picture'); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | // if the user has been selected for a forced update, move to the next step |
@@ -166,9 +166,9 @@ |
||
166 | 166 | // add photo |
167 | 167 | if ($request->data['userPicture']) { |
168 | 168 | $student |
169 | - ->addMediaFromBase64($request->data['userPicture']) |
|
170 | - ->usingFileName('profilePicture.jpg') |
|
171 | - ->toMediaCollection('profile-picture'); |
|
169 | + ->addMediaFromBase64($request->data['userPicture']) |
|
170 | + ->usingFileName('profilePicture.jpg') |
|
171 | + ->toMediaCollection('profile-picture'); |
|
172 | 172 | |
173 | 173 | Log::info('Profile picture added to the student profile'); |
174 | 174 | } |
@@ -188,7 +188,7 @@ |
||
188 | 188 | })); |
189 | 189 | }, |
190 | 190 | function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
191 | - } |
|
191 | + } |
|
192 | 192 | ); |
193 | 193 | |
194 | 194 | CRUD::addFilter([ // select2_multiple filter |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | ], |
94 | 94 | false, |
95 | 95 | function () { // if the filter is active |
96 | - CRUD::addClause('where', 'action', true); |
|
97 | - } |
|
96 | + CRUD::addClause('where', 'action', true); |
|
97 | + } |
|
98 | 98 | ); |
99 | 99 | |
100 | 100 | CRUD::addFilter( |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | CRUD::addClause('where', 'commentable_type', '=', $value); |
115 | 115 | }, |
116 | 116 | function () { // if the filter is not active |
117 | - CRUD::addClause('where', 'commentable_type', '=', Student::class); |
|
118 | - $this->crud->getRequest()->request->add(['commentable_type' => Student::class]); // to make the filter look active |
|
119 | - } |
|
117 | + CRUD::addClause('where', 'commentable_type', '=', Student::class); |
|
118 | + $this->crud->getRequest()->request->add(['commentable_type' => Student::class]); // to make the filter look active |
|
119 | + } |
|
120 | 120 | ); |
121 | 121 | } |
122 | 122 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | CRUD::addClause('where', 'teacher_id', $value); |
79 | 79 | }, |
80 | 80 | function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
81 | - } |
|
81 | + } |
|
82 | 82 | ); |
83 | 83 | |
84 | 84 | CRUD::addFilter( |
@@ -89,10 +89,10 @@ discard block |
||
89 | 89 | ], |
90 | 90 | false, |
91 | 91 | function ($value) { // if the filter is active, apply these constraints |
92 | - $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR); |
|
93 | - CRUD::addClause('where', 'date', '>=', $dates->from); |
|
94 | - CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59'); |
|
95 | - } |
|
92 | + $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR); |
|
93 | + CRUD::addClause('where', 'date', '>=', $dates->from); |
|
94 | + CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59'); |
|
95 | + } |
|
96 | 96 | ); |
97 | 97 | } |
98 | 98 |
@@ -119,15 +119,15 @@ discard block |
||
119 | 119 | ], |
120 | 120 | false, |
121 | 121 | function ($value) { // if the filter is active, apply these constraints |
122 | - $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR); |
|
123 | - |
|
124 | - if ($dates->from) { |
|
125 | - CRUD::addClause('where', 'start', '>=', $dates->from); |
|
126 | - } |
|
127 | - if ($dates->to) { |
|
128 | - CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59'); |
|
129 | - } |
|
130 | - } |
|
122 | + $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR); |
|
123 | + |
|
124 | + if ($dates->from) { |
|
125 | + CRUD::addClause('where', 'start', '>=', $dates->from); |
|
126 | + } |
|
127 | + if ($dates->to) { |
|
128 | + CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59'); |
|
129 | + } |
|
130 | + } |
|
131 | 131 | ); |
132 | 132 | |
133 | 133 | CRUD::addFilter( |
@@ -138,10 +138,10 @@ discard block |
||
138 | 138 | ], |
139 | 139 | false, |
140 | 140 | function ($value) { // if the filter is active, apply these constraints |
141 | - $this->crud->query->where('course_id', null); |
|
142 | - }, |
|
141 | + $this->crud->query->where('course_id', null); |
|
142 | + }, |
|
143 | 143 | function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
144 | - } |
|
144 | + } |
|
145 | 145 | ); |
146 | 146 | |
147 | 147 | CRUD::addFilter( |
@@ -152,8 +152,8 @@ discard block |
||
152 | 152 | ], |
153 | 153 | false, |
154 | 154 | function ($value) { // if the filter is active, apply these constraints |
155 | - CRUD::addClause('unassigned'); |
|
156 | - } |
|
155 | + CRUD::addClause('unassigned'); |
|
156 | + } |
|
157 | 157 | ); |
158 | 158 | |
159 | 159 | CRUD::addFilter( |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | CRUD::addClause('where', 'teacher_id', $value); |
168 | 168 | }, |
169 | 169 | function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
170 | - } |
|
170 | + } |
|
171 | 171 | ); |
172 | 172 | } |
173 | 173 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $q->where('firstname', 'like', '%'.$searchTerm.'%') |
59 | 59 | ->orWhere('lastname', 'like', '%'.$searchTerm.'%') |
60 | 60 | ->orWhere('email', 'like', '%'.$searchTerm.'%') |
61 | - ->orWhere('idnumber', 'like', '%'.$searchTerm.'%'); |
|
61 | + ->orWhere('idnumber', 'like', '%'.$searchTerm.'%'); |
|
62 | 62 | }); |
63 | 63 | }); |
64 | 64 | }, |
@@ -95,8 +95,8 @@ discard block |
||
95 | 95 | ], |
96 | 96 | false, |
97 | 97 | function () { |
98 | - CRUD::addClause('noResult'); |
|
99 | - } |
|
98 | + CRUD::addClause('noResult'); |
|
99 | + } |
|
100 | 100 | ); |
101 | 101 | |
102 | 102 | CRUD::addFilter( |