|
|
|
@ -24,8 +24,7 @@ class GraduationTopicsController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 当前用户是否已经选过题
|
|
|
|
|
user_graduation_topics = @course.student_graduation_topics.where(user_id: current_user.id, status: [0, 1]) #6.12 -hs
|
|
|
|
|
@user_selected = user_graduation_topics.size > 0
|
|
|
|
|
@user_selected = @course.student_graduation_topics.where(user_id: current_user.id, status: [0, 1]).count > 0 #6.12 -hs
|
|
|
|
|
## 分页参数
|
|
|
|
|
page = params[:page] || 1
|
|
|
|
|
limit = params[:limit] || 15
|
|
|
|
|