dev_local
daiao 6 years ago
parent 88fa6855eb
commit 18542f5983

@ -156,9 +156,10 @@ class GamesService
actual_output = test_set.attributes.count > 4 ? test_set.try(:actual_output) : nil
result = test_set.attributes.count > 4 ? test_set.try(:result) : nil
compile_success = test_set.attributes.count > 4 ? test_set.try(:compile_success) : nil
status = test_set.attributes.count > 4 ? test_set.try(:code) : nil
#actual_output = Base64.encode64(actual_output)
actual_output = (compile_success.to_s == "0" ? "编译失败,请在测试结果中查看具体的错误信息" : actual_output)
actual_output = (compile_success.to_s == "0" && status.to_s == "-1" ? "编译失败,请在测试结果中查看具体的错误信息" : actual_output)
public_result = {:is_public => (test_set.is_public ? 1 : 0), :result => result,
:actual_output => actual_output, :compile_success => compile_success}

Loading…
Cancel
Save