From 6b780d50fc3c8188ff19b73dec665d5c52360800 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 9 Mar 2020 15:46:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?TPM=E5=85=B3=E5=8D=A1=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E6=AF=8F=E4=B8=80=E5=85=B3=E5=8D=A1=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E6=8C=91=E6=88=98=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/challenges/index.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/challenges/index.json.jbuilder b/app/views/challenges/index.json.jbuilder index c53ab9c58..eb7ee900d 100644 --- a/app/views/challenges/index.json.jbuilder +++ b/app/views/challenges/index.json.jbuilder @@ -19,7 +19,7 @@ if @challenges.present? json.passed_count challenge.user_passed_count json.playing_count challenge.playing_count json.name_url shixun_challenge_path(challenge, shixun_identifier: @shixun.identifier) - #json.open_game challenge.open_game(@user.id, @shixun) + json.open_game challenge.open_game(@user.id, @shixun) if @editable json.edit_url edit_shixun_challenge_path(challenge, shixun_identifier: @shixun.identifier) json.delete_url shixun_challenge_path(challenge, shixun_identifier: @shixun.identifier) From 25956ec86ea60665aa1445d2f2cdc7e7faf2801d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 9 Mar 2020 15:50:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=85=B3=E5=8D=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=90=AF=E6=8C=91?= =?UTF-8?q?=E6=88=98=E7=9A=84=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/challenge.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/challenge.rb b/app/models/challenge.rb index 70fac990b..bc504a5bc 100644 --- a/app/models/challenge.rb +++ b/app/models/challenge.rb @@ -74,7 +74,7 @@ class Challenge < ApplicationRecord if game.present? shixun.task_pass || game.status != 3 ? "/tasks/#{game.identifier}" : "" else - "/api/shixuns/#{shixun.identifier}/shixun_exec" + self.position == 1 ? "/api/shixuns/#{shixun.identifier}/shixun_exec" : "" end end