@extends('admin.layouts.master') @section('title','Progress Report View') @section('maincontent') @include('admin.layouts.topbar',$data)
{{ __('Progress Report View') }}
@foreach($progress as $progres) @if(!is_null($progres->user) && !is_null($progres->courses)) @php if(Auth::user()->role == "instructor") { $check = $progres->courses->user_id == Auth::user()->id; } else{ $check = $progres->courses; } @endphp @if($check) @php $total_class = $progres->all_chapter_id; $total_count = count($total_class); $total_per = 100; $read_class = $progres->mark_chapter_id; $read_count = count($read_class); $progres_total = ($read_count/$total_count) * 100; @endphp @endif @endif @endforeach
{{ __('User') }} {{ __('Course') }} {{ __('Progress') }}
{{ optional($progres->user)->fname}} {{ optional($progres->courses)->title}}
@if($progres_total == '100')
{{ $progres_total }}%
@elseif($progres_total <= '50')
{{ $progres_total }}%
@elseif($progres_total >= '25')
{{ $progres_total }}%
@endif
@endsection