From 3337b86f5864a5ae3ca81ed3bc1a47dea2bfc7ee Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Wed, 16 Oct 2019 13:46:25 +0800
Subject: [PATCH 1/4] title={title}
---
.../modules/courses/common/titleSearch/TitleSearchSection.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js b/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js
index aa7a54cce..c71ef38ea 100644
--- a/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js
+++ b/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js
@@ -61,7 +61,8 @@ class Titlesearchsection extends Component{
- {title}
+ {/* title={title} */}
+ {title}
{ firstRowRight }
From 8466f8ef3b7b83bd00dd4c9538025244296e3051 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Wed, 16 Oct 2019 13:47:34 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=87=B3=E5=88=86?=
=?UTF-8?q?=E7=8F=AD=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/members/studentsList.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js
index a63509c59..8a223ce91 100644
--- a/public/react/src/modules/courses/members/studentsList.js
+++ b/public/react/src/modules/courses/members/studentsList.js
@@ -710,7 +710,7 @@ class studentsList extends Component{
title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"):
-
+
{ this.props.history.push(`/courses/${courseId}/course_groups`)}}
style={{color: '#212121', verticalAlign: 'initial', marginRight: '14px' }}
>
From dea0ff8819f6420faac5d4d3b2cbef6bf5e3aa98 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Wed, 16 Oct 2019 13:54:19 +0800
Subject: [PATCH 3/4] =?UTF-8?q?item=E5=AE=BD=E5=BA=A6=E8=B6=85=E9=95=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/poll/PollDetailTabForthRules.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js
index cfcdfae4d..2a2ff218b 100644
--- a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js
+++ b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js
@@ -350,6 +350,12 @@ class PollDetailTabForthRules extends Component{
(学生收到{this.props.moduleName || (this.props.type==="Exercise"?"试卷":"问卷")}的时间)
({this.props.moduleName == '作业' ? '学生“按时”提交作品的时间截点' : '学生可以答题的时间截点'})
+ {/* item宽度超长 */}
+
{
rules && rules.length > 0 && rules.map((rule,r)=>{
@@ -383,7 +389,8 @@ class PollDetailTabForthRules extends Component{
`.ant-select{
min-width:200px,
min-heigth:200px
- }`
+ }
+ `
}
Date: Wed, 16 Oct 2019 14:19:01 +0800
Subject: [PATCH 4/4] wechat login: modify error tip when account binded
---
app/libs/hot_search_keyword.rb | 22 ++++++++++++++++++++++
app/services/create_bind_user_service.rb | 2 +-
2 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 app/libs/hot_search_keyword.rb
diff --git a/app/libs/hot_search_keyword.rb b/app/libs/hot_search_keyword.rb
new file mode 100644
index 000000000..e222bf3a7
--- /dev/null
+++ b/app/libs/hot_search_keyword.rb
@@ -0,0 +1,22 @@
+class HotSearchKeyword
+ class << self
+ def add(keyword)
+ return if keyword.blank?
+ Rails.cache.data.zincrby(redis_key, 1, keyword)
+ end
+
+ def hot(limit = 5)
+ Rails.cache.data.zrevrange(redis_key, 0, limit - 1)
+ end
+
+ def available?
+ Rails.cache.is_a?(ActiveSupport::Cache::RedisStore)
+ end
+
+ private
+
+ def redis_key
+ 'educoder:es:hot_keyword'
+ end
+ end
+end
\ No newline at end of file
diff --git a/app/services/create_bind_user_service.rb b/app/services/create_bind_user_service.rb
index 93d9d87ca..f7fc5b6f6 100644
--- a/app/services/create_bind_user_service.rb
+++ b/app/services/create_bind_user_service.rb
@@ -17,7 +17,7 @@ class CreateBindUserService < ApplicationService
bind_user = User.try_to_login(params[:username], params[:password])
raise Error, '用户名或者密码错误' if bind_user.blank?
- raise Error, '该账号已被绑定' if bind_user.bind_open_user?(params[:type].to_s)
+ raise Error, '该账号已被其他微信号绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s)
ActiveRecord::Base.transaction do
open_user.user_id = bind_user.id