试卷答题分析

@if($this->ocrRecord && $this->paper)
@endif
@if($this->ocrRecord && $this->paper)

试卷名称

{{ $this->paperInfo()['paper_name'] }}

学生信息

{{ $this->studentInfo()['name'] ?? '未知' }} ({{ $this->studentInfo()['grade'] ?? '' }}{{ $this->studentInfo()['class'] ?? '' }})

试卷概况

{{ $this->paperInfo()['total_questions'] }}题 / {{ $this->paperInfo()['total_score'] }}分

题目匹配情况

OCR识别与系统试卷匹配

系统试卷共 {{ $this->paper->total_questions ?? count($matchedQuestions) }} 道题

当前匹配 {{ count($matchedQuestions) }} 道题

@php $matchedCount = collect($matchedQuestions)->whereNotNull('ocr_id')->count(); $unmatchedCount = collect($matchedQuestions)->whereNull('ocr_id')->count(); @endphp

{{ $matchedCount }} 道已识别 | {{ $unmatchedCount }} 道未识别

试卷原图与识别区域

@if($this->ocrRecord->image_path) Exam Paper @foreach($matchedQuestions as $question) @if(isset($question['bbox']) && is_array($question['bbox'])) @php $yMin = $question['bbox']['y_min'] ?? 0; $yMax = $question['bbox']['y_max'] ?? 0; $height = $yMax - $yMin; // Assuming width is full width for now, or we can use a fixed percentage if we don't have x-coordinates // Since we only have Y-range, we'll draw a full-width box @endphp
Q{{ $question['question_number'] }}
@endif @endforeach @else

图片未找到

@endif
@if(count($matchedQuestions) > 0)

答题详情

@foreach($matchedQuestions as $index => $question) @endforeach
题号 知识点 学生答案 正确答案 得分 OCR状态 评分状态
{{ $index + 1 }} {{ $question['knowledge_point'] }} {{ $question['student_answer'] ?: '未作答' }} {{ $question['correct_answer'] }} @if($question['score'] !== null) {{ $question['score'] }}分 / {{ $question['full_score'] }}分 @else 未评分 @endif @if($question['ocr_id']) 已识别 @if(isset($question['ocr_confidence'])) {{ round($question['ocr_confidence'] * 100, 1) }}% @endif @else 未识别 @endif @if($question['is_correct'] !== null) @if($question['is_correct']) 正确 @else 错误 @endif @else 待分析 @endif
@endif @if($this->hasAnalysis())

分析结果统计

题目总数

{{ $this->getAnalysisStats()['total'] }}

正确题数

{{ $this->getAnalysisStats()['correct'] }}

正确率

{{ $this->getAnalysisStats()['accuracy'] }}%

得分率

{{ $this->getAnalysisStats()['score_rate'] }}%

总分:{{ $this->getAnalysisStats()['score'] }} / {{ $this->getAnalysisStats()['full_score'] }}

生成详细报告
@endif @else

无法加载试卷信息

请确保OCR记录存在且已关联到系统生成的试卷

@endif