默认显示公共资源
This commit is contained in:
parent
a4f2ebb73b
commit
909d40b4eb
|
@ -2050,7 +2050,7 @@ class UsersController < ApplicationController
|
|||
@score = @b_sort == "desc" ? "asc" : "desc"
|
||||
user_project_ids = User.current.projects.map {|p| p.id}
|
||||
user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
|
||||
if(params[:type].blank? || params[:type] == "1") # 我的资源
|
||||
if(params[:type] == "1") # 我的资源
|
||||
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
|
||||
if params[:status] == "2"
|
||||
@attachments = get_course_resources(params[:id], user_course_ids, @order, @score)
|
||||
|
@ -2064,7 +2064,7 @@ class UsersController < ApplicationController
|
|||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score)
|
||||
end
|
||||
elsif params[:type] == "6" # 公共资源
|
||||
elsif (params[:type].blank? || params[:type] == "6") # 公共资源
|
||||
if params[:status] == "2"
|
||||
@attachments = get_course_resources_public( user_course_ids, @order, @score)
|
||||
elsif params[:status] == "3"
|
||||
|
@ -2203,7 +2203,7 @@ class UsersController < ApplicationController
|
|||
@score = @b_sort == "desc" ? "asc" : "desc"
|
||||
user_project_ids = User.current.projects.map {|p| p.id}
|
||||
user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
|
||||
if(params[:type].blank? || params[:type] == "1") # 我的资源
|
||||
if(params[:type] == "1") # 我的资源
|
||||
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
|
||||
if params[:status] == "2"
|
||||
@attachments = get_course_resources(params[:id], user_course_ids, @order, @score)
|
||||
|
@ -2217,7 +2217,7 @@ class UsersController < ApplicationController
|
|||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score)
|
||||
end
|
||||
elsif params[:type] == "6" # 公共资源
|
||||
elsif (params[:type].blank? || params[:type] == "6") # 公共资源
|
||||
if params[:status] == "2"
|
||||
@attachments = get_course_resources_public( user_course_ids, @order, @score)
|
||||
elsif params[:status] == "3"
|
||||
|
@ -2344,7 +2344,7 @@ class UsersController < ApplicationController
|
|||
@score = @b_sort == "desc" ? "asc" : "desc"
|
||||
user_project_ids = User.current.projects.map {|p| p.id}
|
||||
user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
|
||||
if(params[:type].blank? || params[:type] == "1") # 我的资源
|
||||
if(params[:type] == "1") # 我的资源
|
||||
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
|
||||
if params[:status] == "2"
|
||||
@attachments = get_course_resources(params[:id], user_course_ids, @order, @score)
|
||||
|
@ -2358,7 +2358,7 @@ class UsersController < ApplicationController
|
|||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score)
|
||||
end
|
||||
elsif params[:type] == "6" # 公共资源
|
||||
elsif (params[:type].blank? || params[:type] == "6") # 公共资源
|
||||
if params[:status] == "2"
|
||||
@attachments = get_course_resources_public( user_course_ids, @order, @score)
|
||||
elsif params[:status] == "3"
|
||||
|
|
Loading…
Reference in New Issue