教师课程安排添加字段

This commit is contained in:
Dai 2024-08-14 14:16:38 +08:00
parent fc085efef8
commit 8dd3ab6a9d

View File

@ -121,7 +121,14 @@ class TeacherScheduleTimeService
} }
} }
if($item['studentHomework']){ if($item['studentHomework']){
$item['has_homework'] = 0;
foreach ($item['studentHomework'] as $index => $value) {
if($value['is_publish']){
$item['has_homework'] = 1; $item['has_homework'] = 1;
}else{
unset($item['studentHomework'][$index]);
}
}
}else{ }else{
$item['has_homework'] = 0; $item['has_homework'] = 0;
} }