From 6958276a63d1f441025d78c9f70cb6a82a7a955d Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 2 Aug 2019 19:51:25 +0800 Subject: [PATCH 01/23] images --- public/react/src/modules/forums/RecommendShixun.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/forums/RecommendShixun.js b/public/react/src/modules/forums/RecommendShixun.js index aa9dec952..af0ca0007 100644 --- a/public/react/src/modules/forums/RecommendShixun.js +++ b/public/react/src/modules/forums/RecommendShixun.js @@ -28,7 +28,7 @@ class RecommendShixun extends Component {
- {`${_shixun.id}`} + {`${_shixun.id}`}
From 6836318b209fdba4a67885a3de93fbd53a16ad9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 19:58:19 +0800 Subject: [PATCH 02/23] =?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/message/js/MessagSub.js | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index bbbb7caa3..07ab9e890 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -212,15 +212,15 @@ class MessagSub extends Component{ return ''; case "HomeworkCommon" : //学生作业页 homework = parent_container_id - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } @@ -229,15 +229,15 @@ class MessagSub extends Component{ return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`) case "StudentWorksScore" : //学生作业页 - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } @@ -308,97 +308,97 @@ class MessagSub extends Component{ switch (item.parent_container_type) { case "AnonymousCommentFail" : // 课堂-作业列表 homework = container_id - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } case "HomeworkPublish" : - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } case "AnonymousAppeal" : - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } default : // 课堂-作业列表 homework = container_id - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } } case "StudentWork" : //课堂-作业 :id = container_id - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}/list?tab=0`) } case "StudentWorksScore" : //课堂-作业 :id = parent_container_id - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } case "StudentWorksScoresAppeal" : - if(item.homework_type===1){ + if(item.homework_type==="normal"){ //普通作业 return window.open(`courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===3){ + if(item.homework_type==="group"){ //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) } - if(item.homework_type===4){ + if(item.homework_type==="practice"){ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } From 925582c1f42cbb01ab7a14bb9f14093a907a657e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 2 Aug 2019 20:02:30 +0800 Subject: [PATCH 03/23] evaluation_end --- public/react/src/modules/courses/busyWork/CommonWorkSetting.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 17a944d41..8baee4b45 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -722,7 +722,7 @@ class CommonWorkSetting extends Component{ late_time: late_time ? new Date(late_time) : late_time, // 补交截止时间 anonymous_comment: anonymous_comment, // true: 启用匿评 false:未启用匿评 evaluation_start: evaluation_start ? new Date(evaluation_start) : evaluation_start, //匿评开始时间 - evaluation_end: evaluation_end, + evaluation_end: evaluation_end ? new Date(evaluation_end) : evaluation_end, evaluation_num: evaluation_num, // 匿评数 absence_penalty: absence_penalty, // 匿评扣分 anonymous_appeal: anonymous_appeal, // true: 启用匿评申诉, false:未启用 From aeaf0a322fdb9e10a7c1649a08ba38650cae3c0b Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 2 Aug 2019 20:06:09 +0800 Subject: [PATCH 04/23] =?UTF-8?q?=E5=A4=B4=E5=83=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5040acec0..7e9fd652b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -130,15 +130,15 @@ module ApplicationHelper if source.class.to_s == 'User' File.join(relative_path, ["#{source.class}", "#{source.id}"]) else - File.join("avatars", ["#{source.class}", "#{source.id}"]) + File.join("images/avatars", ["#{source.class}", "#{source.id}"]) end elsif source.class.to_s == 'User' str = source.user_extension.try(:gender).to_i == 0 ? "b" : "g" File.join(relative_path, "#{source.class}", str) elsif source.class.to_s == 'Subject' - File.join("educoder", "index", "subject", "subject#{rand(17)}.jpg") + File.join("images","educoder", "index", "subject", "subject#{rand(17)}.jpg") elsif source.class.to_s == 'Shixun' - File.join("educoder","index", "shixun", "shixun#{rand(23)}.jpg") + File.join("images","educoder", "index", "shixun", "shixun#{rand(23)}.jpg") end end From 558135dc1fa7004104227307e35b02de8f6e13a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 20:06:20 +0800 Subject: [PATCH 05/23] =?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/src/modules/message/js/MessagSub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 07ab9e890..c072902e0 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -412,7 +412,7 @@ class MessagSub extends Component{ return window.open(`/projects/${item.parent_container_id}/issues?remote=true`) case "Issue" : //项目Issue页 :id = container_id - return window.open(`/projects/${item.container_id}/issues?remote=true`) + return window.open(`/issues/${item.container_id}`) case "PullRequest" : // 项目pull request页 :id = parent_container_id return window.open(`/projects/${item.parent_container_id}/pull_requests`) From 11d2976b2be32c54120002c26ebdbf72ecc071f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 20:15:02 +0800 Subject: [PATCH 06/23] =?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/src/modules/message/js/MessagSub.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index c072902e0..55b0754d6 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -441,6 +441,8 @@ class MessagSub extends Component{ return window.open(`/crowdsourcing/${item.container_id}`) // } } + case "Discuss": + return window.open(`/shixuns/${item.identifier}/shixun_discuss`); default : return window.open("/") } From 93ea9a2ad8705381112322032e4d696045f04155 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 2 Aug 2019 20:38:38 +0800 Subject: [PATCH 07/23] fix tiding --- app/decorators/tiding_decorator.rb | 4 ++-- config/locales/tidings/zh-CN.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 30a325cd3..2e800c4b4 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -106,9 +106,9 @@ module TidingDecorator if tiding_type == 'Apply' I18n.t(locale_format(tiding_type)) % name elsif status == 2 - I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), reason: extra) % name + I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), name: name, reason: extra) else - I18n.t(locale_format(tiding_type, status)) % name + I18n.t(locale_format(tiding_type, status), name: name, reason: extra) end end diff --git a/config/locales/tidings/zh-CN.yml b/config/locales/tidings/zh-CN.yml index 456f15887..8d7d1950f 100644 --- a/config/locales/tidings/zh-CN.yml +++ b/config/locales/tidings/zh-CN.yml @@ -38,8 +38,8 @@ Apply_end: "申请添加单位:%s" System: "1_end": "你提交的添加单位申请:%{name},审核已通过" - "2_reason_end": "你提交的添加单位申请:%{name},审核未通过
原因:%{reason}" - "2_no_reason_end": "你提交的添加单位申请:%{name},审核未通过" + "2_false_end": "你提交的添加单位申请:%{name},审核未通过
原因:%{reason}" + "2_true_end": "你提交的添加单位申请:%{name},审核未通过" "3_end": "你提交的添加单位申请:%{name},已被更改为:%{reason}" ApplyAction: ApplyShixun: From 6b02e495a8ce15c44905858b9b5b01b5c8319ba3 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 2 Aug 2019 20:41:16 +0800 Subject: [PATCH 08/23] fix --- app/decorators/tiding_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 2e800c4b4..77bbcf9e3 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -97,7 +97,7 @@ module TidingDecorator elsif status == 2 I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), reason: extra) % [name, second_name] else - I18n.t(locale_format(tiding_type, status)) % [name, second_name] + I18n.t(locale_format(tiding_type, status), reason: extra) % [name, second_name] end end From e459f48ac9802af92795beba934f2b03aa2703c6 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 2 Aug 2019 20:45:01 +0800 Subject: [PATCH 09/23] fix --- app/models/apply_user_authentication.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/models/apply_user_authentication.rb b/app/models/apply_user_authentication.rb index c7fb5019e..d467eb850 100644 --- a/app/models/apply_user_authentication.rb +++ b/app/models/apply_user_authentication.rb @@ -3,8 +3,18 @@ class ApplyUserAuthentication < ApplicationRecord belongs_to :user + has_many :tidings, :as => :container, :dependent => :destroy + scope :real_name_auth, -> { where(auth_type: 1) } scope :professional_auth, -> { where(auth_type: 2) } scope :processing, -> { where(status: 0) } scope :passed, -> { where(status: 1) } + + after_create :send_tiding + + private + + def send_tiding + self.tidings << Tiding.new(:user_id => '1', :status=> 0, :trigger_user_id => user_id, :belong_container_id => 1, :belong_container_type =>'User', :tiding_type => "Apply") + end end From aec6029a00152dbc14c40534b1163f5756ba7b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 21:03:07 +0800 Subject: [PATCH 10/23] =?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/message/js/MessagSub.js | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 55b0754d6..69dcf0b36 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -377,31 +377,34 @@ class MessagSub extends Component{ } case "StudentWorksScore" : //课堂-作业 :id = parent_container_id - if(item.homework_type==="normal"){ - //普通作业 - return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) - } - if(item.homework_type==="group"){ - //分组作业 - return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) - } - if(item.homework_type==="practice"){ - //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) - } + // if(item.homework_type==="normal"){ + // //普通作业 + // return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) + // } + // if(item.homework_type==="group"){ + // //分组作业 + // return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) + // } + // if(item.homework_type==="practice"){ + // //实训作业 + // return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) + // } + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.trigger_user.id}/appraise`); + case "StudentWorksScoresAppeal" : - if(item.homework_type==="normal"){ - //普通作业 - return window.open(`courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) - } - if(item.homework_type==="group"){ - //分组作业 - return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) - } - if(item.homework_type==="practice"){ - //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) - } + // if(item.homework_type==="normal"){ + // //普通作业 + // return window.open(`courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) + // } + // if(item.homework_type==="group"){ + // //分组作业 + // return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) + // } + // if(item.homework_type==="practice"){ + // //实训作业 + // return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) + // } + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.trigger_user.id}/appraise`); case "ChallengeWorkScore" : return ''; case "SendMessage" : From 1304c93f15b5e01e94581d89b73116675b4cbadc Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 2 Aug 2019 21:05:23 +0800 Subject: [PATCH 11/23] fix --- app/decorators/tiding_decorator.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 77bbcf9e3..d1f6f08e6 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -47,13 +47,13 @@ module TidingDecorator # ================ 各种类消息内容方法 ================ def apply_user_authentication_content - return if trigger_user_id.zero? + t_user = trigger_user || User.find(1) if tiding_type == 'Apply' str1, str2 = if container.auth_type == 1 - [trigger_user.show_real_name, trigger_user.ID_number] + [t_user.show_real_name, t_user.ID_number] elsif container.auth_type == 2 - ue = trigger_user.user_extension + ue = t_user.user_extension [[ue.school&.name, ue.department&.name].join('_'), ue.identity_text] end I18n.t(locale_format(tiding_type, container.auth_type)) % [str1, str2] From 77f9ec58da1a88a89f2bd08f58765ef2cc27e186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 21:08:28 +0800 Subject: [PATCH 12/23] =?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/src/modules/message/js/MessagSub.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 69dcf0b36..e8b3b4d7e 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -389,7 +389,7 @@ class MessagSub extends Component{ // //实训作业 // return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) // } - return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.trigger_user.id}/appraise`); + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`); case "StudentWorksScoresAppeal" : // if(item.homework_type==="normal"){ @@ -404,7 +404,7 @@ class MessagSub extends Component{ // //实训作业 // return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) // } - return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.trigger_user.id}/appraise`); + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`); case "ChallengeWorkScore" : return ''; case "SendMessage" : From 8e50f27e11eaf79ec2bbe07ec763c162e7848f52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 21:19:40 +0800 Subject: [PATCH 13/23] =?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/src/modules/message/js/MessagSub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index e8b3b4d7e..28eb3fb2d 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -467,7 +467,7 @@ class MessagSub extends Component{
  • this.getdata("project_package",1)}>众包提醒
  • -
  • this.getdata("interactive",1)}>互动提醒
  • +
  • this.getdata("interaction",1)}>互动提醒
  • this.getdata("apply",1)}>审核
  • From e7d3a06259e916eb6469fb2341b82915009e4c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 21:20:06 +0800 Subject: [PATCH 14/23] =?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/src/modules/message/js/MessagSub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 28eb3fb2d..ea280af75 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -467,7 +467,7 @@ class MessagSub extends Component{
  • this.getdata("project_package",1)}>众包提醒
  • -
  • this.getdata("interaction",1)}>互动提醒
  • +
  • this.getdata("interaction",1)}>互动提醒
  • this.getdata("apply",1)}>审核
  • From c7036f25525a0fd8e16ee139157a34c3ffa3c1e1 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 2 Aug 2019 21:26:49 +0800 Subject: [PATCH 15/23] =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/exercises_controller.rb | 5 +++- app/controllers/polls_controller.rb | 1 + app/jobs/commit_exercsie_notify_job_job.rb | 26 +++++++++++++++++++ app/jobs/commit_poll_notify_job_job.rb | 26 +++++++++++++++++++ app/models/student_graduation_topic.rb | 5 ++++ config/locales/tidings/zh-CN.yml | 10 +++---- .../commit_exercsie_notify_job_job_spec.rb | 5 ++++ spec/jobs/commit_poll_notify_job_job_spec.rb | 5 ++++ 8 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 app/jobs/commit_exercsie_notify_job_job.rb create mode 100644 app/jobs/commit_poll_notify_job_job.rb create mode 100644 spec/jobs/commit_exercsie_notify_job_job_spec.rb create mode 100644 spec/jobs/commit_poll_notify_job_job_spec.rb diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 6f121db5f..e92c3b266 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -703,12 +703,14 @@ class ExercisesController < ApplicationController end if ex_status == 1 #如果试卷存在已发布的,或者是已截止的,那么则直接跳过 g_course = params[:group_ids] #表示是否传入分班参数,如果传入分班的参数,那么试卷的统一设置需修改 + tiding_group_ids = g_course if g_course user_course_groups = @course.charge_group_ids(current_user) if g_course.map(&:to_i).sort == user_course_groups.sort # 如果是设置为全部班级,则试卷不用分组,且试卷设定为统一设置,否则则分组设置 exercise.exercise_group_settings.destroy_all ex_unified = true e_time = ex_end_time + tiding_group_ids = [] else ex_unified = false g_course.each do |i| @@ -748,7 +750,7 @@ class ExercisesController < ApplicationController if exercise.course_acts.size == 0 exercise.course_acts << CourseActivity.new(:user_id => exercise.user_id,:course_id => exercise.course_id) end - ExercisePublishNotifyJob.perform_later(exercise.id, g_course) + ExercisePublishNotifyJob.perform_later(exercise.id, tiding_group_ids) end end end @@ -1084,6 +1086,7 @@ class ExercisesController < ApplicationController :subjective_score => subjective_score } @answer_committed_user.update_attributes(commit_option) + CommitExercsieNotifyJobJob.perform_later(@exercise.id, current_user.id) normal_status(0,"试卷提交成功!") end rescue Exception => e diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 7d978d722..ba3030424 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -919,6 +919,7 @@ class PollsController < ApplicationController :end_at => Time.now } poll_user_current.update_attributes(poll_user_params) + CommitPollNotifyJobJob.perform_later(@poll.id, current_user.id) normal_status(0, "问卷提交成功!") end ## 需添加发送消息的接口,稍后添加 diff --git a/app/jobs/commit_exercsie_notify_job_job.rb b/app/jobs/commit_exercsie_notify_job_job.rb new file mode 100644 index 000000000..1be0bb2bc --- /dev/null +++ b/app/jobs/commit_exercsie_notify_job_job.rb @@ -0,0 +1,26 @@ +class CommitExercsieNotifyJobJob < ApplicationJob + queue_as :notify + + def perform(exercise_id, user_id) + exercise = Exercise.find_by(id: exercise_id) + user = User.find_by(id: user_id) + return if [exercise, user].any?(&:blank?) + course = exercise.course + + attrs = %i[user_id trigger_user_id container_id container_type parent_container_id parent_container_type + belong_container_id belong_container_type tiding_type viewed status created_at updated_at] + + same_attrs = { + trigger_user_id: user.id, + container_id: exercise.id, container_type: 'Exercise', + parent_container_id: exercise.id, parent_container_type: 'CommitExercise', + belong_container_id: course.id, belong_container_type: 'Course', + tiding_type: 'Exercise', viewed: 0, status: 0 + } + Tiding.bulk_insert(*attrs) do |worker| + course.course_member(user).member_teachers.each do |teacher| + worker.add same_attrs.merge(user_id: teacher.user_id) + end + end + end +end diff --git a/app/jobs/commit_poll_notify_job_job.rb b/app/jobs/commit_poll_notify_job_job.rb new file mode 100644 index 000000000..6953fa9e9 --- /dev/null +++ b/app/jobs/commit_poll_notify_job_job.rb @@ -0,0 +1,26 @@ +class CommitPollNotifyJobJob < ApplicationJob + queue_as :notify + + def perform(poll_id, user_id) + poll = Poll.find_by(id: poll_id) + user = User.find_by(id: user_id) + return if [poll, user].any?(&:blank?) + course = poll.course + + attrs = %i[user_id trigger_user_id container_id container_type parent_container_id parent_container_type + belong_container_id belong_container_type tiding_type viewed status created_at updated_at] + + same_attrs = { + trigger_user_id: user.id, + container_id: poll.id, container_type: 'Poll', + parent_container_id: poll.id, parent_container_type: 'CommitPoll', + belong_container_id: course.id, belong_container_type: 'Course', + tiding_type: 'Poll', viewed: 0, status: 0 + } + Tiding.bulk_insert(*attrs) do |worker| + course.course_member(user).member_teachers.each do |teacher| + worker.add same_attrs.merge(user_id: teacher.user_id) + end + end + end +end diff --git a/app/models/student_graduation_topic.rb b/app/models/student_graduation_topic.rb index ea1774695..50f150f92 100644 --- a/app/models/student_graduation_topic.rb +++ b/app/models/student_graduation_topic.rb @@ -17,7 +17,12 @@ class StudentGraduationTopic < ApplicationRecord scope :is_refused, -> {where(status: 2)} scope :is_accepted, -> {where(status: 1)} scope :is_accepting, -> {where(status: 0)} + after_create :send_tiding + def send_tiding + self.tidings << Tiding.new(:user_id => self.graduation_topic.tea_id, :trigger_user_id => self.user_id, :parent_container_id => self.graduation_topic_id, :parent_container_type => "GraduationTopic", + :belong_container_id => self.graduation_topic.course_id, :belong_container_type => "Course", :viewed => 0, :status => 0, :tiding_type => "GraduationTopic") + end # 学生名称 def name diff --git a/config/locales/tidings/zh-CN.yml b/config/locales/tidings/zh-CN.yml index 456f15887..d6b44b26c 100644 --- a/config/locales/tidings/zh-CN.yml +++ b/config/locales/tidings/zh-CN.yml @@ -164,7 +164,7 @@ NearlyEnd_end: "试卷的截止时间快到啦:%s" CommitExercise_end: "提交了试卷答题:%s" ExerciseScore_end: "评阅了你的试卷:%s" - StudentGraduationTopic_end: "选择了毕设选题:%s" + StudentGraduationTopic_end: "申请选择毕设选题:%s" DealStudentTopicSelect: 1_end: "你提交的选题申请:%s,审核已通过" 2_end: "你提交的选题申请:%s,审核未通过" @@ -195,11 +195,11 @@ ChallengeWorkScore_end: "调整了你的作品分数:%s" StudentWorksScoresAppeal: UserAppealResult: - 1_end: "同意了你提交的匿评申诉申请:%s" - 2_end: "拒绝了你提交的匿评申诉:%s" + 1_end: "你提交的匿评申诉申请:%s,审核已通过" + 2_end: "你提交的匿评申诉:%s,审核未通过" AppealResult: - 1_end: "同意了他人对你的匿评申诉申请:%s" - 2_end: "拒绝了他人对你的匿评申诉:%s" + 1_end: "别人对你的匿评发起的申诉申请:%s,审核已通过" + 2_end: "别人对你的匿评发起的申诉申请:%s,审核未通过" StudentWork: Apply_end: "发起了匿评申诉申请:%s" HomeworkCommon_end: "有人对你的匿评发起了申诉:%s" diff --git a/spec/jobs/commit_exercsie_notify_job_job_spec.rb b/spec/jobs/commit_exercsie_notify_job_job_spec.rb new file mode 100644 index 000000000..17894c9ad --- /dev/null +++ b/spec/jobs/commit_exercsie_notify_job_job_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe CommitExercsieNotifyJobJob, type: :job do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/jobs/commit_poll_notify_job_job_spec.rb b/spec/jobs/commit_poll_notify_job_job_spec.rb new file mode 100644 index 000000000..da292f7fb --- /dev/null +++ b/spec/jobs/commit_poll_notify_job_job_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe CommitPollNotifyJobJob, type: :job do + pending "add some examples to (or delete) #{__FILE__}" +end From de9a841c6fd5162c8c66ef6da8e5c5081e420fbf Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 2 Aug 2019 21:31:07 +0800 Subject: [PATCH 16/23] =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/journals_for_message.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index d5697d87f..4300ae9cc 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -11,6 +11,7 @@ class JournalsForMessage < ApplicationRecord scope :parent_comment, -> { where(m_parent_id: nil)} scope :search_by_jour_type, lambda{|type,ids| where(jour_type:type,jour_id: ids)} + has_many :tidings, as: :container, dependent: :destroy # "jour_type", # 留言所属类型 # "jour_id", # 留言所属类型的id From 8e20a561c30b8ce471f612aaadca58f6882606ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 21:44:02 +0800 Subject: [PATCH 17/23] =?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/src/modules/message/js/Leftdialogue.js | 2 +- public/react/src/modules/message/js/MessagChat.js | 4 ++-- public/react/src/modules/message/js/MessagSub.js | 6 +++--- public/react/src/modules/message/js/MessagePrivate.js | 4 ++-- public/react/src/modules/message/js/Rightdialogue.js | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/message/js/Leftdialogue.js b/public/react/src/modules/message/js/Leftdialogue.js index b16746c70..c809bc9c9 100644 --- a/public/react/src/modules/message/js/Leftdialogue.js +++ b/public/react/src/modules/message/js/Leftdialogue.js @@ -53,7 +53,7 @@ class Leftdialogue extends Component{ -
    +
    diff --git a/public/react/src/modules/message/js/MessagChat.js b/public/react/src/modules/message/js/MessagChat.js index 76057f38a..52c8d9870 100644 --- a/public/react/src/modules/message/js/MessagChat.js +++ b/public/react/src/modules/message/js/MessagChat.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import "../css/messagemy.css" -import {getImageUrl} from 'educoder'; +import {getImageUrl,markdownToHTML} from 'educoder'; import { Modal,Input,Icon,Tooltip,Spin} from 'antd'; import axios from 'axios'; import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; @@ -656,7 +656,7 @@ class MessagChat extends Component{

    -

    +

    diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index ea280af75..72a7e373e 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -4,7 +4,7 @@ import { Pagination, } from "antd"; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {getImageUrl,markdownToHTML} from 'educoder'; import "../css/messagemy.css" //消息页面 class MessagSub extends Component{ @@ -471,7 +471,7 @@ class MessagSub extends Component{
  • this.getdata("apply",1)}>审核
  • -
  • this.getdata("system",1)}>通知
  • +
  • this.getdata("notice",1)}>通知
  • @@ -537,7 +537,7 @@ class MessagSub extends Component{ ` } -

    +

    diff --git a/public/react/src/modules/message/js/MessagePrivate.js b/public/react/src/modules/message/js/MessagePrivate.js index b41ba41a5..036ae99aa 100644 --- a/public/react/src/modules/message/js/MessagePrivate.js +++ b/public/react/src/modules/message/js/MessagePrivate.js @@ -5,7 +5,7 @@ import { } from "antd"; import axios from 'axios'; import moment from 'moment'; -import {getImageUrl} from 'educoder'; +import {getImageUrl,markdownToHTML} from 'educoder'; import "../css/messagemy.css" import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal'; //私信页面 @@ -179,7 +179,7 @@ class MessagePrivate extends Component{ [{item.message_count}{"条"}] {moment(item.send_time).fromNow()}

    - + {item.unread === true ?:""} diff --git a/public/react/src/modules/message/js/Rightdialogue.js b/public/react/src/modules/message/js/Rightdialogue.js index 04c5f966d..a414f5d52 100644 --- a/public/react/src/modules/message/js/Rightdialogue.js +++ b/public/react/src/modules/message/js/Rightdialogue.js @@ -53,7 +53,7 @@ class Rightdialogue extends Component{ -
    +
    this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除 From 1fcca25a651ba26ce5155355c06141459b68e9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 21:49:35 +0800 Subject: [PATCH 18/23] =?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/src/modules/message/js/Messagerouting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/message/js/Messagerouting.js b/public/react/src/modules/message/js/Messagerouting.js index f7e188361..2667127ca 100644 --- a/public/react/src/modules/message/js/Messagerouting.js +++ b/public/react/src/modules/message/js/Messagerouting.js @@ -205,11 +205,11 @@ class Messagerouting extends Component{
    From a47fd91b8eaae8b3e9e8ac4862ccfce991c1590b Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 2 Aug 2019 21:53:58 +0800 Subject: [PATCH 19/23] fix --- app/views/tidings/_tiding.json.jbuilder | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/tidings/_tiding.json.jbuilder b/app/views/tidings/_tiding.json.jbuilder index c00670433..460f7c403 100644 --- a/app/views/tidings/_tiding.json.jbuilder +++ b/app/views/tidings/_tiding.json.jbuilder @@ -4,7 +4,15 @@ json.content tiding.content json.identifier tiding.identifier json.auth_type tiding.container_type == 'ApplyUserAuthentication' ? tiding.container.auth_type : nil -json.homework_type tiding.container_type == 'HomeworkCommon' ? tiding.container.homework_type : nil + +homework_type = nil +if tiding.container_type == 'HomeworkCommon' + homework_type = tiding.container.homework_type rescue nil + if homework_type.blank? + homework_type = tiding.parent_container.homework_type rescue nil + end +end +json.homework_type homework_type json.time tiding.how_long_time json.new_tiding tiding.unread?(@onclick_time) From 62246ca7ce5a80239bd359f57563dfcaec3d1526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 21:57:50 +0800 Subject: [PATCH 20/23] =?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/src/modules/message/js/MessagSub.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 72a7e373e..1a543914d 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -224,6 +224,7 @@ class MessagSub extends Component{ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } + return ""; case "GraduationTopic" : // 毕业目标页 parent_container_id return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`) @@ -241,6 +242,7 @@ class MessagSub extends Component{ //实训作业 return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) } + return ""; } case "Memo" : // 交流问答页 :id = parent_container_id @@ -500,6 +502,11 @@ class MessagSub extends Component{ if(item.parent_container_type==="Principal"){ boolps=false; } + if(item.parent_container_type==="HomeworkCommon"){ + if(item.homework_type===null||item.homework_type===undefined){ + boolps=false; + } + } } // if(item.container_type==="HomeworkCommon"){ // if(item.parent_container_type==="AnonymousAppeal"){ From a232108d6dd9c49fdaec7d298975a8061b92a0a0 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 2 Aug 2019 21:57:51 +0800 Subject: [PATCH 21/23] fix --- app/views/tidings/_tiding.json.jbuilder | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/tidings/_tiding.json.jbuilder b/app/views/tidings/_tiding.json.jbuilder index 460f7c403..207d4b137 100644 --- a/app/views/tidings/_tiding.json.jbuilder +++ b/app/views/tidings/_tiding.json.jbuilder @@ -8,9 +8,9 @@ json.auth_type tiding.container_type == 'ApplyUserAuthentication' ? tiding.conta homework_type = nil if tiding.container_type == 'HomeworkCommon' homework_type = tiding.container.homework_type rescue nil - if homework_type.blank? - homework_type = tiding.parent_container.homework_type rescue nil - end +end +if homework_type.blank? && tiding.parent_container_type == 'HomeworkCommon' + homework_type = tiding.parent_container.homework_type rescue nil end json.homework_type homework_type From 46290b80eccee632b34afc5aa426c30c194c7490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 22:05:21 +0800 Subject: [PATCH 22/23] =?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/src/modules/message/js/MessagSub.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 1a543914d..632a99f3e 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -214,15 +214,15 @@ class MessagSub extends Component{ //学生作业页 homework = parent_container_id if(item.homework_type==="normal"){ //普通作业 - return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`) } if(item.homework_type==="group"){ //分组作业 - return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) + return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`) } if(item.homework_type==="practice"){ //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) + return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/openlist?tab=1`) } return ""; case "GraduationTopic" : @@ -232,15 +232,15 @@ class MessagSub extends Component{ //学生作业页 if(item.homework_type==="normal"){ //普通作业 - return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) + return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`) } if(item.homework_type==="group"){ //分组作业 - return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) + return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`) } if(item.homework_type==="practice"){ //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) + return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/openlist?tab=1`) } return ""; } From 9b298eaed5e6747d0d63d90e20bb3813539fc58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 2 Aug 2019 22:08:38 +0800 Subject: [PATCH 23/23] =?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/src/modules/message/js/MessagSub.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 632a99f3e..8b4c7d30d 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -222,7 +222,7 @@ class MessagSub extends Component{ } if(item.homework_type==="practice"){ //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/openlist?tab=1`) + return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/`) } return ""; case "GraduationTopic" : @@ -240,7 +240,7 @@ class MessagSub extends Component{ } if(item.homework_type==="practice"){ //实训作业 - return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/openlist?tab=1`) + return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/`) } return ""; }