学生端课程作业

This commit is contained in:
Dai 2024-08-07 10:51:00 +08:00
parent dfb9206b6b
commit cb82542ecd
3 changed files with 35 additions and 2 deletions

View File

@ -178,6 +178,33 @@ class SubjectHomeworkService
->with(['teacher', 'subject'])
->findOrEmpty();
if ($subject_homework->homework_file_url) {
$subject_homework->homework_file_url = json_decode($subject_homework->homework_file_url, true);
} else {
$subject_homework->homework_file_url = [];
}
if ($subject_homework->homework_version_file_url) {
$subject_homework->homework_version_file_url = json_decode($subject_homework->homework_version_file_url, true);
} else {
$subject_homework->homework_version_file_url = [];
}
if ($subject_homework->last_homework_feedback_url) {
$subject_homework->last_homework_feedback_url = json_decode($subject_homework->last_homework_feedback_url, true);
} else {
$subject_homework->last_homework_feedback_url = [];
}
if ($subject_homework->subject_report_url) {
$subject_homework->subject_report_url = json_decode($subject_homework->subject_report_url, true);
} else {
$subject_homework->subject_report_url = [];
}
if ($subject_homework->subject_file_url) {
$subject_homework->subject_file_url = json_decode($subject_homework->subject_file_url, true);
} else {
$subject_homework->subject_file_url = [];
}
return [
'code' => ResponseCode::SUCCESS,
'data' => $subject_homework,

View File

@ -210,6 +210,12 @@
}, {
title: "教师", align: "center",
field: "teacher_name",
}, {
title: "课程", align: "center",
field: "subject_name",
}, {
title: "课程【英文】", align: "center",
field: "english_name",
}, {
title: "教师排课id", align: "center",
field: "teacher_schedule_time_id",