老师测试结果的返回

This commit is contained in:
sw 2015-07-31 13:58:27 +08:00
parent 41cba6db6a
commit 9da18bcad4
2 changed files with 5 additions and 2 deletions

View File

@ -364,7 +364,9 @@ class HomeworkCommonController < ApplicationController
client.request(request)
end
result = JSON.parse(res.body)
@result = result[:result][0][:status]
result[:results].each do |re|
@result = re[:status]
end
end
private

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150730093403) do
ActiveRecord::Schema.define(:version => 20150730130816) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -635,6 +635,7 @@ ActiveRecord::Schema.define(:version => 20150730093403) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "result", :default => 0
t.text "error_msg"
end
create_table "homework_users", :force => true do |t|