Merge branch 'cxt_course' into develop
Conflicts: db/schema.rb
This commit is contained in:
commit
76b37d7670
|
@ -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
|
|
@ -11,6 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160421011543) do
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue