From c784dde38d9fa4b6d02fe250ccbf2779bda0ab94 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 26 Dec 2019 11:05:17 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/decorators/tiding_decorator.rb | 2 +- config/locales/tidings/zh-CN.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 8e0c402dd..318167d92 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -226,7 +226,7 @@ module TidingDecorator end def discuss_content - I18n.t(locale_format(container_type, container.parent_id.present?)) % message_content_helper(container.content) + I18n.t(locale_format(parent_container_type, container.parent_id.present?)) % message_content_helper(container.content) end def grade_content diff --git a/config/locales/tidings/zh-CN.yml b/config/locales/tidings/zh-CN.yml index cdde0f97f..1117786c0 100644 --- a/config/locales/tidings/zh-CN.yml +++ b/config/locales/tidings/zh-CN.yml @@ -108,7 +108,7 @@ Issue_end: "赞了你发布的项目Issue:%s" Journal_end: "赞了你的回复%s" Discuss: - Shixun: + Challenge: true_end: "评论了你的回复:%s" false_end: "评论了你发布的实训:%s" Hack: From ed5a7020c21336d4a0babcc3cb8d60d77d7c78d7 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 26 Dec 2019 11:32:33 +0800 Subject: [PATCH 2/5] 1 --- app/decorators/grade_decorator.rb | 2 +- app/decorators/tiding_decorator.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/decorators/grade_decorator.rb b/app/decorators/grade_decorator.rb index b89cd99ce..5e2b9deed 100644 --- a/app/decorators/grade_decorator.rb +++ b/app/decorators/grade_decorator.rb @@ -33,7 +33,7 @@ module GradeDecorator game.present? ? "查看实训“#{game.challenge.shixun.name}”第#{game.challenge.position}关的TA人解答消耗的金币" : '' when 'hack' then hack = Hack.find_by(id: container_id) - game.present? ? "完成了题目解答“#{hack.name}”,获得金币奖励:#{hack.score}" : '' + hack.present? ? "完成了题目解答“#{hack.name}”,获得金币奖励:#{hack.score}" : '' end end end \ No newline at end of file diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 318167d92..894241431 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -242,8 +242,10 @@ module TidingDecorator end when 'Game' then game = Game.find_by(id: parent_container_id) + Rails.logger.info("#####game:#{game.id}") if game.present? format_str = I18n.t(locale_format(parent_container_type)) + Rails.logger.info("#####format_str:#{format_str}") format_str % [game.challenge.shixun.name, game.challenge.position, container.score] end when 'testSet' then From 5fa5c61700654408238d3d44638c16de338e0307 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 26 Dec 2019 11:35:04 +0800 Subject: [PATCH 3/5] fixbug --- app/decorators/tiding_decorator.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 894241431..318167d92 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -242,10 +242,8 @@ module TidingDecorator end when 'Game' then game = Game.find_by(id: parent_container_id) - Rails.logger.info("#####game:#{game.id}") if game.present? format_str = I18n.t(locale_format(parent_container_type)) - Rails.logger.info("#####format_str:#{format_str}") format_str % [game.challenge.shixun.name, game.challenge.position, container.score] end when 'testSet' then From 8f760f5fa639ee8379d7d383fe10e528ac70b41d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 26 Dec 2019 13:58:58 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=BB=B6=E6=97=B6=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/tpm/shixunchild/Challenges/Challengesjupyter.js | 6 ++++-- public/react/src/redux/actions/jupyter.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index e5e709fac..63fb974c0 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -219,7 +219,7 @@ class Challengesjupyter extends Component { modifyjupyter=()=>{ // this.props.showNotification('实训正在保存中...!'); - + setTimeout(() => { let id=this.props.match.params.shixunId; var jupyter_port=""; try{ @@ -257,8 +257,10 @@ class Challengesjupyter extends Component { }) this.props.showNotification('实训保存失败!'); }) - + }, 500) } + + opentitle=()=>{ this.setState({ opentitletype:!this.state.opentitletype diff --git a/public/react/src/redux/actions/jupyter.js b/public/react/src/redux/actions/jupyter.js index 1cd6c2f11..cf2459922 100644 --- a/public/react/src/redux/actions/jupyter.js +++ b/public/react/src/redux/actions/jupyter.js @@ -174,7 +174,7 @@ export const changeGetJupyterUrlState = (status) => { // 保存 jupyter tpi export const saveJupyterTpi = () => { return (dispatch, getState) => { - + setTimeout(() => { const { jupyter_tpi_code, jupyter_info }= getState().jupyterReducer; // console.log(jupyter_info.myshixun_identifier, jupyter_tpi_code); if (!jupyter_info.myshixun_identifier) return; @@ -182,7 +182,7 @@ export const saveJupyterTpi = () => { identifier: jupyter_info.myshixun_identifier, jupyter_port: jupyter_tpi_code }; - console.log(params); + fetchSaveJupyterTpi(params).then(res => { dispatch({ type: types.LOADING_STATUS, @@ -200,6 +200,8 @@ export const saveJupyterTpi = () => { payload: false }); }); + }, 500) + } } // 改变当前页数 From 8f82781e94ab203cecc13c5ca0fe2260f26e8acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 26 Dec 2019 14:12:42 +0800 Subject: [PATCH 5/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 --- .../src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 63fb974c0..2717ba6b8 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -579,7 +579,7 @@ class Challengesjupyter extends Component {
导入
- {/**/} + {/**/}