|
|
|
@ -72,8 +72,8 @@ class HackUserLastestCodesController < ApplicationController
|
|
|
|
|
def record_detail
|
|
|
|
|
@hack_user = HackUserCode.find params[:id]
|
|
|
|
|
set = HackSet.find_by(id: @hack_user.error_test_set_id)
|
|
|
|
|
@pass_set_count = set ? set.position - 1 : 0
|
|
|
|
|
@set_count = @hack_user.hack.hack_sets.count
|
|
|
|
|
@pass_set_count = set ? set.position - 1 : (@hack_user.status == 0 ? @set_count : 0)
|
|
|
|
|
@my_hack = @hack_user.hack_user_lastest_code
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -134,6 +134,7 @@ class HackUserLastestCodesController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
testCases = Base64.encode64(test_sets.to_json)
|
|
|
|
|
#codeFileContent = Base64.urlsafe_encode64(@my_hack.code)
|
|
|
|
|
Rails.logger.info("##########code_#{@my_hack.identifier}: #{@my_hack.code}")
|
|
|
|
|
debug_params = {execMode: exec_mode,
|
|
|
|
|
tpiID: @my_hack.identifier,
|
|
|
|
|
testCases: testCases,
|
|
|
|
|