fix 学生上传课程作业
This commit is contained in:
parent
34e07d8bd6
commit
be59c0a49a
@ -40,7 +40,12 @@ class StudentHomeworkService
|
||||
|
||||
$data = $request->post();
|
||||
|
||||
$subject_homework = SubjectHomework::where(['id' => $data['subject_homework_id'], 'is_publish' => 1])->findOrEmpty();
|
||||
$student_schedule = StudentSchedule::where(['id' => $data['subject_homework_id']])->findOrEmpty();
|
||||
if($student_schedule->isEmpty()){
|
||||
throw new Exception('未找到学生排课信息');
|
||||
}
|
||||
|
||||
$subject_homework = SubjectHomework::where(['teacher_schedule_time_id' => $student_schedule->teacher_schedule_time_id, 'is_publish' => 1])->findOrEmpty();
|
||||
if ($subject_homework->isEmpty()) {
|
||||
throw new Exception('老师还未布置课程作业');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user