From 7a30ddfbf47ecaf01678f2a2b63686d6623eb1a9 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, 3 Sep 2019 14:45:23 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/user/usersInfo/InfosTopics.js | 12 ++++++++---- .../react/src/modules/user/usersInfo/usersInfo.css | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 6d9c1838f..c25f4e823 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -64,7 +64,13 @@ class InfosTopics extends Component{ this.searchAlldata(types,category,course_list_id,sort_by,sort_direction,page) } searchAlldata=(type,category,course_list_id,sort_by,sort_direction,page)=>{ - let user_id=this.props.current_user&&this.props.current_user.user_id; + + // if(this.props.current_user.login!=this.props.match.params.username){ + // return + // }else{ + // + // } + let user_id=this.props.match.params&&this.props.match.params.username; if(user_id!=undefined){ let {per_page}=this.state; let url=`/users/${user_id}/question_banks.json`; @@ -86,7 +92,6 @@ class InfosTopics extends Component{ }); } - } searchCategory=(type)=>{ @@ -351,7 +356,6 @@ class InfosTopics extends Component{ padding: 0px 15px; float: left; border-radius: 4px; - color: #4C4C4C; cursor: pointer; margin-right: 20px; display: block; @@ -454,7 +458,7 @@ class InfosTopics extends Component{ - {user_type!="学生"?this.sendTopics()}>发送:""} + {user_id===targetuserid&&user_type!="学生"?this.sendTopics()}>发送:""} {types==="personal"?user_id===targetuserid&&user_type!="学生"?this.deletecheckBoxValues()}>删除:"":""}
:""} diff --git a/public/react/src/modules/user/usersInfo/usersInfo.css b/public/react/src/modules/user/usersInfo/usersInfo.css index 927b0c70c..259981f2f 100644 --- a/public/react/src/modules/user/usersInfo/usersInfo.css +++ b/public/react/src/modules/user/usersInfo/usersInfo.css @@ -277,7 +277,7 @@ font-size:16px; font-family:PingFangSC; font-weight:400; - color:rgba(51,51,51,1); + color: #666 !important; cursor: pointer; } @@ -366,7 +366,7 @@ .topscisright{ right: 0px; - top: 64px; + top: 45px; display: block; position: absolute; } From 44f3888d04b3019d70fb460c5dee1628d0593260 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, 3 Sep 2019 14:49:00 +0800 Subject: [PATCH 2/7] =?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/libs/util/redis.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/libs/util/redis.rb diff --git a/app/libs/util/redis.rb b/app/libs/util/redis.rb new file mode 100644 index 000000000..f240406f5 --- /dev/null +++ b/app/libs/util/redis.rb @@ -0,0 +1,9 @@ +module Util::Redis + class << self + def online_user_count + if Rails.cache.is_a?(ActiveSupport::Cache::RedisStore) + Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.uniq.size + end + end + end +end \ No newline at end of file From 408b363817abf28ef937c40ceffa631cf2d17e8f 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, 3 Sep 2019 15:02:17 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/libs/util/redis.rb | 9 +++++ public/react/src/modules/courses/Index.js | 1 - .../Completetaskdetails.js | 2 +- .../completetaskdetails/Completetaskpage.js | 2 +- .../completetaskdetails.css | 2 +- .../courses/groupjobbank/GroupPackage.js | 2 +- .../courses/groupjobbank/GroupPackage2.js | 34 +++++++++---------- .../groupjobbank/Groupjobbandetails.js | 2 +- .../courses/groupjobbank/GroupjobbankPage.js | 2 +- .../groupjobbank/Groupjobquesanswer.js | 1 + .../questionbank/Generaljobbankdetails.js | 2 +- .../courses/questionbank/Generaljobdetails.js | 1 + 12 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 app/libs/util/redis.rb diff --git a/app/libs/util/redis.rb b/app/libs/util/redis.rb new file mode 100644 index 000000000..f240406f5 --- /dev/null +++ b/app/libs/util/redis.rb @@ -0,0 +1,9 @@ +module Util::Redis + class << self + def online_user_count + if Rails.cache.is_a?(ActiveSupport::Cache::RedisStore) + Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.uniq.size + end + end + end +end \ No newline at end of file diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 457723376..f21dc01ab 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -270,7 +270,6 @@ const Ordering=Loadable({ loader: () => import('../../modules/courses/ordering/Ordering'), loading: Loading, }); - class CoursesIndex extends Component{ constructor(props) { super(props) diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js b/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js index 833c60e1f..0da4e4369 100644 --- a/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js @@ -1,3 +1,4 @@ + import React, {Component} from "react"; import { WordsBtn,on, off, trigger,MarkdownToHtml,getImageUrl} from 'educoder'; import { @@ -78,7 +79,6 @@ class Groupjobbandetails extends Component { ) } {/**/} - {/*{datas.attachments === undefined ? "" : datas.attachments.map((item, key) => {*/} {/* return (*/} {/*- 分组要求: - {datas&&datas.min_num}~ {datas&&datas.max_num}(学生提交作品时需要关联同组成员,组内成员作品共享) -
- } -- 基于项目实施 - (学生必须在本平台创建项目,项目管理员可以提交作品) -
-分组要求: - {datas&&datas.group_info&&datas.group_info.min_number}~ {datas&&datas.group_info&&datas.group_info.max_number}(学生提交作品时需要关联同组成员,组内成员作品共享) + {datas&&datas.min_num}~ {datas&&datas.max_num}(学生提交作品时需要关联同组成员,组内成员作品共享)
} ++ 基于项目实施 + (学生必须在本平台创建项目,项目管理员可以提交作品) +
++ 分组要求: + {datas&&datas.group_info&&datas.group_info.min_number}~ {datas&&datas.group_info&&datas.group_info.max_number}(学生提交作品时需要关联同组成员,组内成员作品共享) +
+ } { datas&&datas.group_info&&datas.group_info.base_on_project?diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js index a0ba84549..fa3503b69 100644 --- a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js +++ b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js @@ -1,3 +1,4 @@ + import React, {Component} from "react"; import { WordsBtn,on, off, trigger,MarkdownToHtml,getImageUrl} from 'educoder'; import { @@ -79,7 +80,6 @@ class Groupjobbandetails extends Component { ) } {/*
*/} - {/*{datas.attachments === undefined ? "" : datas.attachments.map((item, key) => {*/} {/* return (*/} {/*
-
-
-