@extends('superadmin.layout.master') @section('dashboard','active') @section('contant') @php use Carbon\Carbon; $dateEnd14 = Carbon::now()->subDays(14); $dateEnd28 = Carbon::now()->subDays(28); $dateEnd90 = Carbon::now()->subDays(90); $dateStart = Carbon::now(); @endphp

Accuracy Score (All Users)

@php if(!empty($all_problems) && $all_problems->where('status','!=','pending')->where('is_training','=',0)->count()>0) { $Accuracy = number_format($all_problems->where('status','correct')->count() * 100/$all_problems->where('status','!=','pending')->where('is_training','=',0)->count(),2); }else{ $Accuracy=0; } @endphp {{$Accuracy.'%'}}

Average Scores

{{$mcqsAvg}}

Total Scores

{{$mcqsSum}}
{{--

Answers

{{ $all_problems->count() }}
--}}
{{-- User --}} {{--

Users

{{$users->count()}}
@if(!empty($users)) @foreach($users as $user_val) @if($user_val->in_training==1) @else @endif @endforeach @endif
Tittle Last 14D Accuracy Last 14D Answers Last 28D Accuracy Last 28D Answers Last 90D Accuracy Last 90D Answers All Time Accuracy All Time Answers Edit
{{$user_val->name}} @if($user_val->problemResult->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() > 0) @php $accuracy= number_format($user_val->problemResult->where('status','correct')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() * 100/$user_val->problemResult->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count(),2) @endphp {{$accuracy.'%'}} @else @php $accuracy=0; @endphp 0% @endif {{$user_val->problemResult->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count()}} @if($user_val->problemResult->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() > 0) @php $accuracy= number_format($user_val->problemResult->where('status','correct')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() * 100/$user_val->problemResult->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count(),2) @endphp {{$accuracy.'%'}} @else @php $accuracy=0; @endphp 0% @endif {{$user_val->problemResult->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count()}} @if($user_val->problemResult->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() > 0) @php $accuracy= number_format($user_val->problemResult->where('status','correct')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() * 100/$user_val->problemResult->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count(),2) @endphp {{$accuracy.'%'}} @else @php $accuracy=0; @endphp 0% @endif {{$user_val->problemResult->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count()}} @if($user_val->problemResult->where('status','!=','pending')->count() > 0) @php $accuracy= number_format($user_val->problemResult->where('status','correct')->count() * 100/$user_val->problemResult->where('status','!=','pending')->count(),2) @endphp {{$accuracy.'%'}} @else @php $accuracy=0; @endphp 0% @endif {{$user_val->problemResult->where('status','!=','pending')->count()}} @if($user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() > 0) @php $accuracy= number_format($user_val->problemResult->where('status','correct')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() * 100/$user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count(),2) @endphp {{$accuracy.'%'}} @else @php $accuracy=0; @endphp 0% @endif {{$user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count()}} @if($user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() > 0) @php $accuracy= number_format($user_val->problemResult->where('status','correct')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() * 100/$user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count(),2) @endphp {{$accuracy.'%'}} @else @php $accuracy=0; @endphp 0% @endif {{$user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count()}} @if($user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() > 0) @php $accuracy= number_format($user_val->problemResult->where('status','correct')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() * 100/$user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count(),2) @endphp {{$accuracy.'%'}} @else @php $accuracy=0; @endphp 0% @endif {{$user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count()}} @if($user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->count() > 0) @php $accuracy= number_format($user_val->problemResult->where('status','correct')->where('is_training','=',0)->count() * 100/$user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->count(),2) @endphp {{$accuracy.'%'}} @else @php $accuracy=0; @endphp 0% @endif {{$user_val->problemResult->where('status','!=','pending')->where('is_training','=',0)->count()}}
Tittle Last 14D Accuracy Last 14D Answers Last 28D Accuracy Last 28D Answers Last 90D Accuracy Last 90D Answers all Time Accuracy All Time Answers Edit
--}} {{-- User --}} {{-- Open Problems --}}

Open Problems

{{$open_problems->count()}}
{{-- --}} @if(!empty($open_problems)) @foreach($open_problems as $open) {{-- --}} {{-- --}} @endforeach @endif {{-- --}}
Created Date Tittle Votes A#1 A#2A#3 A#4 A#5 A#6 A#7 A#8Correct Answer Status %Complete Score Edit
{{$open->created_at}} {{$open->title}} {{$open->problemResult->count()}} {{$open->problemResult->where('answer_number',1)->count()}} {{$open->problemResult->where('answer_number',2)->count()}} {{number_format($open->problemResult->where('answer_number',1)->where('is_training',0)->count() * 100/$open->max_total).'%'}} {{number_format($open->problemResult->where('answer_number',2)->where('is_training',0)->count() * 100/$open->max_total).'%'}} {{number_format($open->problemResult->where('answer_number',3)->where('is_training',0)->count() * 100/$open->max_total).'%'}} {{number_format($open->problemResult->where('answer_number',4)->where('is_training',0)->count() * 100/$open->max_total).'%'}} {{number_format($open->problemResult->where('answer_number',5)->where('is_training',0)->count() * 100/$open->max_total).'%'}} {{number_format($open->problemResult->where('answer_number',6)->where('is_training',0)->count() * 100/$open->max_total).'%'}} {{number_format($open->problemResult->where('answer_number',7)->where('is_training',0)->count() * 100/$open->max_total).'%'}} {{number_format($open->problemResult->where('answer_number',8)->where('is_training',0)->count() * 100/$open->max_total).'%'}} {{$open->correct_answer}} {{-- @if($open->problemResult->where('is_training','=',0)->count() >= $open->max_total || $open->end_date <= Carbon::now() || $open->is_active=='0') Closed @else Opened @endif --}} @if($open->is_active=='0' || $open->end_date <= Carbon::now()) Closed @else Opened @endif {{number_format($open->problemResult->where('is_training','=',0)->count() * 100/$open->max_total).'%'}} {{$open->score}}
Created Date Tittle #Votes A#1 A#2A#3 A#4 A#5 A#6 A#7 A#8Correct Answer Status %Complete Score Edit
{{-- Open Problems --}} {{-- handicap level --}}

Handicap levels

{{$handicapLevel->count()}}
@if(!empty($handicapLevel)) @foreach($handicapLevel as $key => $handicapLevel_value) @php $rangeStart = $handicapLevel_value->bottom_range; $rangeEnd = $handicapLevel_value->top_range; $filtered_events = array_filter($per_arr, function($var) use ($rangeStart, $rangeEnd) { $evtime = $var['percentage']; return $evtime <= $rangeEnd && $evtime >= $rangeStart; }); // dd($filtered_events); @endphp @endforeach @endif
Score %Range Weight (handicap) Users Edit
{{$handicapLevel_value->title}} {{$handicapLevel_value->bottom_range."% - ".$handicapLevel_value->top_range."%"}} {{$handicapLevel_value->weight}} {{count($filtered_events)}}
Score %Range Weight (handicap) Users Edit

Simple Pie Chart

    {{--
  • --}} {{--
  • --}}
  • {{--
  • --}}
{{-- handicap level --}} {{-- Donation History --}} {{--

Gift History

{{$gift->count()}}
@if(!empty($gift)) @foreach($gift as $key => $gift_value) @endforeach @endif
Date Organization Amount Status
{{$gift_value->date}} {{$gift_value->organization_name}} {{$gift_value->amount}} {{$gift_value->status}}
Date Organization Amount Status
--}} {{-- Donation History --}}
@endsection @push('script') @endpush