@extends('backpack::layout') @section('header')

{{ __('base.marks.title') }}

@endsection @section('content')
@php //$status = \App\Models\Student::find(\Auth::id()); if(!empty($status)){ $status_slug = $status->student_status_slug; } else { $status_slug = 'active'; } @endphp @if(!in_array($status_slug, ['suspend', 'deduct']))
{{ __('main.semesters') }}: {{ __('main.all_semesters') }} @if(!empty($semesters)) @foreach ($semesters as $key => $semester) {{ $semester }} @endforeach @endif
@if(!empty($statements))
@foreach($statements as $statement) @php $student = $statement->students->where('id', auth()->user()->id)->first(); # $marsk = $marsk->pluck('value', 'mark_group.slug')->toArray(); $marsk = $student->marks->where('statement_id', $statement->id)->pluck('value', 'mark_group.slug'); @endphp @php $marsk = $student->marks->where('statement_id', $statement->id); $marsk = $marsk->pluck('value', 'mark_group.slug')->toArray(); $intermediate_sum = $student->marks ->where('statement_id', $statement->id) ->where('mark_group_id','>=', 11) ->where('mark_group_id','<=', 25) ->pluck('value', 'mark_group.slug') ->sum(); $disabled = function() use ($student){ if( $student->student_status_slug != 'active' ){ echo 'disabled'; } }; $readonly = function() use ($student){ if( $student->student_status_slug == 'suspend' ){ echo 'readonly '; echo 'style="border-color: #ffc107; cursor: not-allowed;"'; } if( $student->student_status_slug == 'deduct'){ echo 'readonly '; echo 'style="border-color: #dc3545; cursor: not-allowed;"'; } }; $isSuspend = false; if($student->student_status_slug == 'suspend'){ $isSuspend = true; } $final = $marsk['ects'] ?? null; if(in_array($final, ['A', 'B', 'C', 'D', 'E'])){ $color = 'background-color: #32CD32'; // если студент получил больше 51 балла, то вывести этот цвет #32CD32 } elseif(in_array($final, ['Fx'])) { $color = 'background-color: #B22222'; // если студент получил FX, то выводить этот цвет #B22222 } elseif(in_array($final, ['F'])) { $color = 'background-color: #FF0000'; // если студент получил F - то выводить этот цвет #FF0000 } elseif(array_key_exists('total', $marsk) && $marsk['total'] >= 13 && ((!isset($marsk['final-exam-iii']) || (isset($marsk['final-exam-iii']) && $marsk['final-exam-iii'] == 0)))) { $color = 'background-color: #FFD700'; // если студент получил больше 13 баллов до финального экзамена, то вывести этот цвет #FFD700 } @endphp @endforeach
{{ __('base.subjects_plural') }} {{ __('base.osce.code') }} {{ __('base.osce.1') }} {{ __('base.osce.2') }} {{ __('base.osce.3') }} {{ __('base.osce.4') }} {{ __('base.osce.5') }} {{ __('base.osce.6') }} {{ __('base.osce.7') }} {{ __('base.osce.8') }} {{ __('base.osce.osce_result') }} {{ __('base.osce.result_test') }} {{ __('base.osce.result_ex') }} {{ __('base.osce.get_ball') }} {{ __('base.osce.result') }} {{ __('base.osce.ects') }}
{{ $statement->subject->name }} {{ $marsk['code'] ?? '' }} {{ $marsk['1'] ?? '' }} {{ $marsk['2'] ?? '' }} {{ $marsk['3'] ?? '' }} {{ $marsk['4'] ?? '' }} {{ $marsk['5'] ?? '' }} {{ $marsk['6'] ?? '' }} {{ $marsk['7'] ?? '' }} {{ $marsk['8'] ?? '' }} {{ $marsk['osce_result'] ?? '' }} {{ $marsk['result_test'] ?? '' }} {{ $marsk['result_ex'] ?? '' }} {{ $marsk['get_ball'] ?? '' }} {{ $marsk['result'] ?? '' }} {{ $marsk['ects'] ?? '' }}
@if(!empty($statements))
@if(!empty($statements->previousPageUrl())) @endif @if($statements->currentPage() > 3) 1 @endif @if($statements->currentPage() > 4) ... @endif @if($statements->currentPage() > 2) {{ $statements->currentPage() - 2 }} @endif @if(!empty($statements->previousPageUrl())) {{ $statements->currentPage() - 1 }} @endif {{ $statements->currentPage() }} @if($statements->hasMorePages()) {{ $statements->currentPage() + 1 }} @endif @if(($statements->lastPage() - $statements->currentPage()) > 2) {{ $statements->currentPage() + 2 }} @endif @if(($statements->lastPage() - $statements->currentPage()) > 3) ... @endif @if(!($statements->lastPage() == $statements->currentPage()) and ($statements->lastPage() - $statements->currentPage()) > 1) {{ $statements->lastPage() }} @endif @if($statements->hasMorePages()) @endif
@endif
GPA = {{ $gpa }}
@endif
@else

{{ __('student.title') }}!

{{ __('student.text') }}
@endif
@endsection