课程动态,无对应数据时报错
This commit is contained in:
parent
4b5022bfc6
commit
3e9f3f4e70
|
@ -682,6 +682,7 @@ module CoursesHelper
|
|||
# activity = CourseActivity.first
|
||||
title = ""
|
||||
url = ""
|
||||
if activity.course_act
|
||||
case activity.course_act_type
|
||||
when "Course"
|
||||
title = activity.course_act.name
|
||||
|
@ -705,6 +706,7 @@ module CoursesHelper
|
|||
title = "问卷 " + activity.course_act.polls_name
|
||||
url = poll_index_path(:polls_type => "Course", :polls_group_id => activity.course_id)
|
||||
end
|
||||
end
|
||||
link_to title.gsub(/<(?!img)[^>]*>/,'').html_safe, url, :class => "problem_tit c_dblue fl fb"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue