默认为“公共资源”
This commit is contained in:
parent
f18c3ed667
commit
352b40dd96
|
@ -2836,7 +2836,7 @@ class UsersController < ApplicationController
|
|||
user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id}
|
||||
user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id }
|
||||
# user_org_ids = User.current.organizations.map {|o| o.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)
|
||||
|
@ -2850,7 +2850,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