|
|
|
@ -61,7 +61,7 @@ class CoursesController < ApplicationController
|
|
|
|
|
@user = current_user
|
|
|
|
|
# 根据分类查询课堂(全部,我的,最新,最热)
|
|
|
|
|
@order = params[:order].present? ? params[:order] : "all"
|
|
|
|
|
@courses = current_laboratory.main_site? ? Course.not_deleted : current_laboratory.courses.not_deleted
|
|
|
|
|
@courses = current_laboratory.courses.not_deleted
|
|
|
|
|
if @order == "visits"
|
|
|
|
|
order_str = "courses.id = 1309 DESC, courses.visits DESC"
|
|
|
|
|
@courses = @courses.where(is_hidden: 0)
|
|
|
|
|