@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | use Webpatser\Uuid\Uuid; |
8 | 8 | |
9 | 9 | |
10 | -class Institution_student extends Base_Model { |
|
10 | +class Institution_student extends Base_Model { |
|
11 | 11 | |
12 | 12 | |
13 | 13 | public const CREATED_AT = 'created'; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * |
32 | 32 | * @var array |
33 | 33 | */ |
34 | - protected $fillable = ['student_status_id', 'student_id', 'education_grade_id', 'academic_period_id', 'start_date', 'start_year', 'end_date', 'end_year', 'institution_id', 'previous_institution_student_id', 'modified_user_id', 'modified', 'created_user_id', 'created', 'area_administrative_id','admission_id']; |
|
34 | + protected $fillable = ['student_status_id', 'student_id', 'education_grade_id', 'academic_period_id', 'start_date', 'start_year', 'end_date', 'end_year', 'institution_id', 'previous_institution_student_id', 'modified_user_id', 'modified', 'created_user_id', 'created', 'area_administrative_id', 'admission_id']; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * The attributes excluded from the model's JSON form. |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
52 | 52 | */ |
53 | - public function institutionStudents(){ |
|
54 | - return $this->belongsTo('App\Security_user','student_id'); |
|
53 | + public function institutionStudents() { |
|
54 | + return $this->belongsTo('App\Security_user', 'student_id'); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | public static function boot() |
61 | 61 | { |
62 | 62 | parent::boot(); |
63 | - self::creating(function ($model) { |
|
63 | + self::creating(function($model) { |
|
64 | 64 | $model->id = (string) Uuid::generate(4); |
65 | 65 | $model->created = now(); |
66 | 66 | }); |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | * |
78 | 78 | * |
79 | 79 | */ |
80 | - public static function isDuplicated($inputs){ |
|
80 | + public static function isDuplicated($inputs) { |
|
81 | 81 | |
82 | - $exists = self::where('student_id','=',$inputs['student_id'])->count(); |
|
82 | + $exists = self::where('student_id', '=', $inputs['student_id'])->count(); |
|
83 | 83 | |
84 | 84 | |
85 | 85 | return $exists; |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | * @param $academicPeriod |
101 | 101 | * @return array |
102 | 102 | */ |
103 | - public function getStudentListToPromote($institutionGrade, $academicPeriod){ |
|
103 | + public function getStudentListToPromote($institutionGrade, $academicPeriod) { |
|
104 | 104 | return self::query() |
105 | - ->select('institution_students.id','institution_students.student_id','institution_students.student_status_id', |
|
106 | - 'institution_students.education_grade_id','institution_students.education_grade_id', |
|
107 | - 'institution_students.academic_period_id','institution_students.institution_id', |
|
108 | - 'institution_students.created_user_id','institution_students.admission_id') |
|
105 | + ->select('institution_students.id', 'institution_students.student_id', 'institution_students.student_status_id', |
|
106 | + 'institution_students.education_grade_id', 'institution_students.education_grade_id', |
|
107 | + 'institution_students.academic_period_id', 'institution_students.institution_id', |
|
108 | + 'institution_students.created_user_id', 'institution_students.admission_id') |
|
109 | 109 | ->where('institution_students.institution_id', $institutionGrade['institution_id']) |
110 | 110 | ->where('institution_students.education_grade_id', $institutionGrade['education_grade_id']) |
111 | 111 | ->where('institution_students.academic_period_id', $academicPeriod->id)->get()->toArray(); |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | use App\Models\Base_Model; |
7 | 7 | use Webpatser\Uuid\Uuid; |
8 | 8 | |
9 | -class Student_guardian extends Base_Model { |
|
9 | +class Student_guardian extends Base_Model { |
|
10 | 10 | |
11 | 11 | |
12 | 12 | public const CREATED_AT = 'created'; |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | public static function boot() |
56 | 56 | { |
57 | 57 | parent::boot(); |
58 | - self::creating(function ($model) { |
|
58 | + self::creating(function($model) { |
|
59 | 59 | $model->id = (string) Uuid::generate(4); |
60 | 60 | $model->created_user_id = 1; |
61 | 61 | }); |
62 | 62 | } |
63 | 63 | |
64 | - public static function createStudentGuardian($student,$guardian,$user){ |
|
64 | + public static function createStudentGuardian($student, $guardian, $user) { |
|
65 | 65 | |
66 | 66 | $data = [ |
67 | 67 | 'student_id' => $student->student_id, |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | |
5 | 5 | use Illuminate\Database\Eloquent\Model; |
6 | 6 | |
7 | -class Import_mapping extends Model { |
|
7 | +class Import_mapping extends Model { |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * The database table used by the model. |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | protected $dates = []; |
43 | 43 | |
44 | 44 | |
45 | - public static function getSheetColumns($model = null){ |
|
45 | + public static function getSheetColumns($model = null) { |
|
46 | 46 | $columns = Import_mapping::where('model', '=', $model) |
47 | 47 | ->orderBy('order') |
48 | 48 | ->get()->toArray(); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | use Illuminate\Database\Eloquent\Model; |
8 | 8 | |
9 | 9 | |
10 | -class Education_programmes_next_programme extends Model { |
|
10 | +class Education_programmes_next_programme extends Model { |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * The database table used by the model. |
@@ -45,8 +45,8 @@ |
||
45 | 45 | public function build() |
46 | 46 | { |
47 | 47 | return $this->view('emails.mail') |
48 | - ->from($this->from_address,$this->from_name) |
|
49 | - ->to($this->user->email) |
|
48 | + ->from($this->from_address,$this->from_name) |
|
49 | + ->to($this->user->email) |
|
50 | 50 | ->subject($this->subject) |
51 | 51 | ->with($this->with); |
52 | 52 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $institution = Institution_class::find($file['institution_class_id']); |
25 | 25 | |
26 | 26 | $this->user = User::find($file['security_user_id']); |
27 | - $this->subject = 'SIS Bulk upload: '. $file['subject'] .$institution->institution->code.': '. $institution->name.' ' . date('Y:m:d H:i:s'); |
|
27 | + $this->subject = 'SIS Bulk upload: '.$file['subject'].$institution->institution->code.': '.$institution->name.' '.date('Y:m:d H:i:s'); |
|
28 | 28 | $this->from_address = env('MAIL_FROM_ADDRESS'); |
29 | 29 | $this->from_name = 'SIS Bulk Uploader'; |
30 | 30 | $this->with = [ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function build() |
46 | 46 | { |
47 | 47 | return $this->view('emails.mail') |
48 | - ->from($this->from_address,$this->from_name) |
|
48 | + ->from($this->from_address, $this->from_name) |
|
49 | 49 | ->to($this->user->email) |
50 | 50 | ->subject($this->subject) |
51 | 51 | ->with($this->with); |
@@ -11,11 +11,11 @@ |
||
11 | 11 | { |
12 | 12 | use Queueable, SerializesModels; |
13 | 13 | |
14 | - /** |
|
15 | - * Create a new message instance. |
|
16 | - * |
|
17 | - * @return void |
|
18 | - */ |
|
14 | + /** |
|
15 | + * Create a new message instance. |
|
16 | + * |
|
17 | + * @return void |
|
18 | + */ |
|
19 | 19 | public function __construct($file) |
20 | 20 | { |
21 | 21 |
@@ -23,15 +23,15 @@ discard block |
||
23 | 23 | |
24 | 24 | |
25 | 25 | $this->user = User::find($file['security_user_id']); |
26 | - $this->subject = 'SIS Bulk Upload: IncorrectTemplate'.$institution->institution->code.': '. $institution->name.' '. date('Y:m:d H:i:s'); |
|
26 | + $this->subject = 'SIS Bulk Upload: IncorrectTemplate'.$institution->institution->code.': '.$institution->name.' '.date('Y:m:d H:i:s'); |
|
27 | 27 | $this->from_address = env('MAIL_FROM_ADDRESS'); |
28 | 28 | $this->from_name = 'SIS Bulk Uploader'; |
29 | 29 | $this->with = [ |
30 | 30 | 'name' => $this->user->first_name, |
31 | - 'link' => env('APP_URL').'/download/' .$file['filename'] |
|
31 | + 'link' => env('APP_URL').'/download/'.$file['filename'] |
|
32 | 32 | $this->viewData = [ |
33 | 33 | 'name'=>$this->user->first_name, "body" => "The Template you used for upload having some issues, please reconfirm and re-upload with correct template", |
34 | - 'link' => env('APP_URL').'/download/' .$file['filename'] |
|
34 | + 'link' => env('APP_URL').'/download/'.$file['filename'] |
|
35 | 35 | ]; |
36 | 36 | } |
37 | 37 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | public function build() |
44 | 44 | { |
45 | 45 | return $this->view('emails.mail') |
46 | - ->from($this->from_address,$this->from_name) |
|
46 | + ->from($this->from_address, $this->from_name) |
|
47 | 47 | ->to($this->user->email) |
48 | 48 | ->subject($this->subject) |
49 | 49 | ->with($this->with); |
@@ -31,16 +31,16 @@ discard block |
||
31 | 31 | $institution = Institution_class::find($file['institution_class_id']); |
32 | 32 | |
33 | 33 | $this->user = User::find($file['security_user_id']); |
34 | - $this->subject = 'SIS Bulk Upload: Upload Failed '.$institution->institution->code.': '. $institution->name . date('Y:m:d H:i:s'); |
|
34 | + $this->subject = 'SIS Bulk Upload: Upload Failed '.$institution->institution->code.': '.$institution->name.date('Y:m:d H:i:s'); |
|
35 | 35 | $this->from_address = env('MAIL_FROM_ADDRESS'); |
36 | 36 | $this->from_name = 'SIS Bulk Uploader'; |
37 | 37 | $this->with = [ |
38 | 38 | 'name' => $this->user->first_name, |
39 | - 'link' => env('APP_URL').'/download/' .$file['filename'] |
|
39 | + 'link' => env('APP_URL').'/download/'.$file['filename'] |
|
40 | 40 | ]; |
41 | 41 | $this->viewData = [ |
42 | 42 | 'name'=>$this->user->first_name, "body" => "The class you tried to import data is exceeded the student count limit.Please check the class / increase the student limit", |
43 | - 'link' => env('APP_URL').'/download/' .$file['filename'] |
|
43 | + 'link' => env('APP_URL').'/download/'.$file['filename'] |
|
44 | 44 | ]; |
45 | 45 | } |
46 | 46 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | public function build() |
53 | 53 | { |
54 | 54 | return $this->view('emails.mail') |
55 | - ->from($this->from_address,$this->from_name) |
|
55 | + ->from($this->from_address, $this->from_name) |
|
56 | 56 | ->to($this->user->email) |
57 | 57 | ->subject($this->subject) |
58 | 58 | ->with($this->with); |
@@ -24,17 +24,17 @@ discard block |
||
24 | 24 | |
25 | 25 | |
26 | 26 | $this->user = User::find($file['security_user_id']); |
27 | - $this->subject = 'SIS Bulk Upload: ' .$file['subject']. $institution->institution->code.': '. $institution->name.' '. date('Y:m:d H:i:s'); |
|
27 | + $this->subject = 'SIS Bulk Upload: '.$file['subject'].$institution->institution->code.': '.$institution->name.' '.date('Y:m:d H:i:s'); |
|
28 | 28 | $this->from_address = env('MAIL_FROM_ADDRESS'); |
29 | 29 | $this->from_name = 'SIS Bulk Uploader'; |
30 | 30 | $this->with = [ |
31 | 31 | 'name' => $this->user->first_name, |
32 | - 'link' => env('APP_URL').'/download/' .$file['filename'] |
|
32 | + 'link' => env('APP_URL').'/download/'.$file['filename'] |
|
33 | 33 | ]; |
34 | 34 | $this->viewData = [ |
35 | - 'name'=>$this->user->first_name, "body" => "We found some errors on your data file ". $file['filename']. ' Pleas fix the errors and re-upload only with incorrect data, |
|
35 | + 'name'=>$this->user->first_name, "body" => "We found some errors on your data file ".$file['filename'].' Pleas fix the errors and re-upload only with incorrect data, |
|
36 | 36 | We uploaded the correct data to the system', |
37 | - 'link' => env('APP_URL').'/download/' .$file['filename'] |
|
37 | + 'link' => env('APP_URL').'/download/'.$file['filename'] |
|
38 | 38 | ]; |
39 | 39 | } |
40 | 40 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | public function build() |
47 | 47 | { |
48 | 48 | return $this->view('emails.mail') |
49 | - ->from($this->from_address,$this->from_name) |
|
49 | + ->from($this->from_address, $this->from_name) |
|
50 | 50 | ->to($this->user->email) |
51 | 51 | ->subject($this->subject) |
52 | 52 | ->with($this->with); |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | |
23 | 23 | $institution = Institution_class::find($file['institution_class_id']); |
24 | 24 | $this->user = User::find($file['security_user_id']); |
25 | - $this->subject = 'SIS Bulk Upload: Process Terminated'.$institution->institution->code.': '. $institution->name.' '. date('Y:m:d H:i:s'); |
|
25 | + $this->subject = 'SIS Bulk Upload: Process Terminated'.$institution->institution->code.': '.$institution->name.' '.date('Y:m:d H:i:s'); |
|
26 | 26 | $this->from_address = env('MAIL_FROM_ADDRESS'); |
27 | 27 | $this->from_name = 'SIS Bulk Uploader'; |
28 | 28 | $this->with = [ |
29 | 29 | 'name' => $this->user->first_name, |
30 | - 'link' => env('APP_URL').'/download/' .$file['filename'] |
|
30 | + 'link' => env('APP_URL').'/download/'.$file['filename'] |
|
31 | 31 | ]; |
32 | 32 | $this->viewData = [ |
33 | 33 | 'name'=>$this->user->first_name, "body" => "Apologize ,The process of you file has been terminated in the middle, |
34 | 34 | We advice you to check the student data and re-upload with only with correct data which are not in the system ", |
35 | - 'link' => env('APP_URL').'/download/' .$file['filename'] |
|
35 | + 'link' => env('APP_URL').'/download/'.$file['filename'] |
|
36 | 36 | ]; |
37 | 37 | } |
38 | 38 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public function build() |
45 | 45 | { |
46 | 46 | return $this->view('emails.mail') |
47 | - ->from($this->from_address,$this->from_name) |
|
47 | + ->from($this->from_address, $this->from_name) |
|
48 | 48 | ->to($this->user->email) |
49 | 49 | ->subject($this->subject) |
50 | 50 | ->with($this->with); |