实训评论url

dev_haigong
daiao 6 years ago
parent 6c8517812e
commit 655c62defd

@ -130,7 +130,7 @@ class ShixunsService
if manager if manager
position = d.position.nil? ? 1 : d.position position = d.position.nil? ? 1 : d.position
game_identifier = Game.find_by_sql("SELECT g.identifier FROM games g JOIN challenges c on g.challenge_id = c.id game_identifier = Game.find_by_sql("SELECT g.identifier FROM games g JOIN challenges c on g.challenge_id = c.id
WHERE c.shixun_id = #{dis.id} AND c.position = #{position} AND g.user_id = #{current_user.id}").first.try(:identifier) WHERE c.shixun_id = #{dis.id} AND c.position = #{position} AND g.user_id = #{d.user_id}").first.try(:identifier)
"/tasks/#{game_identifier}" "/tasks/#{game_identifier}"
else else
"" ""

Loading…
Cancel
Save