Handicap Score
@php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2);
} else {
$Accuracy = 0;
}
@endphp
@php
$level = $all_handicap
->where('bottom_range', '<=', $Accuracy)
->where('top_range', '>', $Accuracy)
->first();
@endphp
@if ($level)
{{ $level->title }}
@else
Not Available
@endif
Accuracy
@php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2);
} else {
$Accuracy = 0;
}
@endphp
{{ $Accuracy . '%' }}
Answers
{{ $all_problems->count() }}
Last 14 Calendar Days:
Handicap Score
@php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() * 100) / $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count(),2);
} else {
$Accuracy = 0;
}
@endphp
@php
$level = $all_handicap
->where('bottom_range', '<=', $Accuracy)
->where('top_range', '>', $Accuracy)
->first();
@endphp
@if ($level)
{{ $level->title }}
@else
Not Available
@endif
Accuracy
{{-- @php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2);
} else {
$Accuracy = 0;
}
@endphp --}}
{{ $Accuracy . '%' }}
Answers
{{ $all_problems->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() }}
Days Above 50%
{{ $per_arr[14] }}
Last 28 Calendar Days:
Handicap Score
@php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() * 100) / $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count(),2);
} else {
$Accuracy = 0;
}
@endphp
@php
$level = $all_handicap
->where('bottom_range', '<=', $Accuracy)
->where('top_range', '>', $Accuracy)
->first();
@endphp
@if ($level)
{{ $level->title }}
@else
Not Available
@endif
Accuracy
{{-- @php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2);
} else {
$Accuracy = 0;
}
@endphp --}}
{{ $Accuracy . '%' }}
Answers
{{ $all_problems->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() }}
Days Above 50%
{{ $per_arr[28] }}
Last 90 Calendar Days:
Handicap Score
@php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() * 100) / $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count(),2);
} else {
$Accuracy = 0;
}
@endphp
@php
$level = $all_handicap
->where('bottom_range', '<=', $Accuracy)
->where('top_range', '>', $Accuracy)
->first();
@endphp
@if ($level)
{{ $level->title }}
@else
Not Available
@endif
Accuracy
{{-- @php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2);
} else {
$Accuracy = 0;
}
@endphp --}}
{{ $Accuracy . '%' }}
Answers
{{ $all_problems->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() }}
Days Above 50%
{{ $per_arr[90] }}
All Time:
Handicap Score
@php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2);
} else {
$Accuracy = 0;
}
@endphp
@php
$level = $all_handicap
->where('bottom_range', '<=', $Accuracy)
->where('top_range', '>', $Accuracy)
->first();
@endphp
@if ($level)
{{ $level->title }}
@else
Not Available
@endif
Accuracy
{{-- @php
if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) {
$Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2);
} else {
$Accuracy = 0;
}
@endphp --}}
{{ $Accuracy . '%' }}
Answers
{{ $all_problems->count() }}
Days Above 50%
{{ $per_arr[$days] }}