修改课程创建问题

This commit is contained in:
huangjingquan 2013-09-30 10:38:30 +08:00
parent 5c6bf7f9c8
commit 43a0a875f4
1 changed files with 1 additions and 1 deletions

View File

@ -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