From 4b5022bfc6d994ecc65cd9315504a4ba2863e079 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 13 Aug 2015 14:56:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=8A=A8=E6=80=81=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index da7a34a98..27a973213 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -711,21 +711,23 @@ module CoursesHelper #课程动态的描述 def course_activity_desc activity desc = "" - case activity.course_act_type - when "Course" - desc = "" - when "HomeworkCommon" - desc = activity.course_act.description - when "News" - desc = activity.course_act.description - when "Attachment" - desc = "" - when "Message" - desc = activity.course_act.content - when "JournalsForMessage" - desc = "" - when "Poll" - desc = activity.course_act.polls_description + if activity.course_act + case activity.course_act_type + when "Course" + desc = "" + when "HomeworkCommon" + desc = activity.course_act.description + when "News" + desc = activity.course_act.description + when "Attachment" + desc = "" + when "Message" + desc = activity.course_act.content + when "JournalsForMessage" + desc = "" + when "Poll" + desc = activity.course_act.polls_description + end end desc.html_safe end