修改错误
This commit is contained in:
parent
d1846e6303
commit
b5da95d5ce
|
@ -31,7 +31,9 @@ module Mobile
|
|||
mount Apis::Watches
|
||||
mount Apis::Upgrade
|
||||
|
||||
add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'})
|
||||
#add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'})
|
||||
add_swagger_documentation ({api_version: 'v1', base_path: '/api'})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ module Mobile
|
|||
requires :is_public, type: Integer, desc: '是否公开 1公开 0私有'
|
||||
requires :open_student, type: Integer, desc: '是否公开学生列表1公开,0不公开,不公开时非课程成员无法看到学生列表'
|
||||
requires :course_type, type:Integer, desc: '暂时传1'
|
||||
requires :term, type: String, desc: '学期(秋秀学期或春秀学期)'
|
||||
requires :term, type: String, desc: '学期(秋季学期或春季学期)'
|
||||
requires :time, type: String, desc: '年份'
|
||||
requires :class_period, type: String, desc: '学时总数'
|
||||
end
|
||||
|
|
|
@ -126,7 +126,7 @@ class CoursesService
|
|||
if current_user.user_extensions.identity
|
||||
@course = Course.new
|
||||
@course.extra = 'course' + DateTime.parse(Time.now.to_s).strftime('%Y-%m-%d_%H-%M-%S').to_s
|
||||
@course.safe_attributes = params[:course]
|
||||
@course.safe_attributes = params[:course],current_user
|
||||
@course.tea_id = User.current.id
|
||||
@course.term = params[:term]
|
||||
@course.time = params[:time]
|
||||
|
|
19
db/schema.rb
19
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20141210070327) do
|
||||
ActiveRecord::Schema.define(:version => 20141231020031) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -495,13 +495,15 @@ ActiveRecord::Schema.define(:version => 20141210070327) do
|
|||
create_table "homework_attaches", :force => true do |t|
|
||||
t.integer "bid_id"
|
||||
t.integer "user_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "reward"
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
t.integer "state"
|
||||
t.integer "project_id", :default => 0
|
||||
t.integer "project_id", :default => 0
|
||||
t.float "score", :default => 0.0
|
||||
t.integer "is_teacher_score", :default => 0
|
||||
end
|
||||
|
||||
create_table "homework_evaluations", :force => true do |t|
|
||||
|
@ -989,13 +991,14 @@ ActiveRecord::Schema.define(:version => 20141210070327) do
|
|||
end
|
||||
|
||||
create_table "seems_rateable_rates", :force => true do |t|
|
||||
t.integer "rater_id", :limit => 8
|
||||
t.integer "rater_id", :limit => 8
|
||||
t.integer "rateable_id"
|
||||
t.string "rateable_type"
|
||||
t.float "stars", :null => false
|
||||
t.float "stars", :null => false
|
||||
t.string "dimension"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "is_teacher_score", :default => 0
|
||||
end
|
||||
|
||||
create_table "settings", :force => true do |t|
|
||||
|
|
Loading…
Reference in New Issue