|
|
|
@ -69,13 +69,13 @@ class Challenge < ApplicationRecord
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 开启挑战
|
|
|
|
|
def open_game shixun, position
|
|
|
|
|
def open_game shixun
|
|
|
|
|
# 这里的identifier,status是关联了games取了games的identifier,status
|
|
|
|
|
identifier = self.identifier
|
|
|
|
|
if identifier.present?
|
|
|
|
|
shixun.task_pass || self.status != 3 ? "/tasks/#{identifier}" : ""
|
|
|
|
|
else
|
|
|
|
|
position == 1 ? "/shixuns/#{shixun.identifier}/shixun_exec.json" : ""
|
|
|
|
|
self.position == 1 ? "/shixuns/#{shixun.identifier}/shixun_exec.json" : ""
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|