更新吴文植的分数
This commit is contained in:
parent
b9f1ff3cd2
commit
0b0f484a5b
|
@ -0,0 +1,17 @@
|
||||||
|
class UpdateOneStudentTeacherScore < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
work = StudentWork.find 49774
|
||||||
|
score = StudentWorksScore.new
|
||||||
|
score.score = 100
|
||||||
|
score.user_id = 7318
|
||||||
|
score.student_work_id = work.id
|
||||||
|
score.reviewer_role = 1
|
||||||
|
if score.save
|
||||||
|
work.teacher_score = score.score
|
||||||
|
end
|
||||||
|
work.save
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20160325030423) do
|
ActiveRecord::Schema.define(:version => 20160329014316) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
|
Loading…
Reference in New Issue