Merge branch 'yuanke' into develop
This commit is contained in:
commit
1b4f525ad0
|
@ -90,6 +90,7 @@ class StudentWorkController < ApplicationController
|
|||
resultObj[:error_msg] = result["error_msg"] #编译错误时的信息
|
||||
|
||||
if result["status"].to_i == -2 #编译错误
|
||||
resultObj[:results] = result["error_msg"]
|
||||
resultObj[:status] = -2
|
||||
elsif result["results"][0]["status"].to_i == 2
|
||||
resultObj[:status] = 2
|
||||
|
@ -116,6 +117,7 @@ class StudentWorkController < ApplicationController
|
|||
student_work_test.save!
|
||||
resultObj[:testid] = student_work_test.id
|
||||
else
|
||||
#先从数据库取出result
|
||||
student_work_test = StudentWorkTest.find(params[:testid])
|
||||
results = student_work_test.results
|
||||
results << resultObj[:results]
|
||||
|
|
Loading…
Reference in New Issue