修改课程创建问题
This commit is contained in:
parent
5c6bf7f9c8
commit
43a0a875f4
|
@ -516,7 +516,7 @@ class ProjectsController < ApplicationController
|
||||||
m = Member.new(:user => User.current, :roles => [r])
|
m = Member.new(:user => User.current, :roles => [r])
|
||||||
project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id)
|
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"
|
||||||
project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0)
|
project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0, :project_type => @course_tag)
|
||||||
end
|
end
|
||||||
@project.members << m
|
@project.members << m
|
||||||
@project.project_infos << project
|
@project.project_infos << project
|
||||||
|
|
Loading…
Reference in New Issue