|
|
@@ -38,7 +38,7 @@ class ExamAnswerAnalysisController extends Controller
|
|
|
$validator = Validator::make($request->all(), [
|
|
|
'paper_id' => 'required|string|max:255',
|
|
|
'student_id' => 'required|numeric',
|
|
|
- 'questions' => 'required|array', // 允许空数组(全对时前端只传错题,全对则为空)
|
|
|
+ 'questions' => 'present|array', // present 允许空数组(全对时前端只传错题,全对则为空)
|
|
|
'questions.*.question_bank_id' => 'required|numeric',
|
|
|
'questions.*.student_answer' => 'sometimes|string',
|
|
|
'questions.*.is_correct' => 'sometimes|array',
|