解决了课程创建时设置私有依旧显示在课程列表的bug
This commit is contained in:
parent
48a0f2f409
commit
8703709bd0
|
@ -515,7 +515,7 @@ class ProjectsController < ApplicationController
|
|||
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
||||
m = Member.new(:user => User.current, :roles => [r])
|
||||
project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id)
|
||||
if params[:project][:is_public] == '1' || @course_tag=="1"
|
||||
if (params[:project][:is_public] == '1' && @course_tag != "1") || (@course_tag=="1" && params[:project][:is_public] == '1')
|
||||
project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0, :project_type => @course_tag)
|
||||
end
|
||||
@project.members << m
|
||||
|
|
Loading…
Reference in New Issue