课程动态报错

This commit is contained in:
sw 2015-08-13 14:56:01 +08:00
parent 23f8bd8312
commit 4b5022bfc6
1 changed files with 17 additions and 15 deletions

View File

@ -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