From 8216453a027f9486229244ab42a51a18f3642821 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 3 Feb 2015 16:03:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E4=BD=9C=E5=93=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0comment=5Fstatus=E5=AD=97=E6=AE=B5=200:=E6=89=80?= =?UTF-8?q?=E5=B1=9E=E4=BD=9C=E4=B8=9A=E5=B0=9A=E6=9C=AA=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=8C=BF=E8=AF=84=EF=BC=8C1=EF=BC=9A=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E4=B8=AD=202=EF=BC=9A=E5=8C=BF=E8=AF=84=E7=BB=93=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/homework_attach.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/api/mobile/entities/homework_attach.rb b/app/api/mobile/entities/homework_attach.rb index 256dcdf61..690ec8e94 100644 --- a/app/api/mobile/entities/homework_attach.rb +++ b/app/api/mobile/entities/homework_attach.rb @@ -17,6 +17,8 @@ module Mobile case field when :homework_times f.bid.courses.first.homeworks.index(f.bid) + 1 unless (f.bid.nil? || f.bid.courses.nil? || f.bid.courses.first.nil?) + when :comment_status + f.bid.comment_status end end end @@ -28,6 +30,8 @@ module Mobile homework_attach_expose :homework_times homework_attach_expose :description homework_attach_expose :created_at + #comment_status 0:所属作业尚未开启匿评,1:匿评中 2:匿评结束 + homework_attach_expose :comment_status expose :attachments,using: Mobile::Entities::Attachment do |f, opt| if f.respond_to?(:attachments) f.send(:attachments)