From ec08589dd39d525fed1316c647cfa52e3a09cbc6 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 19 Oct 2019 21:48:04 +0800 Subject: [PATCH] =?UTF-8?q?VNC=E5=AE=9E=E8=AE=AD=E4=B8=AD=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E9=A2=98=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 2 +- app/views/games/show.json.jbuilder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 78f665b3d..5a86fa06e 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -60,7 +60,7 @@ class GamesController < ApplicationController praise_count: praise_count, user_praise: user_praise, time_limit: time_limit, tomcat_url: edu_setting('cloud_tomcat_php'), is_teacher: is_teacher, myshixun_manager: myshixun_manager, git_url: (@shixun.vnc ? repo_url(@myshixun.repo_path) : "")} - if @shixun.vnc + if @shixun.vnc && @st == 0 get_vnc_link(@game) end diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder index 048188746..7c9d1f22a 100644 --- a/app/views/games/show.json.jbuilder +++ b/app/views/games/show.json.jbuilder @@ -1,7 +1,7 @@ json.(@base_date, :st, :discusses_count, :game_count, :record_onsume_time, :prev_game, :next_game, :praise_count, :user_praise, :time_limit, :tomcat_url, :is_teacher, :myshixun_manager, :game, :challenge, :shixun, :myshixun, :git_url) -if @shixun.vnc +if @shixun.vnc && @st == 0 json.vnc_url @vnc_url json.vnc_evaluate @vnc_evaluate end