From 2f8d34792e5bcdd7f90395ddcb1d96df09c6d920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 26 Aug 2019 17:20:47 +0800 Subject: [PATCH 01/41] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/css/edu-all.css | 2 +- public/stylesheets/educoder/edu-all.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 6d180e342..75039c3a4 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -119,7 +119,7 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px} .tag-green .tag-name{display: block;width: auto; /*background-image: url("/images/educoder/tag1.png");*/ background: rgba(000,000,000,0.56); - border: 1px solid #fff; + border: 1px solid rgba(255,255,255,0.56); border-radius: 3px; font-size: 12px; /*opacity: 0.56;*/ diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index c4718c076..1265fb689 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -121,7 +121,7 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px} .tag-green .tag-name{display: block;width: auto; /*background-image: url("/images/educoder/tag1.png");*/ background: rgba(000,000,000,0.56); - border: 1px solid #fff; + border: 1px solid rgba(255,255,255,0.56); border-radius: 3px; font-size: 12px; /*opacity: 0.56;*/ From b71ee616df9e2e3737432302d9203629b4f7c972 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Tue, 27 Aug 2019 08:31:16 +0800 Subject: [PATCH 02/41] admins: fix bug --- app/assets/javascripts/admins/identity_authentications/index.js | 2 ++ .../javascripts/admins/professional_authentications/index.js | 2 ++ app/assets/javascripts/admins/shixun_authorizations/index.js | 2 ++ app/assets/javascripts/admins/subject_authorizations/index.js | 2 ++ 4 files changed, 8 insertions(+) diff --git a/app/assets/javascripts/admins/identity_authentications/index.js b/app/assets/javascripts/admins/identity_authentications/index.js index 2da644ec2..91ce5c7ec 100644 --- a/app/assets/javascripts/admins/identity_authentications/index.js +++ b/app/assets/javascripts/admins/identity_authentications/index.js @@ -1,6 +1,7 @@ $(document).on('turbolinks:load', function() { if ($('body.admins-identity-authentications-index-page').length > 0) { var $searchFrom = $('.identity-authentication-list-form'); + $searchFrom.find('select[name="status"]').val('pending'); $searchFrom.on('click', '.search-form-tab', function(){ var $link = $(this); @@ -12,6 +13,7 @@ $(document).on('turbolinks:load', function() { $searchFrom.find('.status-filter').show(); } else { $searchFrom.find('.status-filter').hide(); + $searchFrom.find('select[name="status"]').val('pending'); } }); } diff --git a/app/assets/javascripts/admins/professional_authentications/index.js b/app/assets/javascripts/admins/professional_authentications/index.js index 769a6b2fc..82a1da5af 100644 --- a/app/assets/javascripts/admins/professional_authentications/index.js +++ b/app/assets/javascripts/admins/professional_authentications/index.js @@ -1,6 +1,7 @@ $(document).on('turbolinks:load', function() { if ($('body.admins-professional-authentications-index-page').length > 0) { var $searchFrom = $('.professional-authentication-list-form'); + $searchFrom.find('select[name="status"]').val('pending'); $searchFrom.on('click', '.search-form-tab', function(){ var $link = $(this); @@ -12,6 +13,7 @@ $(document).on('turbolinks:load', function() { $searchFrom.find('.status-filter').show(); } else { $searchFrom.find('.status-filter').hide(); + $searchFrom.find('select[name="status"]').val('pending'); } }); } diff --git a/app/assets/javascripts/admins/shixun_authorizations/index.js b/app/assets/javascripts/admins/shixun_authorizations/index.js index ba7b23821..b98354c65 100644 --- a/app/assets/javascripts/admins/shixun_authorizations/index.js +++ b/app/assets/javascripts/admins/shixun_authorizations/index.js @@ -1,6 +1,7 @@ $(document).on('turbolinks:load', function() { if ($('body.admins-shixun-authorizations-index-page').length > 0) { var $searchFrom = $('.shixun-authorization-list-form'); + $searchFrom.find('select[name="status"]').val('pending'); $searchFrom.on('click', '.search-form-tab', function(){ var $link = $(this); @@ -12,6 +13,7 @@ $(document).on('turbolinks:load', function() { $searchFrom.find('.status-filter').show(); } else { $searchFrom.find('.status-filter').hide(); + $searchFrom.find('select[name="status"]').val('pending'); } }); } diff --git a/app/assets/javascripts/admins/subject_authorizations/index.js b/app/assets/javascripts/admins/subject_authorizations/index.js index d80f0850c..bfba16fc1 100644 --- a/app/assets/javascripts/admins/subject_authorizations/index.js +++ b/app/assets/javascripts/admins/subject_authorizations/index.js @@ -1,6 +1,7 @@ $(document).on('turbolinks:load', function() { if ($('body.admins-subject-authorizations-index-page').length > 0) { var $searchFrom = $('.subject-authorization-list-form'); + $searchFrom.find('select[name="status"]').val('pending'); $searchFrom.on('click', '.search-form-tab', function(){ var $link = $(this); @@ -12,6 +13,7 @@ $(document).on('turbolinks:load', function() { $searchFrom.find('.status-filter').show(); } else { $searchFrom.find('.status-filter').hide(); + $searchFrom.find('select[name="status"]').val('pending'); } }); } From 4fdc74ac6f9c0e446980a18d1b05db6d9d51de4c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 27 Aug 2019 08:54:14 +0800 Subject: [PATCH 03/41] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/subjects_helper.rb | 5 +++++ app/models/subject.rb | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/helpers/subjects_helper.rb b/app/helpers/subjects_helper.rb index 75ae9f041..f110ef04c 100644 --- a/app/helpers/subjects_helper.rb +++ b/app/helpers/subjects_helper.rb @@ -13,8 +13,13 @@ module SubjectsHelper # 实训路径的所有用户获得的标签 def user_shixun_tags challenge_ids, user_id + logger.info("#####################") ChallengeTag.joins("join games on challenge_tags.challenge_id = games.challenge_id"). where(challenge_id: challenge_ids, games: {status: 2, user_id: user_id}).pluck("challenge_tags.name").uniq + logger.info("#####################") + pass_challenge_ids = Game.where(status: 2, user_id: user_id, challenge_ids: challenge_ids).pluck(:challenge_id) + ChallengeTag.where(challenge_id: pass_challenge_ids).pluck(:name).uniq + logger.info("#####################") end # 金课的课堂状态 0:未开课,1:进行中,2:已结束 diff --git a/app/models/subject.rb b/app/models/subject.rb index 7b671cfb1..65e685209 100644 --- a/app/models/subject.rb +++ b/app/models/subject.rb @@ -82,9 +82,16 @@ class Subject < ApplicationRecord end def my_subject_progress + logger.info("#-----------") my_challenge_count = Game.joins(:challenge).where(user_id: User.current.id, status: 2, challenges: {shixun_id: shixuns.published_closed}). pluck(:challenge_id).uniq.size - count = self.subject_challenge_count == 0 ? 0 : ((my_challenge_count.to_f / self.subject_challenge_count).round(2) * 100).to_i + logger.info("#-----------") + new_challenge_count = Challenge.left_joins(:games) + .where(games: {user_id: current_user.id, status: 2}, shixun_id: shixuns.published_closed) + .uniq.count + logger.info("#-----------") + subject_challenge_count = shixuns.challenges_count + subject_challenge_count == 0 ? 0 : ((my_challenge_count.to_f / subject_challenge_count).round(2) * 100).to_i end def my_consume_time From 35777dd6676b82a2302ea0209a687a02acfba8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 27 Aug 2019 09:00:28 +0800 Subject: [PATCH 04/41] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/gradinforms/Bullsubdirectory.js | 33 +++++++++++-------- .../courses/gradinforms/myysleduinforms.css | 3 +- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js index ebfd2d51b..45da1773b 100644 --- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js +++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form,Row, Col } from "antd"; import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; import './myysleduinforms.css' import axios from 'axios'; @@ -165,18 +165,25 @@ class Bullsubdirectory extends Component{ { whethertoeditysl === false?
-
-
{myname}
- { - this.props.isAdmin() === true ? - (this.props.yslbool===false? - this.bianji(true)}> - : - "" - ) - - :"" - } +
+
+
+ {myname} +
+
+ + { + this.props.isAdmin() === true ? + (this.props.yslbool===false? + this.bianji(true)}> + : + "" + ) + :"" + } + +
+
diff --git a/public/react/src/modules/courses/gradinforms/myysleduinforms.css b/public/react/src/modules/courses/gradinforms/myysleduinforms.css index 1e86607ec..ab2884ffe 100644 --- a/public/react/src/modules/courses/gradinforms/myysleduinforms.css +++ b/public/react/src/modules/courses/gradinforms/myysleduinforms.css @@ -68,7 +68,6 @@ } .fudonyingxiangysl{ width: 100%; - height: 66px; } .yslbianji{ padding-top: 31px; @@ -79,3 +78,5 @@ .ysldashed{ border:1px dashed #EEE; } +.yslclear{ clear: both; +} From 1a83a1d567ac5fda169c5244b74963766508a19c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 27 Aug 2019 09:00:58 +0800 Subject: [PATCH 05/41] =?UTF-8?q?banner=20=E5=9B=BE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/css/edu-all.css | 4 ++-- public/stylesheets/educoder/edu-all.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 75039c3a4..fc910ef37 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -446,8 +446,8 @@ table.text-file{} /*-------------------------------实训路径-------------------------------*/ .path-head{width: 100%;height: 300px;background-image: url("/images/educoder/path.png"); - background-color: #081C4B; - background-size: cover; + background-color: #131b39; + /*background-size: cover;*/ background-position: center; background-repeat: no-repeat; } diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 1265fb689..6ea9d3549 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -448,8 +448,8 @@ table.text-file{} /*-------------------------------实训路径-------------------------------*/ .path-head{width: 100%;height: 300px;background-image: url("/images/educoder/path.png"); - background-color: #081C4B; - background-size: cover; + background-color: #131b39; + /*background-size: cover;*/ background-position: center; background-repeat: no-repeat; } From f018beb6c590ca495827fd43199fbdf6dcdd2c53 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 27 Aug 2019 09:02:17 +0800 Subject: [PATCH 06/41] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/subjects_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/subjects_helper.rb b/app/helpers/subjects_helper.rb index f110ef04c..b03baf825 100644 --- a/app/helpers/subjects_helper.rb +++ b/app/helpers/subjects_helper.rb @@ -17,7 +17,7 @@ module SubjectsHelper ChallengeTag.joins("join games on challenge_tags.challenge_id = games.challenge_id"). where(challenge_id: challenge_ids, games: {status: 2, user_id: user_id}).pluck("challenge_tags.name").uniq logger.info("#####################") - pass_challenge_ids = Game.where(status: 2, user_id: user_id, challenge_ids: challenge_ids).pluck(:challenge_id) + pass_challenge_ids = Game.where(status: 2, user_id: user_id, challenge_id: challenge_ids).pluck(:challenge_id) ChallengeTag.where(challenge_id: pass_challenge_ids).pluck(:name).uniq logger.info("#####################") end From 06c7567e8e8d7026f22f3498b01eddc5e87bc0bb Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 27 Aug 2019 09:03:43 +0800 Subject: [PATCH 07/41] =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/subject.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/subject.rb b/app/models/subject.rb index 65e685209..db2610236 100644 --- a/app/models/subject.rb +++ b/app/models/subject.rb @@ -87,7 +87,7 @@ class Subject < ApplicationRecord pluck(:challenge_id).uniq.size logger.info("#-----------") new_challenge_count = Challenge.left_joins(:games) - .where(games: {user_id: current_user.id, status: 2}, shixun_id: shixuns.published_closed) + .where(games: {user_id: User.current.id, status: 2}, shixun_id: shixuns.published_closed) .uniq.count logger.info("#-----------") subject_challenge_count = shixuns.challenges_count From 1326cd14c28a47bdddf87e5969830cedf53bba45 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 27 Aug 2019 09:05:51 +0800 Subject: [PATCH 08/41] =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/subject.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/subject.rb b/app/models/subject.rb index db2610236..7aa0bc063 100644 --- a/app/models/subject.rb +++ b/app/models/subject.rb @@ -90,7 +90,7 @@ class Subject < ApplicationRecord .where(games: {user_id: User.current.id, status: 2}, shixun_id: shixuns.published_closed) .uniq.count logger.info("#-----------") - subject_challenge_count = shixuns.challenges_count + subject_challenge_count = shixuns.sum(:challenges_count) subject_challenge_count == 0 ? 0 : ((my_challenge_count.to_f / subject_challenge_count).round(2) * 100).to_i end From dae1a57ddca410701d39977e9cd3ad87d87205c7 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 27 Aug 2019 09:16:48 +0800 Subject: [PATCH 09/41] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/subjects_helper.rb | 5 ----- app/models/subject.rb | 9 ++------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app/helpers/subjects_helper.rb b/app/helpers/subjects_helper.rb index b03baf825..75ae9f041 100644 --- a/app/helpers/subjects_helper.rb +++ b/app/helpers/subjects_helper.rb @@ -13,13 +13,8 @@ module SubjectsHelper # 实训路径的所有用户获得的标签 def user_shixun_tags challenge_ids, user_id - logger.info("#####################") ChallengeTag.joins("join games on challenge_tags.challenge_id = games.challenge_id"). where(challenge_id: challenge_ids, games: {status: 2, user_id: user_id}).pluck("challenge_tags.name").uniq - logger.info("#####################") - pass_challenge_ids = Game.where(status: 2, user_id: user_id, challenge_id: challenge_ids).pluck(:challenge_id) - ChallengeTag.where(challenge_id: pass_challenge_ids).pluck(:name).uniq - logger.info("#####################") end # 金课的课堂状态 0:未开课,1:进行中,2:已结束 diff --git a/app/models/subject.rb b/app/models/subject.rb index 7aa0bc063..f35a8aad4 100644 --- a/app/models/subject.rb +++ b/app/models/subject.rb @@ -82,14 +82,9 @@ class Subject < ApplicationRecord end def my_subject_progress - logger.info("#-----------") - my_challenge_count = Game.joins(:challenge).where(user_id: User.current.id, status: 2, challenges: {shixun_id: shixuns.published_closed}). - pluck(:challenge_id).uniq.size - logger.info("#-----------") - new_challenge_count = Challenge.left_joins(:games) + my_challenge_count = Challenge.left_joins(:games) .where(games: {user_id: User.current.id, status: 2}, shixun_id: shixuns.published_closed) - .uniq.count - logger.info("#-----------") + .pluck(:challenge_id).uniq.size subject_challenge_count = shixuns.sum(:challenges_count) subject_challenge_count == 0 ? 0 : ((my_challenge_count.to_f / subject_challenge_count).round(2) * 100).to_i end From b4e6bf5860c0ebc1c04f5ff8ef0413d70fae5ba7 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 27 Aug 2019 09:21:10 +0800 Subject: [PATCH 10/41] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/subject.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/models/subject.rb b/app/models/subject.rb index f35a8aad4..4b7f4dbcd 100644 --- a/app/models/subject.rb +++ b/app/models/subject.rb @@ -82,11 +82,9 @@ class Subject < ApplicationRecord end def my_subject_progress - my_challenge_count = Challenge.left_joins(:games) - .where(games: {user_id: User.current.id, status: 2}, shixun_id: shixuns.published_closed) - .pluck(:challenge_id).uniq.size - subject_challenge_count = shixuns.sum(:challenges_count) - subject_challenge_count == 0 ? 0 : ((my_challenge_count.to_f / subject_challenge_count).round(2) * 100).to_i + my_challenge_count = Game.joins(:challenge).where(user_id: User.current.id, status: 2, challenges: {shixun_id: shixuns.published_closed}). + pluck(:challenge_id).uniq.size + count = self.subject_challenge_count == 0 ? 0 : ((my_challenge_count.to_f / self.subject_challenge_count).round(2) * 100).to_i end def my_consume_time From ac065bb94d7dd1457d856557dcf5d524537ea16d Mon Sep 17 00:00:00 2001 From: p31729568 Date: Tue, 27 Aug 2019 09:25:13 +0800 Subject: [PATCH 11/41] admins: develop open debug --- config/environments/development.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index cdcd45ec5..f0b3f1775 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -50,12 +50,11 @@ Rails.application.configure do # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. - config.assets.debug = false + config.assets.debug = true # Suppress logger output for asset requests. config.assets.quiet = true - config.assets.compile = true # config.assets.prefix = '/dev-assets' # Raises error for missing translations From 5bd9c2d336644441a20e3bc508350493857514af Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 27 Aug 2019 09:26:11 +0800 Subject: [PATCH 12/41] enable cdn --- public/react/scripts/build.js | 4 ++-- public/react/src/public-path.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/scripts/build.js b/public/react/scripts/build.js index e18ff438d..d600d6068 100644 --- a/public/react/scripts/build.js +++ b/public/react/scripts/build.js @@ -203,12 +203,12 @@ function generateNewIndexJsp() {