@extends('admin.report.report') @section('page-title','') @section('breadcrumb') @include('admin.partials.crumb',[ 'crumbs'=>[ route('admin.dashboard')=>__('default.dashboard'), route('admin.report.index')=>__lang('reports'), '#'=>__lang('students') ]]) @endsection @section('content')
@foreach($rowset as $row) @php $student = \App\Student::find($row->id) @endphp @if($student) @php $attendance = $student->attendances()->where('course_id',$id)->count(); @endphp @php $testStats = $controller->getStudentTestsStats($row->id); @endphp @php $homeworkStats = $controller->getStudentAssignmentStats($row->id); @endphp @endif @endforeach
# {{__lang('student-name')}} {{__lang('enrolled-on')}} {{__lang('classes-attended')}} {{__lang('progress')}} {{__lang('tests-taken')}} {{__lang('average-test-score')}} {{__lang('test-grade')}} {{__lang('homework-submitted')}} {{__lang('average-homework-score')}} {{__lang('homework-grade')}} {{__lang('instructor-chats')}} {{__lang('forum-topics')}} {{__lang('forum-posts')}}
{{ $loop->iteration }} {{ $student->user->name.' '.$student->user->last_name }} @php $enrollment = $student->studentCourses()->where('course_id',$id)->first(); @endphp @if($enrollment) {{ showDate('d/M/Y',$enrollment->created_at) }} @endif {{ $attendance }} @php echo round(($attendance/$totalSessionLessons)*100) @endphp% {{ $testStats['testsTaken'] }} {{ $testStats['average'] }} {{ $testGradeTable->getGrade($testStats['average']) }} {{ $homeworkStats['submissions'] }} {{ $homeworkStats['average'] }} {{ $testGradeTable->getGrade($homeworkStats['average']) }} {{ $student->discussions()->where('course_id',$id)->count() }} {{ $student->user->forumTopics()->where('course_id',$id)->whereHas('user',function ($q){ $q->where('role_id',2); })->count() }} {{ $controller->getStudentTotalPosts($row->id) }}
{{__lang('enrolled-students')}}: {{ $session->studentCourses()->count() }}
{{__lang('total-classes')}}: {{ $session->lessons()->count() }}
{{__lang('total-students-attended')}}: {{ $attendanceTable->getTotalStudentsForSession($id) }}
{{__lang('total-tests')}}: {{ count($allTests) }}
{{__lang('total-homework')}}: {{ $session->assignments()->count() }}
@if($session->type=='c') @endif @foreach($session->lessons()->orderBy('pivot_sort_order')->orderBy('pivot_lesson_date')->get() as $row) @if($session->type=='c') @endif @php $totalAttended = $attendanceTable->getTotalStudentsForSessionAndLesson($session->id,$row->id); @endphp @php $total = $session->studentCourses()->count(); if(empty($total)){ $total=1; } @endphp @endforeach
# {{__lang('class')}}{{__lang('lectures')}}{{__lang('students-completed')}} {{__lang('completion-percentage')}}
{{ $loop->iteration }} {{ $row->name }}{{ $row->lectures()->count() }}{{ $totalAttended }}{{ ($totalAttended/$total)*100 }}%
@foreach($allTests as $testId) @php $test = \App\Test::find($testId); @endphp @if($test) @endif @endforeach
{{__lang('test')}} {{__lang('questions')}} {{__lang('passmark')}}
{{ $test->name }} {{ $test->testQuestions()->count() }} {{ $test->passmark }}%
@foreach($session->assignments as $assignment) @endforeach
{{__lang('homework')}} {{__lang('created-on')}} {{__lang('due-date')}} {{__lang('created-by')}} {{__lang('passmark')}} {{__lang('submissions')}}
{{ $assignment->title }} {{ showDate('d/M/Y',$assignment->created_at) }} {{ showDate('d/M/Y',$assignment->due_date) }} {{ $assignment->admin->user->name }} {{ $assignment->admin->user->last_name }} {{ $assignment->passmark }}% {{ $assignment->assignmentSubmissions()->count() }}
@endsection