From 806788605919f03e1014c2b735e453405f1faf47 Mon Sep 17 00:00:00 2001 From: bohung Date: Thu, 15 Dec 2022 17:44:27 +0800 Subject: [PATCH] Fix link. --- app/models/selected_course.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/selected_course.rb b/app/models/selected_course.rb index c433f68..3a92093 100644 --- a/app/models/selected_course.rb +++ b/app/models/selected_course.rb @@ -132,7 +132,10 @@ class SelectedCourse pd_data = [] fields_to_show.collect do |t| if t == "course_title" - pd_data << { "data_title" => "#{p.send(t)}" } + link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_selected_course') + url_to_plugin_show_blank = OrbitHelper.instance_variable_get(:@url_to_plugin_show_blank) + tmp_title = p.course_title + pd_data << { "data_title" => (url_to_plugin_show_blank ? tmp_title : "#{tmp_title}") } elsif t == "selected_course_category" pd_data << {"data_title" => (p.course.course_category.title rescue "")} elsif t == "course_url"