@@ -181,8 +181,8 @@ discard block |
||
| 181 | 181 | }, function ($value) { // if the filter is active |
| 182 | 182 | CRUD::addClause('where', 'rhythm_id', $value); |
| 183 | 183 | }, |
| 184 | - function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
|
| 185 | - }); |
|
| 184 | + function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
|
| 185 | + }); |
|
| 186 | 186 | |
| 187 | 187 | CRUD::addFilter([ // select2 filter |
| 188 | 188 | 'name' => 'teacher_id', |
@@ -193,8 +193,8 @@ discard block |
||
| 193 | 193 | }, function ($value) { // if the filter is active |
| 194 | 194 | CRUD::addClause('where', 'teacher_id', $value); |
| 195 | 195 | }, |
| 196 | - function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
|
| 197 | - }); |
|
| 196 | + function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
|
| 197 | + }); |
|
| 198 | 198 | |
| 199 | 199 | CRUD::addFilter([ // select2 filter |
| 200 | 200 | 'name' => 'level_id', |
@@ -205,8 +205,8 @@ discard block |
||
| 205 | 205 | }, function ($value) { // if the filter is active |
| 206 | 206 | CRUD::addClause('where', 'level_id', $value); |
| 207 | 207 | }, |
| 208 | - function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
|
| 209 | - }); |
|
| 208 | + function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
|
| 209 | + }); |
|
| 210 | 210 | |
| 211 | 211 | CRUD::addFilter([ // select2 filter |
| 212 | 212 | 'name' => 'period_id', |
@@ -217,11 +217,11 @@ discard block |
||
| 217 | 217 | }, function ($value) { // if the filter is active |
| 218 | 218 | CRUD::addClause('where', 'period_id', $value); |
| 219 | 219 | }, |
| 220 | - function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
|
| 221 | - $period = Period::get_default_period()->id; |
|
| 222 | - CRUD::addClause('where', 'period_id', $period); |
|
| 223 | - $this->crud->getRequest()->request->add(['period_id' => $period]); // to make the filter look active |
|
| 224 | - }); |
|
| 220 | + function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
|
| 221 | + $period = Period::get_default_period()->id; |
|
| 222 | + CRUD::addClause('where', 'period_id', $period); |
|
| 223 | + $this->crud->getRequest()->request->add(['period_id' => $period]); // to make the filter look active |
|
| 224 | + }); |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | protected function setupCreateOperation() |
@@ -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 |