From af4c899b9d580fbbdb45d0daaa4ec79c0ab9c1b5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 9 Sep 2019 17:40:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/challenges/edit.json.jbuilder | 2 +- app/views/shixuns/settings.json.jbuilder | 2 ++ app/views/shixuns/show.json.jbuilder | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/challenges/edit.json.jbuilder b/app/views/challenges/edit.json.jbuilder index 5ae15cf67..3e7f5b425 100644 --- a/app/views/challenges/edit.json.jbuilder +++ b/app/views/challenges/edit.json.jbuilder @@ -16,7 +16,7 @@ elsif @tab == 1 json.has_web_route @shixun.has_web_route? json.test_sets @challenge.test_sets do |set| json.hidden (set.is_public ? 0 : 1) - json.(set, :input, :output, :score) + json.(set, :input, :output, :score, :match_rule) end elsif @tab == 2 # 参考答案 diff --git a/app/views/shixuns/settings.json.jbuilder b/app/views/shixuns/settings.json.jbuilder index ad29f4176..c9142dab0 100644 --- a/app/views/shixuns/settings.json.jbuilder +++ b/app/views/shixuns/settings.json.jbuilder @@ -30,6 +30,8 @@ json.shixun do json.scope_partment @shixun.schools.map(&:name) # 公开范围 json.opening_time @shixun.opening_time json.forbid_copy @shixun.forbid_copy + # 私密仓库 + json.is_secret_repository @shixun.shixun_secret_repository.present? # 实训服务配置 json.shixun_service_configs do diff --git a/app/views/shixuns/show.json.jbuilder b/app/views/shixuns/show.json.jbuilder index 8e49a99f4..57ea305ed 100644 --- a/app/views/shixuns/show.json.jbuilder +++ b/app/views/shixuns/show.json.jbuilder @@ -2,3 +2,4 @@ json.fork_from @fork_from json.identity User.current.shixun_identity(@shixun) json.power @power json.partial! 'shixuns/top', locals: { shixun: @shixun, current_myshixun: @current_myshixun } +json.secret_repositoy @shixun.shixun_secret_repository.present?