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