{{Auth::user()->school->name}}

{{Auth::user()->school->address}}

{{Auth::user()->school->name}}

@lang('Tabulation Sheet')

@php $cName = subjectOrCourseNameWithOutS(); $className = school('country')->code == 'BD' ? transMsg('Class') : transMsg('Grade'); $old_course_code = ''; $code_array=[101,102,107,108]; $agreecolspan = $highcolspan =5; @endphp
@foreach($results as $result) @break @endforeach
{{$className}} @lang('Section') @lang('Group') @lang('Exam') @lang('Session')
{{$result->class_name}} {{$result->section_number}} {{$result->group}} {{$result->exam->exam_name}} @php $currentSession = currentSession(); @endphp {{$currentSession->schoolyear}}
@foreach($courses as $course) @endforeach @foreach($courses as $course) @if($old_course_code == $course->code && $result->comorsep == 1 && in_array($course->code,$code_array)) @else @php $old_course_code = $course->code+1; @endphp @endif @endforeach @php $pre_stu=null;$student_array=array();$key=1;$td_ca =$td_mcq=$td_practical= false;$tdcount=5 @endphp @foreach($results as $result) @if (!in_array($result->student_code,$student_array)) @php array_push($student_array,$result->student_code);$pre_stu=$result->student_code;$sub_total=$sub_gpa=$subject_count=$optional_grade=$com_total=0;$optional=$fail=$optional_fail=false;$print_text='';$com_start=true;$com_count=1;$course_next_code = '';$studentgpa=0 @endphp @foreach($courses as $course) @php $course_colspan=0;$mcq_written_fail = false; @endphp @if(in_array($course->id,explode(',',$result->course_groups))) @if($course->code == '134') @php $agreecolspan =5 @endphp @endif @if($course->code == '126') @php $highcolspan =5 @endphp @endif @foreach($results as $t_result) @if($t_result->course_id == $course->id && $pre_stu == $t_result->student_code) @if(!in_array($course->id,explode(',',$t_result->countiAss))) @php $sub_total += round($t_result->marks); @endphp @endif @if ($t_result->ca) @php ${"ca" . $course->id} = true; $td_ca = true;@endphp @else @if (!isset(${"ca" . $course->id})) @php $course_colspan +=1 @endphp @push('script') @endpush @php $print_text= $print_text.'#ca_'.$course->id.'{display: none;}'@endphp @elseif(isset(${"ca" . $course->id}) && $td_ca) @endif @endif @php $writtenfail = $mcqfail = false; if($t_result->written_mcq_marge == 2){ if($t_result->written_pass_mark > $t_result->written){ $writtenfail = true;$mcq_written_fail = true; if($t_result->optional == 0) $fail = true; } if($t_result->mcq_pass_mark > $t_result->mcq){ $mcqfail = true;$mcq_written_fail = true; if($t_result->optional == 0) $fail = true; } } @endphp @if ($t_result->mcq) @php ${"mcq" . $course->id} = true;$td_mcq = true; @endphp @else @if (!isset(${"mcq" . $course->id})) @php $course_colspan +=1 @endphp @push('script') @endpush @php $print_text= $print_text.'#mcq_'.$course->id.'{display: none;}'@endphp @elseif(isset(${"mcq" . $course->id}) && $td_mcq) @endif @endif @if ($t_result->practical) @php ${"practical" . $course->id} = true;$td_practical = true;@endphp @else @if (!isset(${"practical" . $course->id})) @if($course->code == '134') @php $agreecolspan -=1 @endphp @endif @if($course->code == '126') @php $highcolspan -=1 @endphp @endif @php $course_colspan +=1 @endphp @push('script') @endpush @php $print_text= $print_text.'#practical_'.$course->id.'{display: none;}'@endphp @elseif(isset(${"practical" . $course->id}) && $td_practical) @endif @endif @if($result->comorsep == 1 && in_array($course->code,$code_array)) @if($com_count == 2) @if($course_next_code == $course->code) @php $com_count = 1;$com_total += round($t_result->marks);$course_colspan -=1;$subject_count++; @endphp @php $com_total =0; @endphp @push('script') @endpush @else @endif @else @php $course_colspan +=1;$com_total += round($t_result->marks);$com_count++;$course_next_code = $course->code +1 @endphp @push('script') @endpush @endif @else @push('script') @endpush @endif @if ($optional == false && $t_result->optional == 1) @php $optional=true; $optional_grade=$t_result->gpa; @endphp @endif @break @endif @endforeach @push('script') @endpush @else @if($course->code == '134') @php $tdcount= $agreecolspan @endphp @elseif($course->code == '126') @php $tdcount= $highcolspan @endphp @endif @for($td=0;$td<$tdcount;$td++) @endfor @endif @endforeach @endif @endforeach
@lang('SI') @lang('Student Code') @lang('Roll') @lang('Name'){{$course->name}}@lang('Final')
@lang('CA') @lang('CQ') @lang('MCQ') @lang('P') @lang('Total') @lang('LG')@lang('S Total') @lang('LG')@lang('Total') @lang('GPA') @lang('LG') @lang('Merit')
{{$key++}} {{$result->student_code}} {{$result->class_roll}} {{$result->student_name}}{{round($t_result->ca)}}0{{round($t_result->written)}}{{round($t_result->mcq)}}0{{round($t_result->practical)}}0 {{round($t_result->marks)}} {{$com_total}} @foreach(get_combined_grade($result->combined_grade) as $grade_sys) @if(round($com_total) >= $grade_sys->from_mark && round($com_total) <= $grade_sys->to_mark) @php $sub_gpa +=$grade_sys->point;@endphp @if (strtolower($grade_sys->grade) == 'f') @php $fail=true; @endphp @endif {{$mcq_written_fail ? 'F' : $grade_sys->grade}} @endif @endforeach @php $gradesystemsMany = (new \App\CourseConfig())->gradeSystemMany($t_result->course_config_id); @endphp @foreach($gradesystemsMany as $gs) @if(round($t_result->marks) >= $gs->from_mark && round($t_result->marks) <= $gs->to_mark) {{$mcq_written_fail ? 'F' : $gs->grade}} @if(!in_array($course->id,explode(',',$t_result->countiAss))) @php $sub_gpa +=$gs->point;$subject_count++; @endphp @endif @if (strtolower($gs->grade) == 'f' && $t_result->optional != 1) @php $fail=true; @endphp @endif @break @endif @endforeach @php $gradesystemsMany = (new \App\CourseConfig())->gradeSystemMany($t_result->course_config_id); @endphp @foreach($gradesystemsMany as $gs) @if(round($t_result->marks) >= $gs->from_mark && round($t_result->marks) <= $gs->to_mark) {{$mcq_written_fail ? 'F' : $gs->grade}} @if(!in_array($course->id,explode(',',$t_result->countiAss))) @php $sub_gpa +=$gs->point;$subject_count++; @endphp @endif @if (strtolower($gs->grade) == 'f' && $t_result->optional != 1) @php $fail=true; @endphp @endif @break @endif @endforeach {{round($sub_total)}} @php if($optional){ $subject_count = $subject_count -1 ; if ($optional_grade >= 2) { $optional_minus = 2; }elseif ($optional_grade >= 1) { $optional_minus = 1; }else{ $optional_minus = 0; } $sub_gpa = $sub_gpa - $optional_minus; } $gpa = $sub_gpa / $subject_count; if ($gpa > 5) { $gpa = 5; } if ($fail) echo '0.00'; else echo number_format($gpa,2); @endphp @foreach(get_static_grade_system() as $gs) @if($gpa >= $gs['point']) @if ($fail) F @else {{$gs['grade']}} @endif @break @endif @endforeach @if ($fail) F @else @foreach($positions as $step => $position) @if ($position && $position['student_code'] == $result->student_code) {{convert_ordinary($step+1)}} @endif @endforeach @endif