@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | break; |
| 193 | 193 | case 'empty'; |
| 194 | 194 | $students = Examination_student:: |
| 195 | - whereNull('nsid') |
|
| 195 | + whereNull('nsid') |
|
| 196 | 196 | ->where('grade', $this->grade) |
| 197 | 197 | ->where('year', $this->year) |
| 198 | 198 | ->offset($offset) |
@@ -323,13 +323,13 @@ discard block |
||
| 323 | 323 | $sis_student['student_id'] = $student['id' ]; |
| 324 | 324 | |
| 325 | 325 | $student = $this->setIsTakingExam($student); |
| 326 | - if (count($institutionClass) == 1) { |
|
| 326 | + if (count($institutionClass) == 1) { |
|
| 327 | 327 | $admissionInfo['instituion_class'] = $institutionClass[0]; |
| 328 | - Institution_student::createExaminationData($student, $admissionInfo); |
|
| 328 | + Institution_student::createExaminationData($student, $admissionInfo); |
|
| 329 | 329 | Institution_student_admission::createExaminationData($student, $admissionInfo); |
| 330 | 330 | Institution_class_student::createExaminationData($student, $admissionInfo); |
| 331 | 331 | } else { |
| 332 | - Institution_student_admission::createExaminationData($student, $admissionInfo); |
|
| 332 | + Institution_student_admission::createExaminationData($student, $admissionInfo); |
|
| 333 | 333 | Institution_student::createExaminationData($student, $admissionInfo); |
| 334 | 334 | } |
| 335 | 335 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function model(array $row) |
| 85 | 85 | { |
| 86 | - try { |
|
| 86 | + try { |
|
| 87 | 87 | $insertData = array( |
| 88 | 88 | 'st_no' => $row['st_no'], |
| 89 | 89 | 'stu_no' => $row['stu_no'], |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | "sp_center" => $row['sp_center'] |
| 103 | 103 | ); |
| 104 | 104 | Examination_student::insertData($insertData); |
| 105 | - } catch (\Throwable $th) { |
|
| 105 | + } catch (\Throwable $th) { |
|
| 106 | 106 | // dd($row); |
| 107 | - } |
|
| 107 | + } |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | public function rules(): array |
@@ -84,32 +84,32 @@ |
||
| 84 | 84 | try{ |
| 85 | 85 | $output->writeln($approvedstudent['student_id']."Updated"); |
| 86 | 86 | Institution_student::create([ |
| 87 | - 'student_status_id' => 1, |
|
| 88 | - 'student_id' => $approvedstudent['student_id'], |
|
| 89 | - 'education_grade_id' => $approvedstudent['education_grade_id'], |
|
| 90 | - 'academic_period_id' => $approvedstudent['academic_period_id'], |
|
| 91 | - 'start_date' => $approvedstudent['start_date'], |
|
| 92 | - 'start_year' => \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $approvedstudent['start_date'])->year , // $approvedstudent['start_date']->format('Y'), |
|
| 93 | - 'end_date' => $approvedstudent['end_date'], |
|
| 94 | - 'end_year' => \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $approvedstudent['end_date'])->year , //$approvedstudent['end_date']->format('Y'), |
|
| 95 | - 'institution_id' => $approvedstudent['institution_id'], |
|
| 96 | - 'admission_id' => $approvedstudent['admission_id'], |
|
| 97 | - 'created_user_id' => $approvedstudent['created_user_id'], |
|
| 98 | - ]); |
|
| 99 | - if(!is_null($approvedstudent['institution_class_id'])){ |
|
| 100 | - Institution_class_student::create([ |
|
| 101 | - 'student_id' => $approvedstudent['student_id'], |
|
| 102 | - 'institution_class_id' => $approvedstudent['institution_class_id'], |
|
| 103 | - 'education_grade_id' => $approvedstudent['education_grade_id'], |
|
| 104 | - 'academic_period_id' => $approvedstudent['academic_period_id'], |
|
| 105 | - 'institution_id' =>$approvedstudent['institution_id'], |
|
| 106 | - 'student_status_id' => 1, |
|
| 107 | - 'created_user_id' => $approvedstudent['created_user_id'], |
|
| 108 | - ]); |
|
| 109 | - } |
|
| 110 | - }catch (\Exception $e){ |
|
| 111 | - echo $e->getMessage(); |
|
| 112 | - } |
|
| 87 | + 'student_status_id' => 1, |
|
| 88 | + 'student_id' => $approvedstudent['student_id'], |
|
| 89 | + 'education_grade_id' => $approvedstudent['education_grade_id'], |
|
| 90 | + 'academic_period_id' => $approvedstudent['academic_period_id'], |
|
| 91 | + 'start_date' => $approvedstudent['start_date'], |
|
| 92 | + 'start_year' => \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $approvedstudent['start_date'])->year , // $approvedstudent['start_date']->format('Y'), |
|
| 93 | + 'end_date' => $approvedstudent['end_date'], |
|
| 94 | + 'end_year' => \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $approvedstudent['end_date'])->year , //$approvedstudent['end_date']->format('Y'), |
|
| 95 | + 'institution_id' => $approvedstudent['institution_id'], |
|
| 96 | + 'admission_id' => $approvedstudent['admission_id'], |
|
| 97 | + 'created_user_id' => $approvedstudent['created_user_id'], |
|
| 98 | + ]); |
|
| 99 | + if(!is_null($approvedstudent['institution_class_id'])){ |
|
| 100 | + Institution_class_student::create([ |
|
| 101 | + 'student_id' => $approvedstudent['student_id'], |
|
| 102 | + 'institution_class_id' => $approvedstudent['institution_class_id'], |
|
| 103 | + 'education_grade_id' => $approvedstudent['education_grade_id'], |
|
| 104 | + 'academic_period_id' => $approvedstudent['academic_period_id'], |
|
| 105 | + 'institution_id' =>$approvedstudent['institution_id'], |
|
| 106 | + 'student_status_id' => 1, |
|
| 107 | + 'created_user_id' => $approvedstudent['created_user_id'], |
|
| 108 | + ]); |
|
| 109 | + } |
|
| 110 | + }catch (\Exception $e){ |
|
| 111 | + echo $e->getMessage(); |
|
| 112 | + } |
|
| 113 | 113 | } |
| 114 | 114 | $output->writeln(' |
| 115 | 115 | #################################################### |