修改周海芳老师四个作业的截止日期和学生得分
This commit is contained in:
parent
0fa16251e7
commit
26b1aee90d
|
@ -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,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160418074429) do
|
||||
ActiveRecord::Schema.define(:version => 20160421011543) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
Loading…
Reference in New Issue