|
|
|
@ -845,12 +845,12 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
@shixuns = @shixuns.joins(:shixun_tag_repertoires).where(shixun_tag_repertoires: {tag_repertoire_id: type}).distinct
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@shixuns = @shixuns.select([:id, :name, :status, :myshixuns_count, :identifier, :user_id, :trainee]).reorder("shixuns.created_at desc")
|
|
|
|
|
@shixuns_count = @shixuns.size
|
|
|
|
|
@shixuns = @shixuns.select([:id, :name, :status, :myshixuns_count, :identifier, :user_id, :trainee])
|
|
|
|
|
@total_count = @shixuns.size
|
|
|
|
|
|
|
|
|
|
## 分页参数
|
|
|
|
|
page = params[:page] || 1
|
|
|
|
|
@shixuns = @shixuns.includes(:challenges, user: [user_extension: :school]).page(page).per(10)
|
|
|
|
|
@shixuns = @shixuns.reorder("shixuns.created_at desc").includes(:challenges, user: [user_extension: :school]).page(page).per(10)
|
|
|
|
|
|
|
|
|
|
# 新版用下面的代码
|
|
|
|
|
# ## 我的实训
|
|
|
|
|