From f5c912364773fb9483b552038c2a59242e2d7c80 Mon Sep 17 00:00:00 2001 From: nwb Date: Thu, 19 Jun 2014 09:37:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E5=88=9B=E5=BB=BA=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=90=8E=E6=88=90=E4=B8=BA=E8=AF=A5=E8=AF=BE=E7=A8=8B=E6=88=90?= =?UTF-8?q?=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 4 ++-- app/models/course.rb | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index ca409c55f..8883aabb8 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -235,7 +235,7 @@ class CoursesController < ApplicationController if User.current.user_extensions.identity == 0 if @course.save - unless User.current.admin? + #unless User.current.admin? 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]) m.project_id = -1 @@ -246,7 +246,7 @@ class CoursesController < ApplicationController end @course.members << m @course.course_infos << course - end + #end respond_to do |format| format.html { flash[:notice] = l(:notice_successful_create) diff --git a/app/models/course.rb b/app/models/course.rb index da5bb5be7..7a9e411d5 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -26,7 +26,6 @@ class Course < ActiveRecord::Base has_many :enabled_modules, :dependent => :delete_all has_many :boards, :dependent => :destroy, :order => "position ASC" #has_many :course_journals_for_messages, :class_name => 'CourseJournalsForMessage', :as => :jour, :dependent => :destroy - has_many :journals_for_messages, :as => :jour, :dependent => :destroy has_many :news, :dependent => :destroy, :include => :author acts_as_taggable