From 22d7e92d4ca2bec2ca9d4e4b9837c6fccbb62b23 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 27 May 2017 14:55:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E6=A8=A1=E5=9D=97=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course.rb | 2 +- app/views/syllabuses/index.html.erb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/course.rb b/app/models/course.rb index f3f89273f..6c546f591 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -362,7 +362,7 @@ class Course < ActiveRecord::Base if mod.blank? type = ["news", "boards", "attachment", "homework", "poll", "exercises", "statistics"] for i in 0..6 - CourseModule.create(:course_id => self.id, :type => type[i], :position => i + 1, :hidden => 0 ) + CourseModule.create(:course_id => self.id, :module_type => type[i], :position => i + 1, :hidden => 0 ) end mod = self.course_modules end diff --git a/app/views/syllabuses/index.html.erb b/app/views/syllabuses/index.html.erb index c17f29d11..7868f6fab 100644 --- a/app/views/syllabuses/index.html.erb +++ b/app/views/syllabuses/index.html.erb @@ -23,7 +23,7 @@

- @@ -93,6 +93,5 @@ }) });*/ - });