|
|
|
@ -321,9 +321,9 @@ class ShixunsController < ApplicationController
|
|
|
|
|
@search_name = "#{sub.name} / #{tag.name}"
|
|
|
|
|
end
|
|
|
|
|
shixun_id = ShixunTagRepertoire.where(:tag_repertoire_id => tag).map(&:shixun_id)
|
|
|
|
|
@shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text]).where(:id => shixun_id, :hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
|
|
|
|
|
@shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text, :averge_star]).where(:id => shixun_id, :hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
|
|
|
|
|
else
|
|
|
|
|
@shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text]).where(:hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
|
|
|
|
|
@shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text, :averge_star]).where(:hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
|
|
|
|
|
end
|
|
|
|
|
# # 依据tag和语言推荐实训,如果tag不够,则依据语言推荐;语言不够,则取系统的三个
|
|
|
|
|
# @recommend_shixuns = Shixun.find_by_sql("select challenge_id from challenge_tags where name like
|
|
|
|
|