From fa20d8f123865053f4bca49498cb4ca1a87dbe45 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 9 Aug 2019 10:15:03 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/shixun.rb | 4 ++++
app/views/challenges/edit.json.jbuilder | 1 +
2 files changed, 5 insertions(+)
diff --git a/app/models/shixun.rb b/app/models/shixun.rb
index 61d15de55..3977e9204 100644
--- a/app/models/shixun.rb
+++ b/app/models/shixun.rb
@@ -246,6 +246,10 @@ class Shixun < ApplicationRecord
Game.joins(:myshixun).where(user_id: user.id, status: 2, myshixuns: { shixun_id: id }).count
end
+ def has_web_route?
+ self.mirror_name.include?('JFinal') || self.mirror_name.include?('PHP') && self.mirror_name.include?('Mysql') || self.mirror_name.include?('Web')
+ end
+
private
def send_tiding
diff --git a/app/views/challenges/edit.json.jbuilder b/app/views/challenges/edit.json.jbuilder
index 2774b5a05..5ae15cf67 100644
--- a/app/views/challenges/edit.json.jbuilder
+++ b/app/views/challenges/edit.json.jbuilder
@@ -13,6 +13,7 @@ elsif @tab == 1
# 评测设置的编辑模式
json.(@challenge, :id, :path, :exec_path, :show_type, :original_picture_path, :expect_picture_path, :picture_path,
:web_route, :test_set_score, :test_set_average)
+ 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)
From 929cbeb42db60b8ad864a9ff1b96fbad1aa42eed Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 9 Aug 2019 10:40:59 +0800
Subject: [PATCH 2/2] width
---
.../src/modules/courses/busyWork/CommonWorkList.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js
index f6e7c4532..4ff1580ac 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkList.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js
@@ -85,9 +85,9 @@ function buildColumns(that, student_works) {
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
- width: '98px',
+ width: '74px',
margin: '0 auto'
- }} title={text}>
+ }} title={text && text.length > 5 ? text : ''}>
{/*