From 9c4edbcd73007d0e143fd794bbdbf187d9766b2d Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 26 Oct 2019 09:47:24 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 9afbdd3af..4de15b20f 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -244,11 +244,7 @@ module CoursesHelper course_group_ids = course.group_course_power(user_id) course_groups = if course_group_ids.present? - sql = %Q{ - SELECT * FROM course_groups WHERE id in(SELECT course_group_id FROM teacher_course_groups WHERE id - IN(#{course_group_ids.join(",")})) order by position ASC - } - CourseGroup.find_by_sql(sql) + course.course_groups.where(id: course_group_ids).includes(:course_members) else course.course_groups.includes(:course_members) end From 81dd91f857462c788424a31ed897b382b18274c4 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 26 Oct 2019 09:52:32 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E7=9A=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competitions/competitions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/competitions/competitions_controller.rb b/app/controllers/competitions/competitions_controller.rb index 18e5bb371..167fe066c 100644 --- a/app/controllers/competitions/competitions_controller.rb +++ b/app/controllers/competitions/competitions_controller.rb @@ -13,7 +13,7 @@ class Competitions::CompetitionsController < Competitions::BaseController competitions = case params[:category] when 'nearly_published' then competitions.where(status: false) - when 'progressing' then competitions.where('end_time > NOW()') + when 'progressing' then competitions.where('status = 0 and end_time > NOW()') when 'ended' then competitions.where('end_time < NOW()') else competitions end From 75924a5130e03a177aee93d9abc051b9c2876d71 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 26 Oct 2019 09:53:28 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E7=9A=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competitions/competitions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/competitions/competitions_controller.rb b/app/controllers/competitions/competitions_controller.rb index 167fe066c..c3c5c8524 100644 --- a/app/controllers/competitions/competitions_controller.rb +++ b/app/controllers/competitions/competitions_controller.rb @@ -13,7 +13,7 @@ class Competitions::CompetitionsController < Competitions::BaseController competitions = case params[:category] when 'nearly_published' then competitions.where(status: false) - when 'progressing' then competitions.where('status = 0 and end_time > NOW()') + when 'progressing' then competitions.where('status = 1 and end_time > NOW()') when 'ended' then competitions.where('end_time < NOW()') else competitions end From e9f196f93f4bcc27f0c47eb18e2e676c7e456d01 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 26 Oct 2019 10:03:09 +0800 Subject: [PATCH 4/5] =?UTF-8?q?sync=5Ftrustie=5Fjob=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jobs/sync_trustie_job.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/jobs/sync_trustie_job.rb b/app/jobs/sync_trustie_job.rb index 89c0b8375..8d92696eb 100644 --- a/app/jobs/sync_trustie_job.rb +++ b/app/jobs/sync_trustie_job.rb @@ -17,9 +17,13 @@ class SyncTrustieJob < ApplicationJob "number": count } uri = URI.parse(url) - http = Net::HTTP.new(uri.hostname, uri.port) - http.send_request('PUT', uri.path, sync_json.to_json, {'Content-Type' => 'application/json'}) - Rails.logger.info("#######_________response__sync__end_____#########") + if token_url.include?("https://") + http.use_ssl = true + end + + + response = http.send_request('PUT', uri.path, sync_json.to_json, {'Content-Type' => 'application/json'}) + Rails.logger.info("#######_________response__sync__end_____#########{response.body}") end end \ No newline at end of file From 5b5f9a601446810296c2d76c1cf37a18e4a38239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 26 Oct 2019 10:10:32 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/competition/CompetitionMaxImg.js | 63 +++++++++++++++---- .../competition/comcss/competition.css | 12 ++-- 2 files changed, 57 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/competition/CompetitionMaxImg.js b/public/react/src/modules/competition/CompetitionMaxImg.js index ce12ade1c..9f9906487 100644 --- a/public/react/src/modules/competition/CompetitionMaxImg.js +++ b/public/react/src/modules/competition/CompetitionMaxImg.js @@ -53,15 +53,18 @@ class CompetitionMaxImg extends React.Component { : type === 3 ? +
+ style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}} + >

Educoder竞赛平台

-

高校智能课堂与综合实训平台

-
-
+

Educoder是一个面向计算机类的互联网IT教育和实战平台,

+

提供企业级工程实训,以实现工程化专业教学的自动化和智能化。

+
+

this.props.Jointheteam()}>加入战队

-
+

this.props.Createateam()}>创建战队

@@ -69,15 +72,18 @@ class CompetitionMaxImg extends React.Component {
: type === 4 || type === 5 ? -
-

Educoder竞赛平台

-

高校智能课堂与综合实训平台

-
-
+ +
+

Educoder竞赛平台

+

Educoder是一个面向计算机类的互联网IT教育和实战平台,

+

提供企业级工程实训,以实现工程化专业教学的自动化和智能化。

+
+

this.props.Jointheteam()}>加入战队

-
+

this.props.Createateam()}>创建战队

@@ -122,3 +128,36 @@ class CompetitionMaxImg extends React.Component { } export default CompetitionMaxImg; + +// // type3 +// /*
*/ +// /*

Educoder竞赛平台

*/ +// /*

高校智能课堂与综合实训平台

*/ +// /*
*/ +// /*
*/ +// /*

this.props.Jointheteam()}>加入战队

*/ +// /*
*/ +// /*
*/ +// /*

this.props.Createateam()}>创建战队

*/ +// /*
*/ +// +// /*
*/ +// /*
*/ +// +// +// // type === 4 || type === 5 +// //
+// //

Educoder竞赛平台

+// //

高校智能课堂与综合实训平台

+// //
+// //
+// //

this.props.Jointheteam()}>加入战队

+// //
+// //
+// //

this.props.Createateam()}>创建战队

+// //
+// // +// //
+// //
\ No newline at end of file diff --git a/public/react/src/modules/competition/comcss/competition.css b/public/react/src/modules/competition/comcss/competition.css index f9f8fe63a..e5df077ce 100644 --- a/public/react/src/modules/competition/comcss/competition.css +++ b/public/react/src/modules/competition/comcss/competition.css @@ -118,10 +118,10 @@ .registbut1 { margin-right: 46px; text-align: center; - background: #ffffff; + background: #0BDEE6; + border-radius: 10px; height: 54px; width: 156px; - border-radius: 4px; display: flex; align-items: center; justify-content: center; @@ -181,7 +181,7 @@ .registbut1 p { width: 100%; height: 100%; - color: #05101A; + color: #ffffff; line-height: 54px; font-size: 20px; font-weight: bold; @@ -205,7 +205,7 @@ line-height: 54px; width: 100%; height: 100%; - color: #05101A; + color: #ffffff; font-size: 20px; font-weight: bold; cursor: pointer @@ -235,10 +235,10 @@ text-align: center; color: #05101A; font-size: 20px; - background: #ffffff; + background: #F8EC25; height: 54px; width: 156px; - border-radius: 4px; + border-radius: 10px; display: flex; align-items: center; justify-content: center;