From e4105b53eaef01ac399e73cfa5cb78a1b20d38b4 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 13 Dec 2019 19:02:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A=E7=9A=84?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../homework_commons/_homework_public_navigation.json.jbuilder | 1 + app/views/homework_commons/index.json.jbuilder | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/homework_commons/_homework_public_navigation.json.jbuilder b/app/views/homework_commons/_homework_public_navigation.json.jbuilder index 243c6aecd..5570cec02 100644 --- a/app/views/homework_commons/_homework_public_navigation.json.jbuilder +++ b/app/views/homework_commons/_homework_public_navigation.json.jbuilder @@ -12,4 +12,5 @@ json.homework_type homework.homework_type if homework.homework_type == "practice" json.shixun_identifier homework.shixuns.take.try(:identifier) json.shixun_id homework.shixuns.take.try(:id) + json.shixun_status homework.shixuns.take.try(:status).to_i end diff --git a/app/views/homework_commons/index.json.jbuilder b/app/views/homework_commons/index.json.jbuilder index 9f0f9fdfd..35f321f45 100644 --- a/app/views/homework_commons/index.json.jbuilder +++ b/app/views/homework_commons/index.json.jbuilder @@ -29,6 +29,7 @@ json.homeworks @homework_commons.each do |homework| if @user_course_identity < Course::STUDENT if homework.homework_type == "practice" json.shixun_identifier homework.shixuns.take.try(:identifier) + json.shixun_status homework.shixuns.take.try(:status).to_i end elsif @user_course_identity == Course::STUDENT if homework.homework_type == "practice"