Merge branch 'cxt_course' into develop

Conflicts:
	db/schema.rb
This commit is contained in:
cxt 2016-04-21 10:02:16 +08:00
commit 76b37d7670
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,21 @@
class AlterHomeworkEndTime < ActiveRecord::Migration
def up
homeworks = HomeworkCommon.where("id in (3229, 3234, 3235, 3236)");
unless homeworks.empty? || homeworks.nil?
homeworks.each do |hw|
hw.end_time = hw.end_time + 4
hm = hw.homework_detail_manual
hm.comment_status = 1
hw.student_works.each do |stu|
stu.late_penalty = 0
stu.save
end
hm.save
hw.save
end
end
end
def down
end
end

View File

@ -11,6 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160421011543) do