@extends('layouts.app') @section('content') @if(auth()->user()->user_type == 2)
@php $classes = class_section_data(); @endphp
@foreach($classes as $class)
Class

{{ $class->name }}

Total Sections

{{ $class->sections->count() }}

Total Students

{{ $class->section->student_count ?? 0 }}

@foreach($class->sections as $section) @endforeach
Section Name Total Students Total Boys Total Girls Action
{{ $section->name ?? 'N/A' }}
{{ total_student_section_wise($section->id) }}
{{ total_male_student_section_wise($section->id) }}
{{ total_female_student_section_wise($section->id) }}
@endforeach
@elseif(auth()->user()->user_type == 5)
icon-1

No. of Students Enrolled

432

icon-1

Students participation

132

icon-1

No. of Teachers Enrolled

32

icon-1

Other Staff Enrolled

02

Average Lifestyle Risk Score

Avg Student BMI

Questionnaire Completion Percent

Nutrition Surveillance

$8,550 25%
$5,550 15%
$8,550 25%
$5,550 15%

Lifestyle Risk Assessement

@elseif(auth()->user()->user_type == 10)
@elseif(auth()->user()->user_type == 2)
Class

{{ auth()->user()->class->name ?? '' }}

Total Sections

{{ auth()->user()->sections->count() }}

Total Students

{{ auth()->user()->section->student_count ?? 0 }}

Section Name Total Students Total Boys Total Girls Action
Section Alpha
42
22
20
Section Beta
42
22
20
@elseif(auth()->user()->user_type == 5)
@elseif(auth()->user()->user_type == 3)
@csrf

{{ $questionnaire->title }}

{{-- ================= SECTION WISE QUESTIONS ================= --}} @if(isset($sections) && count($sections) > 0) @foreach($sections as $section)

{{-- Questions inside section --}} @foreach($section['questions'] as $question)
{{ $loop->iteration }}. {{ $question['question_text'] }}
{{-- TABLE WITH INPUT FIELDS --}} @if($question['question_type'] === 'table') @foreach($question['options'] as $index => $option) @endforeach
Sl. No. Row Name Your Answer
{{ $index + 1 }} {{ $option['text'] }}
@endif {{-- OBJECTIVE (Single Select / Radio) --}} @if($question['question_type'] === 'objective') @foreach($question['options'] as $option)
@endforeach @endif {{-- MULTISELECT --}} @if($question['question_type'] === 'multiselect') @foreach($question['options'] as $option)
@endforeach @endif {{-- TEXT --}} @if($question['question_type'] === 'text') @endif
@endforeach
@endforeach @endif {{-- ================= UNSECTIONED QUESTIONS (General Questions) ================= --}} @if((!isset($sections) || count($sections) == 0) && count($unsectioned) > 0)

@foreach($unsectioned as $uq)
{{ $loop->iteration }}. {{ $uq['question_text'] }}
{{-- RADIO --}} @if($uq['question_type'] == 'radio') @foreach(questionoptions($uq['question_id']) as $option)
@endforeach @endif {{-- OBJECTIVE (checkbox but single allowed by JS later) --}} @if($uq['question_type'] == 'objective') @foreach(questionoptions($uq['question_id']) as $option)
@endforeach @endif {{-- MULTISELECT --}} @if($uq['question_type'] == 'multiselect') @foreach(questionoptions($uq['question_id']) as $option)
@endforeach @endif {{-- TEXT --}} @if($uq['question_type'] == 'text') @endif
@endforeach
@endif
{{-- END ACCORDION --}}
@endif {{-- ========== AJAX SCRIPT ========== --}} @endsection