| {{$key++}} |
{{$result->student_code}} |
{{$result->class_roll}} |
{{$result->student_name}} |
@foreach($courses as $course)
@php $course_colspan=0; @endphp
@if(in_array($course->id,explode(',',$result->course_groups)))
@foreach($results as $t_result)
@if($t_result->course_id == $course->id && $pre_stu == $t_result->student_code)
@php $sub_total += round($t_result->marks);$sub_gpa +=$t_result->gpa;$subject_count++; @endphp
@if ($t_result->ca)
@php ${"ca" . $course->id} = true; $td_ca = true;@endphp
{{round($t_result->ca)}} |
@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)
0 |
@endif
@endif
{{round($t_result->written)}} |
@if ($t_result->mcq)
@php ${"mcq" . $course->id} = true;$td_mcq = true; @endphp
{{round($t_result->mcq)}} |
@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)
0 |
@endif
@endif
@if ($t_result->practical)
@php ${"practical" . $course->id} = true;$td_practical = true;@endphp
{{round($t_result->practical)}} |
@else
@if (!isset(${"practical" . $course->id}))
@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)
0 |
@endif
@endif
{{round($t_result->marks)}} |
@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)
@if (strtolower($gs->grade) == 'f')
@php $fail=true; @endphp
@if($t_result->optional == 1)
@php $optional_fail = true @endphp
@endif
@endif
{{$gs->grade}}
@break
@endif
@endforeach
|
@if ($optional == false && $t_result->optional == 1)
@php $optional=true; $optional_grade=$t_result->gpa; @endphp
@endif
@break
@endif
@endforeach
@push('script')
@endpush
@else
|
|
|
|
|
@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 && $optional_fail)
echo '0.00';
else
echo number_format($gpa,2);
@endphp
|
@php
$first_gsystem = (new \App\Gradesystem())->where('school_id', auth()->user()->school_id)->select('grade_system_name')->distinct()->first();
$gradesystemsMany = (new \App\Gradesystem())->where('school_id', auth()->user()->school_id)->where('grade_system_name', $first_gsystem->grade_system_name)->get();
$previous_point=0;
@endphp
@foreach($gradesystemsMany as $gs)
@if($gpa >= $gs->point && $gpa <= $previous_point)
@if ($fail && $optional_fail)
F
@else
{{$gs->grade}}
@endif
@break
@endif
@php $previous_point=$gs->point @endphp
@endforeach
|
@if ($fail && $optional_fail)
F
@else
@php $position_no = 1; @endphp
@foreach($t_marits as $merit)
@if ($merit->student_code == $result->student_code)
{{convert_ordinary($position_no)}}
@endif
@php $position_no ++; @endphp
@endforeach
@endif
|
@endif
@endforeach