增加教师优先字段

This commit is contained in:
sw 2015-09-17 10:24:37 +08:00
parent 1ed1957899
commit 84bb5af86f
2 changed files with 6 additions and 0 deletions

View File

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

View File

@ -0,0 +1,5 @@
class AddTeacherPriorityToHomework < ActiveRecord::Migration
def change
add_column :homework_commons,:teacher_priority,:integer,:default => 1
end
end