增加教师优先字段
This commit is contained in:
parent
1ed1957899
commit
84bb5af86f
|
@ -445,6 +445,7 @@ class UsersController < ApplicationController
|
|||
homework.publish_time = Time.now
|
||||
homework.homework_type = params[:homework_type].to_i || 1
|
||||
homework.late_penalty = 10
|
||||
homework.teacher_priority = 1
|
||||
homework.user_id = User.current.id
|
||||
homework.course_id = params[:course_id]
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddTeacherPriorityToHomework < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :homework_commons,:teacher_priority,:integer,:default => 1
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue