@extends('backEnd.master') @section('title') @lang('reports.result_archive') @endsection @section('mainContent')

@lang('common.select') @lang('criteria')

{{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'session_student', 'method' => 'POST', 'enctype' => 'multipart/form-data', 'id' => 'search_student']) }}
{{ Form::close() }}
@if (!empty($promotes))
{{-- --}}

{{isset(generalSetting()->school_name)?generalSetting()->school_name:'Infix School Management ERP'}}

{{isset(generalSetting()->address)?generalSetting()->address:'Infix School Address'}}

{{-- --}}

!! @lang('student.student_information')

@lang('common.name'): {{ $studentDetails->full_name }}
@lang('reports.transcript_none'): {{ $studentDetails->admission_number }}
@php $mother=App\SmStudent::where('sm_students.id',$studentDetails->student_id)->join('sm_parents','sm_parents.id','=','sm_students.parent_id')->first(); @endphp @lang('student.mother_name'): {{ $mother->mothers_name }}
@lang('common.date_of_birth'): {{ $studentDetails->date_of_birth != ""? dateConvert($studentDetails->date_of_birth):''}}
@lang('common.name'): {{ $studentDetails->full_name }}
@lang('common.class'): {{ $current_class->class_name }}
@lang('common.section') : {{ $current_section->section_name }}
@lang('student.admission_no'): {{ $studentDetails->admission_number }}
@lang('reports.transcript_none'): 23423423
@lang('common.academic_year'): {{ $current_session->year }}
@lang('student.roll_number'): 102
@foreach ($promotes as $studentDetails) @php $student_id = $studentDetails->student_id; $class_id = $studentDetails->previous_class_id; $section_id = $studentDetails->previous_section_id; $year = $studentDetails->year; $current_class = App\SmStudent::where('sm_students.id', $student_id)->join('sm_classes', 'sm_classes.id', '=', 'sm_students.class_id')->first(); $current_section = App\SmStudent::where('sm_students.id', $student_id)->join('sm_sections', 'sm_sections.id', '=', 'sm_students.section_id')->first(); $current_session = App\SmStudent::where('sm_students.id', $student_id)->join('sm_academic_years', 'sm_academic_years.id', '=', 'sm_students.session_id')->first(); $exams = App\SmExam::where('active_status', 1)->where('class_id', $class_id)->where('section_id', $section_id)->get(); $exam_types = App\SmExamType::where('active_status', 1)->where('academic_id', getAcademicId())->get(); $classes = App\SmClass::where('active_status', 1)->where('academic_id', getAcademicId())->get(); $exam_setup = App\SmExamSetup::where([['class_id', $class_id], ['section_id', $section_id]])->get(); $subjects = App\SmAssignSubject::where([['class_id', $class_id], ['section_id', $section_id]])->get(); $assinged_exam_types = []; foreach ($exams as $exam) { $assinged_exam_types[] = $exam->exam_type_id; } $assinged_exam_types = array_unique($assinged_exam_types); foreach ($assinged_exam_types as $assinged_exam_type) { foreach ($subjects as $subject) { $is_mark_available = App\SmResultStore::where([['class_id', $class_id], ['section_id', $section_id], ['student_id', $student_id], ['subject_id', $subject->subject_id], ['exam_type_id', $assinged_exam_type]])->first(); // return $is_mark_available; if ($is_mark_available == "") { return redirect('session-student')->with('message-danger', 'Ops! Your result is not found! Please check mark register.'); } } } $is_result_available = App\SmResultStore::where([['class_id', $class_id], ['section_id', $section_id], ['student_id', $student_id]])->get(); @endphp @if ($is_result_available->count() > 0)
@lang('lang.exam_terms'): @php $exam=App\SmExamType::where('id',$is_mark_available->exam_type_id)->first(); @endphp {{ $exam->title }}
@lang('student.roll'): {{ $studentDetails->previous_roll_number }}
@lang('common.class'): @php $class=App\SmClass::where('id',$is_mark_available->class_id)->first(); @endphp {{ $class->class_name }}
@lang('exam.exam_result'): {{$is_mark_available->created_at != ""? dateConvert($is_mark_available->created_at):''}}
@foreach($assinged_exam_types as $assinged_exam_type) @php $exam_type = App\SmExamType::examType($assinged_exam_type); @endphp @endforeach @foreach($assinged_exam_types as $assinged_exam_type) @endforeach @php $total_fail = 0; $total_marks = 0; @endphp @foreach($subjects as $data) @endforeach @php $colspan = 4 + count($assinged_exam_types) * 2; @endphp
@lang('common.subjects'){{$exam_type->title}}@lang('exam.result') @lang('exam.grade') @lang('exam.gpa')
@lang('exam.marks') @lang('exam.grade')
{{$data->subject !=""?$data->subject->subject_name:""}} {{$totalSumSub}} @php if($totalSubjectFail > 0){ echo 'F'; }else{ $totalSumSub = $totalSumSub / count($assinged_exam_types); $mark_grade = App\SmMarksGrade::where([['percent_from', '<=', $totalSumSub], ['percent_upto', '>=', $totalSumSub]])->where('academic_id', getAcademicId())->first(); echo @$mark_grade->grade_name; } @endphp @php if($totalSubjectFail > 0){ echo 'F'; }else{ $mark_grade = App\SmMarksGrade::where([['percent_from', '<=', $totalSumSub], ['percent_upto', '>=', $totalSumSub]])->where('academic_id', getAcademicId())->first(); echo @$mark_grade->gpa; } @endphp
@lang('exam.total_marks') {{$total_marks}}
@lang('exam.total_grade') @php if($total_fail != 0){ echo 'F'; }else{ $total_exam_subject = count($subjects) + count($assinged_exam_types); $average_mark = $total_marks / $total_exam_subject; $average_grade = App\SmMarksGrade::where([['percent_from', '<=', $totalSumSub], ['percent_upto', '>=', $totalSumSub]])->where('academic_id', getAcademicId())->first(); echo @$average_grade->grade_name; } @endphp
@lang('reports.total_gpa') @php if($total_fail != 0){ echo '0.00'; }else{ $total_exam_subject = count($subjects) + count($assinged_exam_types); $average_mark = $total_marks / $total_exam_subject; $average_grade = App\SmMarksGrade::where([['percent_from', '<=', $totalSumSub], ['percent_upto', '>=', $totalSumSub]])->where('academic_id', getAcademicId())->first(); echo @$average_grade->gpa; } @endphp
{{-- @else
Ops! Previous Result not found
--}} @endif @endforeach
{{-- @else
Ops! Previous Result not found
--}} @endif
@endsection('mainContent')