@@ -45,14 +45,14 @@ discard block |
||
| 45 | 45 | $course = Course::find($entry->course_id); |
| 46 | 46 | $matchFound = false; |
| 47 | 47 | |
| 48 | - echo "\nMigrating grades from course " . $course->id; |
|
| 48 | + echo "\nMigrating grades from course ".$course->id; |
|
| 49 | 49 | |
| 50 | 50 | // collect all grade types associated to this course. |
| 51 | 51 | $courseGradeTypes = DB::table('course_grade_type')->where('course_id', $entry->course_id)->pluck('grade_type_id'); |
| 52 | 52 | // if this configuration matches an evaluation type, use it, otherwise create it |
| 53 | 53 | foreach (EvaluationType::has('gradeTypes')->get() as $evaluationType) { |
| 54 | 54 | if ($courseGradeTypes->diff($evaluationType->gradeTypes->pluck('id'))->count() == 0) { |
| 55 | - echo "match with eval type " . $evaluationType->id; |
|
| 55 | + echo "match with eval type ".$evaluationType->id; |
|
| 56 | 56 | $course->update(['evaluation_type_id' => $evaluationType->id]); |
| 57 | 57 | $matchFound = true; |
| 58 | 58 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | // if no match has been found |
| 62 | 62 | if (!$matchFound) { |
| 63 | 63 | echo "no match; creating new eval type"; |
| 64 | - $evalType = EvaluationType::create(['name' => 'cours ' . $entry->course_id]); |
|
| 64 | + $evalType = EvaluationType::create(['name' => 'cours '.$entry->course_id]); |
|
| 65 | 65 | $evalType->gradeTypes()->sync($courseGradeTypes); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $course = Course::find($entry->course_id); |
| 75 | 75 | $matchFound = false; |
| 76 | 76 | |
| 77 | - echo "\nMigrating skills from course " . $course->id; |
|
| 77 | + echo "\nMigrating skills from course ".$course->id; |
|
| 78 | 78 | |
| 79 | 79 | // collect all grade types associated to this course. |
| 80 | 80 | $courseSkills = DB::table('course_skill')->where('course_id', $entry->course_id)->pluck('skill_id'); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | // if no match has been found |
| 91 | 91 | if (!$matchFound) { |
| 92 | 92 | $levelName = isset($course->level) ? $course->level->name : $course->id; |
| 93 | - $evalType = EvaluationType::create(['name' => 'Niveau ' . $levelName]); |
|
| 93 | + $evalType = EvaluationType::create(['name' => 'Niveau '.$levelName]); |
|
| 94 | 94 | $evalType->skills()->sync($courseSkills); |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -37,13 +37,13 @@ |
||
| 37 | 37 | $period = Period::firstWhere('name', $record['year']); |
| 38 | 38 | |
| 39 | 39 | // Retrieve or create the student |
| 40 | - $email = $record['email'] !== "" ? $record['email'] : $this->stripAccents($record['firstname']) . "." . $this->stripAccents($record['name']) . "@academico.afsantiago.es"; |
|
| 40 | + $email = $record['email'] !== "" ? $record['email'] : $this->stripAccents($record['firstname']).".".$this->stripAccents($record['name'])."@academico.afsantiago.es"; |
|
| 41 | 41 | |
| 42 | 42 | if (User::where('email', $email)->count() > 0) { |
| 43 | 43 | $user = User::where('email', $email)->first(); |
| 44 | 44 | if (($user->firstname !== trim($record['firstname']) || $user->lastname !== trim($record['name']))) |
| 45 | 45 | { |
| 46 | - $email = $this->stripAccents($record['firstname']) . "." . $this->stripAccents($record['name']) . "@academico.afsantiago.es"; |
|
| 46 | + $email = $this->stripAccents($record['firstname']).".".$this->stripAccents($record['name'])."@academico.afsantiago.es"; |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
@@ -73,10 +73,10 @@ |
||
| 73 | 73 | { |
| 74 | 74 | if (config('app.currency_position') === 'before') |
| 75 | 75 | { |
| 76 | - return config('app.currency_symbol') . " ". $this->price; |
|
| 76 | + return config('app.currency_symbol')." ".$this->price; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - return $this->price . " " . config('app.currency_symbol'); |
|
| 79 | + return $this->price." ".config('app.currency_symbol'); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | public function getTypeAttribute() |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function setup() |
| 31 | 31 | { |
| 32 | 32 | CRUD::setModel(\App\Models\ScheduledPayment::class); |
| 33 | - CRUD::setRoute(config('backpack.base.route_prefix') . '/scheduled-payment'); |
|
| 33 | + CRUD::setRoute(config('backpack.base.route_prefix').'/scheduled-payment'); |
|
| 34 | 34 | CRUD::setEntityNameStrings(__('scheduled payment'), __('scheduled payments')); |
| 35 | 35 | CRUD::enableExportButtons(); |
| 36 | 36 | } |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | 'attribute' => 'lastname', |
| 50 | 50 | 'label' => __('Last Name'), |
| 51 | 51 | 'type' => 'relationship', |
| 52 | - 'searchLogic' => function ($query, $column, $searchTerm) { |
|
| 53 | - $query->orWhereHas('enrollment', function ($q) use ($searchTerm) { |
|
| 54 | - $q->whereHas('user', function ($q) use ($searchTerm) { |
|
| 52 | + 'searchLogic' => function($query, $column, $searchTerm) { |
|
| 53 | + $query->orWhereHas('enrollment', function($q) use ($searchTerm) { |
|
| 54 | + $q->whereHas('user', function($q) use ($searchTerm) { |
|
| 55 | 55 | $q->where('lastname', 'like', '%'.$searchTerm.'%'); |
| 56 | 56 | }); |
| 57 | 57 | }); |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | 'attribute' => 'firstname', |
| 65 | 65 | 'label' => __('First Name'), |
| 66 | 66 | 'type' => 'relationship', |
| 67 | - 'searchLogic' => function ($query, $column, $searchTerm) { |
|
| 68 | - $query->orWhereHas('enrollment', function ($q) use ($searchTerm) { |
|
| 69 | - $q->whereHas('user', function ($q) use ($searchTerm) { |
|
| 67 | + 'searchLogic' => function($query, $column, $searchTerm) { |
|
| 68 | + $query->orWhereHas('enrollment', function($q) use ($searchTerm) { |
|
| 69 | + $q->whereHas('user', function($q) use ($searchTerm) { |
|
| 70 | 70 | $q->where('firstname', 'like', '%'.$searchTerm.'%'); |
| 71 | 71 | }); |
| 72 | 72 | }); |
@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | 'attribute' => 'email', |
| 81 | 81 | 'label' => __('Email'), |
| 82 | 82 | 'type' => 'relationship', |
| 83 | - 'searchLogic' => function ($query, $column, $searchTerm) { |
|
| 84 | - $query->orWhereHas('enrollment', function ($q) use ($searchTerm) { |
|
| 85 | - $q->whereHas('user', function ($q) use ($searchTerm) { |
|
| 83 | + 'searchLogic' => function($query, $column, $searchTerm) { |
|
| 84 | + $query->orWhereHas('enrollment', function($q) use ($searchTerm) { |
|
| 85 | + $q->whereHas('user', function($q) use ($searchTerm) { |
|
| 86 | 86 | $q->where('email', 'like', '%'.$searchTerm.'%'); |
| 87 | 87 | }); |
| 88 | 88 | }); |
@@ -112,10 +112,10 @@ discard block |
||
| 112 | 112 | 'name' => 'status_id', |
| 113 | 113 | 'type' => 'select2', |
| 114 | 114 | 'label'=> __('Status'), |
| 115 | - ], function () { |
|
| 115 | + ], function() { |
|
| 116 | 116 | return EnrollmentStatusType::all()->pluck('name', 'id')->toArray(); |
| 117 | 117 | }, |
| 118 | - function ($value) { // if the filter is active |
|
| 118 | + function($value) { // if the filter is active |
|
| 119 | 119 | CRUD::addClause('where', 'status', $value); |
| 120 | 120 | }); |
| 121 | 121 | } |
@@ -101,10 +101,10 @@ discard block |
||
| 101 | 101 | { |
| 102 | 102 | if (config('app.currency_position') === 'before') |
| 103 | 103 | { |
| 104 | - return config('app.currency_symbol') . " ". $this->value; |
|
| 104 | + return config('app.currency_symbol')." ".$this->value; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - return $this->value . " " . config('app.currency_symbol'); |
|
| 107 | + return $this->value." ".config('app.currency_symbol'); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | function getDateForHumansAttribute() |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | public function identifiableAttribute() |
| 132 | 132 | { |
| 133 | - return $this->date . " (" . $this->value_with_currency . ")"; |
|
| 133 | + return $this->date." (".$this->value_with_currency.")"; |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | public function getStatusTypeNameAttribute() |