diff --git a/app/views/homework_commons/_student_btn_check.json.jbuilder b/app/views/homework_commons/_student_btn_check.json.jbuilder index efa89203d..7b34622fa 100644 --- a/app/views/homework_commons/_student_btn_check.json.jbuilder +++ b/app/views/homework_commons/_student_btn_check.json.jbuilder @@ -1,6 +1,8 @@ if identity == Course::STUDENT if homework.homework_type == "practice" - json.task_operation task_operation_url(work.try(:myshixun), homework.shixuns.take) + shixun = homework.shixuns.take + myshixun = work.try(:myshixun) ? work.myshixun : shixun.myshixuns.find_by(user_id: work.user_id) + json.task_operation task_operation_url(myshixun, shixun) json.view_report work.work_status > 0 json.commit_des commit_des_status(work, homework) else