|
|
|
@ -332,6 +332,11 @@ class ShixunsController < ApplicationController
|
|
|
|
|
# @recommend_shixuns = Shixun.find_by_sql("select challenge_id from challenge_tags where name like
|
|
|
|
|
# CONCAT('%',(select name from challenge_tags where challenge_id in (select id from challenges where shixun_id=61)),'%')")
|
|
|
|
|
|
|
|
|
|
# 只有老师身份才能查看实训列表
|
|
|
|
|
unless User.current.is_certification_teacher || User.current.admin?
|
|
|
|
|
@shixuns = @shixuns.where("status > ?", 1)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@obj_count = @shixuns.count
|
|
|
|
|
@limit = 16
|
|
|
|
|
@is_remote = true
|
|
|
|
|