@push('styles') @endpush @push('scripts') @endpush

智能出卷系统

基于知识点掌握度,智能生成个性化试卷

步骤 1:基本信息设置

设置试卷的基本参数

步骤 2:选择教师与学生

启用个性化出卷功能

@if(!$this->isTeacher)
@else
@endif
当前选择的教师
{{ $this->getSelectedTeacherName() }}
当前选择的学生
{{ $this->getSelectedStudentName() }}
@if($selectedTeacherId && $selectedStudentId)
针对性出卷已启用
@if($this->hasStudentWeaknesses)
将根据所选学生的薄弱知识点进行智能推荐,建议自动勾选相关知识点
@else
该学生暂无薄弱知识点数据,请在下方手动选择知识点
@endif
@endif
@if($selectedStudentId && $filterByStudentWeakness && count($this->studentWeaknesses) > 0)

学生薄弱知识点分析

基于答题数据的智能分析(共{{ count($this->studentWeaknesses) }}个)

智能分析结果(可选)

以下是根据该学生的答题数据自动分析出的薄弱知识点(共{{ count($this->studentWeaknesses) }}个)。 您可以选择这些薄弱点,或者在下方步骤3中手动选择任何知识点。 两个区域的知识点会合并生效。

@foreach($this->studentWeaknesses as $weakness) @php $isSelected = in_array($weakness['kp_code'], $selectedKpCodes); $masteryPercent = round(($weakness['mastery'] ?? 0) * 100, 1); $weaknessLevel = $weakness['weakness_level'] ?? (1 - ($weakness['mastery'] ?? 0)); $priority = $weakness['priority'] ?? '中'; $priorityColor = $priority === '高' ? 'bg-red-100 text-red-800 border-red-200' : ($priority === '中' ? 'bg-yellow-100 text-yellow-800 border-yellow-200' : 'bg-green-100 text-green-800 border-green-200'); @endphp
@if($isSelected) @else @endif
{{ $weakness['kp_name'] ?? $weakness['kp_code'] }} ({{ $weakness['kp_code'] }})
掌握度 {{ $masteryPercent }}%
练习次数 {{ $weakness['practice_count'] ?? 0 }}
成功率 {{ round(($weakness['success_rate'] ?? 0) * 100, 1) }}%
{{ $priority }}优先级
@endforeach
已选择 {{ count($selectedKpCodes) }} 个知识点
@endif

步骤 3:选择知识点

勾选要考查的知识点(已选择: {{ count($selectedKpCodes) }} 个)

@if($selectedStudentId && $filterByStudentWeakness && count($this->studentWeaknesses) > 0)

💡 提示:您也可以在上方选择学生的薄弱知识点,两个区域的知识点会合并生效

@endif
@foreach($this->knowledgePoints as $kp) @php $isSelected = in_array($kp['kp_code'], $selectedKpCodes); @endphp @endforeach
@php $hasTeacherStudent = !empty($selectedTeacherId) && !empty($selectedStudentId); $hasKnowledgePoints = count($selectedKpCodes) > 0; $questionCountValid = $totalQuestions >= 6; $readyToGenerate = $this->canGenerate(); $missingSteps = []; if (empty($selectedTeacherId)) { $missingSteps[] = '选择教师'; } if (empty($selectedStudentId)) { $missingSteps[] = '选择学生'; } if (!$hasKnowledgePoints) { $missingSteps[] = '勾选至少 1 个知识点'; } if (!$questionCountValid) { $missingSteps[] = '题目数量需 ≥ 6 题'; } // 强制访问 selectedKpCodes 来触发 Livewire 刷新 $selectedKpCodesForDebug = $selectedKpCodes; // 调试信息 $debugInfo = "教师: " . ($selectedTeacherId ? "✓" : "✗") . " | 学生: " . ($selectedStudentId ? "✓" : "✗") . " | 知识点: " . ($hasKnowledgePoints ? "✓ (" . count($selectedKpCodesForDebug) . "个)" : "✗ (实际:" . count($selectedKpCodesForDebug) . "个)") . " | 题目数: " . ($questionCountValid ? "✓ ({$totalQuestions})" : "✗ ({$totalQuestions})"); // 显示实际的知识点代码 $kpCodesList = implode(', ', array_slice($selectedKpCodesForDebug, 0, 10)); if (count($selectedKpCodesForDebug) > 10) { $kpCodesList .= '...'; } @endphp

步骤 4:出卷前检查与生成

验证配置并生成试卷

{{ $readyToGenerate ? '✓ 可以生成试卷' : '⚠ 待完善配置' }}
@if($hasTeacherStudent) @else @endif
教师 / 学生

{{ $hasTeacherStudent ? '✓ ' . $this->getSelectedTeacherName() . ' / ' . $this->getSelectedStudentName() : '请选择教师和学生' }}

@if($hasKnowledgePoints) @else @endif
知识点选择

{{ $hasKnowledgePoints ? '✓ 已选 ' . count($selectedKpCodes) . ' 个知识点' : '请选择至少1个知识点' }}

@if($questionCountValid) @else @endif
题目数量

{{ $questionCountValid ? '✓ 将生成 ' . $totalQuestions . ' 题' : '至少需要6题' }}

@unless($readyToGenerate)

请完成以下必填项

{{ implode(' / ', $missingSteps) }}

实时状态: {{ $debugInfo }}

实际代码: {{ $kpCodesList ?: '(无)' }}

@endunless
@if($readyToGenerate && !$isGenerating)
@endif
@if($generatedPaperId)

🎉 试卷生成成功!

试卷ID: {{ $generatedPaperId }}
试卷已准备就绪,您可以查看预览或导出PDF

试卷预览

@endif