@extends('layouts.admin') @section('content')

{{ $paper->exam_type }} · {{ $paper->year }}

{{ $paper->title }}

{{ $paper->paper_code ?? 'Paper' }} · {{ $paper->total_questions ?? '—' }} questions · Duration: {{ $paper->duration_minutes ?? '—' }} min

View PDF
@csrf
Back
@if(session('status'))
{{ session('status') }}
@endif @if($errors->any())
@foreach($errors->all() as $e)
{{ $e }}
@endforeach
@endif {{-- Cut-off Card --}}
@php $cuts = [ 'General' => $paper->cut_off_general, 'OBC' => $paper->cut_off_obc, 'SC' => $paper->cut_off_sc, 'ST' => $paper->cut_off_st, 'AI Predicted' => $paper->predicted_cut_off, ]; @endphp @foreach($cuts as $label => $value)

{{ $label }}

{{ $value ?? '—' }}

@endforeach
{{-- AI Analysis --}} @if($paper->isAnalyzed()) @php $a = $paper->ai_analysis; @endphp
{{-- Summary --}}

AI Summary

{{ $a['summary'] ?? 'No summary available.' }}

@if(!empty($a['cut_off_reasoning']))

Cut-off reasoning: {{ $a['cut_off_reasoning'] }}

@endif @if(!empty($a['exam_trends']))

Exam trends: {{ $a['exam_trends'] }}

@endif
{{-- Subject Breakdown --}}

Subject Weightage

@forelse($a['subject_breakdown'] ?? [] as $s)
{{ $s['subject'] }} {{ $s['questions'] }} ({{ $s['percentage'] ?? '?' }}%)
@empty

No data.

@endforelse
{{-- Difficulty --}}

Difficulty Distribution

@php $d = $a['difficulty_breakdown'] ?? ['easy'=>0,'medium'=>0,'hard'=>0]; @endphp @foreach(['easy' => 'Easy', 'medium' => 'Medium', 'hard' => 'Hard'] as $k => $lbl)
{{ $lbl }}{{ $d[$k] ?? 0 }}%
@endforeach
{{-- Important Topics --}}

Important Topics

Topics to Skip

{{-- Student Strategy --}}

Student Strategy

{{-- Repeated Topics --}} @if(!empty($a['most_repeated_topics']))

Most Repeated Topics (across years)

@foreach($a['most_repeated_topics'] as $t) {{ $t }} @endforeach
@endif
@elseif($paper->ai_status === 'failed')
AI analysis failed: {{ $paper->ai_error }}
@else
AI analysis not yet run. Click "Run AI Analysis" above.
@endif @endsection