From 8b3eec3657d735542004e601a4d69418c749e635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 16:38:22 +0800 Subject: [PATCH 01/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tpm/challengesnew/TPMchallengesnew.js | 63 ++++++++++++++++--- .../tpm/challengesnew/TPMevaluation.js | 2 +- 2 files changed, 54 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js b/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js index 31ab8064d..70fb5d306 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js +++ b/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js @@ -18,6 +18,13 @@ const Option = Select.Option; const RadioGroup = Radio.Group; +function isNulltpm( str ){ + if ( str == "" ) return true; + var regu = "^[ ]+$"; + var re = new RegExp(regu); + return re.test(str); +} + export default class TPMchallengesnew extends Component { constructor(props) { super(props) @@ -195,7 +202,7 @@ export default class TPMchallengesnew extends Component { } CreatePracticesend = () => { - + const exercise_editormdvalue = this.exercisememoMDRef.current.getValue().trim(); this.setState({ CreatePracticesendtype:true @@ -237,6 +244,25 @@ export default class TPMchallengesnew extends Component { } + if (exercise_editormdvalue === undefined||exercise_editormdvalue==""||exercise_editormdvalue===null) { + this.setState({ + tpmcourseMessageMDType:true, + CreatePracticesendtype:false + }) + this.props.scrollToAnchor("tpmcourseMessageMD"); + return + } + + if(isNulltpm(exercise_editormdvalue)){ + this.setState({ + tpmcourseMessageMDType:true, + CreatePracticesendtype:false + }) + this.props.scrollToAnchor("tpmcourseMessageMD"); + return + } + + if(shixunCreatePracticeGroup===undefined){ this.setState({ shixunCreatePracticeGrouptype:true, @@ -284,7 +310,8 @@ export default class TPMchallengesnew extends Component { // return // } - const exercise_editormdvalue = this.exercisememoMDRef.current.getValue().trim(); + + let id = this.props.match.params.shixunId; let url = "/shixuns/" + id + "/challenges.json"; // exec_time:exec_time @@ -369,19 +396,13 @@ export default class TPMchallengesnew extends Component { } editPracticesend=()=>{ - this.setState({ editPracticesendtype:true }) - let {shixunCreatePractice, shixunCreatePracticeGroup, onshixunsmarkvalue, shixunsskillvaluelist,checkpointId,exec_time} = this.state; - - const exercise_editormdvalue = this.exercisememoMDRef.current.getValue().trim(); - let id = this.props.match.params.shixunId; - let url = "/shixuns/"+id+"/challenges/"+checkpointId+".json"; - + const exercise_editormdvalue = this.exercisememoMDRef.current.getValue().trim(); if (shixunCreatePractice === undefined||shixunCreatePractice=="") { this.setState({ @@ -408,6 +429,25 @@ export default class TPMchallengesnew extends Component { return } + if (exercise_editormdvalue === undefined||exercise_editormdvalue==""||exercise_editormdvalue===null) { + this.setState({ + tpmcourseMessageMDType:true, + editPracticesendtype:false + }) + this.props.scrollToAnchor("tpmcourseMessageMD"); + return + } + + if(isNulltpm(exercise_editormdvalue)){ + this.setState({ + tpmcourseMessageMDType:true, + editPracticesendtype:false + }) + this.props.scrollToAnchor("tpmcourseMessageMD"); + this.props.showNotification("过关任务,请勿输入空格"); + return + } + if(shixunCreatePracticeGroup===undefined){ this.setState({ shixunCreatePracticeGrouptype:true, @@ -591,7 +631,7 @@ export default class TPMchallengesnew extends Component {
-

*过关任务

+

*过关任务

+ + {this.state.tpmcourseMessageMDType===true?
必填项:不能为空
:""}
diff --git a/public/react/src/modules/tpm/challengesnew/TPMevaluation.js b/public/react/src/modules/tpm/challengesnew/TPMevaluation.js index af80c8410..7ff0942cc 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMevaluation.js +++ b/public/react/src/modules/tpm/challengesnew/TPMevaluation.js @@ -153,7 +153,7 @@ export default class TPMevaluation extends Component { addevaluationon=()=>{ let {evaluationlist,markvalue}=this.state; let newevaluationlist=evaluationlist; - newevaluationlist.push({hidden:0,input:"",output:"",score:0}); + newevaluationlist.push({hidden:0,input:"",output:"",score:0,match_rule:"full"}); newevaluationlist=this.oneditevaluationlist(newevaluationlist,markvalue); this.setevaluationlist(newevaluationlist); } From b5b41f61ccc259462fd56502cab21ca29567ec7e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 27 Dec 2019 17:02:02 +0800 Subject: [PATCH 02/58] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 1 + app/services/concerns/elasticsearch_able.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9630caaec..997af7235 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -678,4 +678,5 @@ class ApplicationController < ActionController::Base HotSearchKeyword.add(keyword) end + end diff --git a/app/services/concerns/elasticsearch_able.rb b/app/services/concerns/elasticsearch_able.rb index 015aac29b..8be3c0202 100644 --- a/app/services/concerns/elasticsearch_able.rb +++ b/app/services/concerns/elasticsearch_able.rb @@ -9,7 +9,7 @@ module ElasticsearchAble highlight: highlight_options, body_options: body_options, page: page, - per_page: per_page + per_page: 20 } end From 592e6a5dc5bb47559f319b586d05afeabaa3aa1f Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 27 Dec 2019 17:51:17 +0800 Subject: [PATCH 03/58] =?UTF-8?q?=E5=AE=9E=E8=B7=B5=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E4=B8=AD=E7=9A=84jupyter=E5=AE=9E=E8=AE=AD=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E9=80=89=E7=94=A8=E5=88=B0=E8=AF=BE=E5=A0=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 2 +- app/controllers/subjects_controller.rb | 2 +- app/models/course.rb | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 3a60dcde5..89f65c61d 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -1046,7 +1046,7 @@ class HomeworkCommonsController < ApplicationController course_module_id: course_module.id, position: course_module.course_second_categories.count + 1) # 去掉不对当前用户的单位公开的实训,已发布的实训 - stage.shixuns.where.not(shixuns: {id: none_shixun_ids}).unhidden.each do |shixun| + stage.shixuns.no_jupyter.where.not(shixuns: {id: none_shixun_ids}).unhidden.each do |shixun| homework = HomeworksService.new.create_homework shixun, @course, category, current_user @homework_ids << homework.id CreateStudentWorkJob.perform_later(homework.id) diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index 0009ab2a6..2c1b5a810 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -255,7 +255,7 @@ class SubjectsController < ApplicationController CourseSecondCategory.create!(name: stage.name, course_id: @course.id, category_type: "shixun_homework", course_module_id: course_module.id, position: course_module.course_second_categories.count + 1) - stage.shixuns.where(id: params[:shixun_ids], status: 2).each do |shixun| + stage.shixuns.no_jupyter.where(id: params[:shixun_ids], status: 2).each do |shixun| homework = HomeworksService.new.create_homework shixun, @course, category, current_user homework_ids << homework.id end diff --git a/app/models/course.rb b/app/models/course.rb index 2f561bba7..b3e62bb99 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -92,6 +92,7 @@ class Course < ApplicationRecord where("name LIKE ?", "%#{keywords.split(" ").join('|')}%") unless keywords.blank? } scope :started, -> { where("start_date is null or start_date <= '#{Date.today}'") } + scope :no_jupyter, -> { where(is_jupyter: false) } # acts_as_taggable From 9036a443c06ac9ef6a44d0dc7d9b82844fc4ef0c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 27 Dec 2019 17:55:57 +0800 Subject: [PATCH 04/58] =?UTF-8?q?Jupyter=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 31 ++++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index c871c3064..8a752106c 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -772,7 +772,7 @@ class ShixunsController < ApplicationController # jupyter开启挑战 def jupyter_exec - begin + if is_shixun_opening? tip_show_exception(-3, "#{@shixun.opening_time.strftime('%Y-%m-%d %H:%M:%S')}") end @@ -786,22 +786,23 @@ class ShixunsController < ApplicationController commit_id = commit["id"] cloud_bridge = edu_setting('cloud_bridge') myshixun_identifier = generate_identifier Myshixun, 10 - ActiveRecord::Base.transaction do - @myshixun = @shixun.myshixuns.create!(user_id: current_user.id, identifier: myshixun_identifier, - modify_time: @shixun.modify_time, reset_time: @shixun.reset_time, - onclick_time: Time.now, commit_id: commit_id) - # fork仓库 - project_fork(@myshixun, @repo_path, current_user.login) - rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path) - uri = "#{cloud_bridge}/bridge/game/openGameInstance" - params = {tpiID: "#{@myshixun.id}", tpmGitURL: rep_url, tpiRepoName: @myshixun.repo_name.split("/").last} - interface_post uri, params, 83, "服务器出现问题,请重置环境" + begin + ActiveRecord::Base.transaction do + @myshixun = @shixun.myshixuns.create!(user_id: current_user.id, identifier: myshixun_identifier, + modify_time: @shixun.modify_time, reset_time: @shixun.reset_time, + onclick_time: Time.now, commit_id: commit_id) + # fork仓库 + project_fork(@myshixun, @repo_path, current_user.login) + rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path) + uri = "#{cloud_bridge}/bridge/game/openGameInstance" + params = {tpiID: "#{@myshixun.id}", tpmGitURL: rep_url, tpiRepoName: @myshixun.repo_name.split("/").last} + interface_post uri, params, 83, "服务器出现问题,请重置环境" + end + rescue => e + uid_logger_error(e.message) + tip_exception("服务器出现问题,请重置环境") end end - rescue => e - uid_logger_error(e.message) - tip_exception(e.message) - end end def publish From 34432615bff445e518424e30b05ac3c7ddd876bb Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 18:08:50 +0800 Subject: [PATCH 05/58] upagte style --- public/react/src/App.js | 2 +- .../src/common/components/comment/CommentForm.js | 5 ++++- public/react/src/common/quillForEditor/index.js | 9 ++++++++- .../react/src/modules/developer/DeveloperHome.js | 1 - .../developer/components/controlSetting/index.js | 15 ++++++++++++--- .../developer/components/myMonacoEditor/index.js | 3 ++- .../src/modules/developer/studentStudy/index.js | 12 +++++++++--- .../studentStudy/leftpane/commitRecord/index.js | 11 ++++++++--- .../developer/studentStudy/leftpane/index.js | 6 ++++-- public/react/src/modules/message/js/MessagSub.js | 10 +++++++++- .../react/src/redux/reducers/ojForUserReducer.js | 2 +- 11 files changed, 58 insertions(+), 18 deletions(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index 07fd13e49..be6f6a5d6 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -727,7 +727,7 @@ class App extends Component { (props) => () } /> - () } /> diff --git a/public/react/src/common/components/comment/CommentForm.js b/public/react/src/common/components/comment/CommentForm.js index da4814a9e..484940807 100644 --- a/public/react/src/common/components/comment/CommentForm.js +++ b/public/react/src/common/components/comment/CommentForm.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-12-17 17:32:55 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-26 18:43:21 + * @LastEditTime : 2019-12-27 16:50:43 */ import './index.scss'; import React, { useState } from 'react'; @@ -25,6 +25,7 @@ function CommentForm (props) { const { getFieldDecorator } = form; const [ctx, setCtx] = useState(''); + const [focus, setFocus] = useState(false); const options = [ ['bold', 'italic', 'underline'], @@ -38,6 +39,7 @@ function CommentForm (props) { // 点击输入框 const handleInputClick = (type) => { setShowQuill(true); + setFocus(true); } // 取消 const handleCancle = () => { @@ -116,6 +118,7 @@ function CommentForm (props) { overflow: showQuill ? 'none' : 'hidden', transition: 'all 0.3s' }} + autoFocus={focus} style={{ height: '150px' }} placeholder="说点儿什么~" options={options} diff --git a/public/react/src/common/quillForEditor/index.js b/public/react/src/common/quillForEditor/index.js index 48c4224f3..cb214465c 100644 --- a/public/react/src/common/quillForEditor/index.js +++ b/public/react/src/common/quillForEditor/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-12-18 08:49:30 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 10:36:11 + * @LastEditTime : 2019-12-27 16:49:25 */ import './index.scss'; import 'quill/dist/quill.core.css'; // 核心样式 @@ -26,6 +26,7 @@ Quill.register(ImageBlot); function QuillForEditor ({ placeholder, readOnly, + autoFocus, options, value, imgAttrs = {}, // 指定图片的宽高 @@ -172,6 +173,12 @@ function QuillForEditor ({ } }, [quill, handleOnChange]); + useEffect(() => { + if (autoFocus) { + quill.focus(); + } + }, [quill, autoFocus]); + // 返回结果 return (
diff --git a/public/react/src/modules/developer/DeveloperHome.js b/public/react/src/modules/developer/DeveloperHome.js index ae230677a..0a738e6d5 100644 --- a/public/react/src/modules/developer/DeveloperHome.js +++ b/public/react/src/modules/developer/DeveloperHome.js @@ -120,7 +120,6 @@ const testMaps = { 2: '数据结构与算法' } } - class DeveloperHome extends React.PureComponent { /** * 表格列 diff --git a/public/react/src/modules/developer/components/controlSetting/index.js b/public/react/src/modules/developer/components/controlSetting/index.js index 5c970f00e..53b66a359 100644 --- a/public/react/src/modules/developer/components/controlSetting/index.js +++ b/public/react/src/modules/developer/components/controlSetting/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 16:02:36 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 09:32:34 + * @LastEditTime : 2019-12-27 18:05:50 */ import './index.scss'; import React, { useState, useRef, useEffect } from 'react'; @@ -19,6 +19,7 @@ const ControlSetting = (props) => { const { hack, + userCode, inputValue, loading, submitLoading, @@ -58,7 +59,7 @@ const ControlSetting = (props) => { // 调试代码 const handleTestCode = (e) => { - if (!hack.code) { + if (!userCode) { notification.warning({ message: '提示', description: '代码块内容不能为空' @@ -77,6 +78,13 @@ const ControlSetting = (props) => { // 提交 const handleSubmit = (e) => { e.preventDefault(); + if (!userCode) { + notification.warning({ + message: '提示', + description: '代码块内容不能为空' + }); + return; + } changeSubmitLoadingStatus(true); onSubmitForm && onSubmitForm(); } @@ -145,9 +153,10 @@ const ControlSetting = (props) => { const mapStateToProps = (state) => { const {commonReducer, ojForUserReducer} = state; const {loading, excuteState, submitLoading, showOrHideControl } = commonReducer; - const { commitTestRecordDetail, hack } = ojForUserReducer; + const { commitTestRecordDetail, hack, userCode } = ojForUserReducer; return { hack, + userCode, loading, submitLoading, excuteState, diff --git a/public/react/src/modules/developer/components/myMonacoEditor/index.js b/public/react/src/modules/developer/components/myMonacoEditor/index.js index 7c98d7c09..0e2d9d01b 100644 --- a/public/react/src/modules/developer/components/myMonacoEditor/index.js +++ b/public/react/src/modules/developer/components/myMonacoEditor/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 15:02:52 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 10:32:25 + * @LastEditTime : 2019-12-27 18:01:48 */ import './index.scss'; import React, { useState, useRef, useEffect } from 'react'; @@ -86,6 +86,7 @@ function MyMonacoEditor (props, ref) { // TODO 需要优化 节流 const val = editorRef.current.getValue(); // setEditCode(val); + // console.log('编辑器代码====>>>>', val); onCodeChange(val); // 值一变化保存当前代码值 // saveUserInputCode(val); diff --git a/public/react/src/modules/developer/studentStudy/index.js b/public/react/src/modules/developer/studentStudy/index.js index 391a6fbf4..2ef8c4ba9 100644 --- a/public/react/src/modules/developer/studentStudy/index.js +++ b/public/react/src/modules/developer/studentStudy/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-23 10:53:19 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 10:25:14 + * @LastEditTime : 2019-12-27 16:22:47 */ import './index.scss'; import React, { useEffect, useState } from 'react'; @@ -30,6 +30,7 @@ function StudentStudy (props) { // hack_identifier, // user_program_identifier, restoreInitialCode, + changeUserCodeTab, changeShowOrHideControl } = props; @@ -39,13 +40,17 @@ function StudentStudy (props) { saveUserProgramIdentifier } = props; - let { id } = params; + let { id, tab } = params; useEffect(() => { // 保存当前的id saveUserProgramIdentifier(id); // startProgramQuestion(id); getUserProgramDetail(id); + + if (tab) { + changeUserCodeTab(tab); + } }, []); useEffect(() => { @@ -176,7 +181,8 @@ const mapDispatchToProps = (dispatch) => ({ // 恢复初始代码 restoreInitialCode: (identifier, msg) => dispatch(actions.restoreInitialCode(identifier, msg)), changeShowOrHideControl: (flag) => dispatch(actions.changeShowOrHideControl(flag)), - clearOjForUserReducer: () => dispatch(actions.clearOjForUserReducer()) + clearOjForUserReducer: () => dispatch(actions.clearOjForUserReducer()), + changeUserCodeTab: (tab) => dispatch(actions.changeUserCodeTab(tab)) }); export default withRouter(connect( diff --git a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js index ac1b784c6..e7a8eae9c 100644 --- a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js +++ b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 09:49:33 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 10:39:00 + * @LastEditTime : 2019-12-27 17:14:04 */ import './index.scss'; import React, { useState, useEffect } from 'react'; @@ -116,6 +116,7 @@ const CommitRecord = (props) => { 执行结果: {reviewResult[status]}

@@ -158,7 +159,7 @@ const CommitRecord = (props) => { // 复制功能 let count = 0; useEffect(() => { - clipboard = new ClipboardJS('.copy_error'); + clipboard = new ClipboardJS('#copyError'); clipboard && clipboard.on('success', (e) => { e.clearSelection(); if (count > 0) return; @@ -166,8 +167,12 @@ const CommitRecord = (props) => { message.success('复制成功'); setTimeout(() => { message.destroy(); - }, 300); + }, 3000); }); + + return () => { + clipboard = null; + } }, []); const clickCopyErrInfo = () => { diff --git a/public/react/src/modules/developer/studentStudy/leftpane/index.js b/public/react/src/modules/developer/studentStudy/leftpane/index.js index 30eedea18..ac8d89321 100644 --- a/public/react/src/modules/developer/studentStudy/leftpane/index.js +++ b/public/react/src/modules/developer/studentStudy/leftpane/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-23 11:33:41 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-25 17:10:30 + * @LastEditTime : 2019-12-27 16:03:04 // */ import './index.scss'; import React, { useState, useEffect, useMemo } from 'react'; @@ -28,7 +28,7 @@ const LeftPane = (props) => { comments_count, /* 评论数*/ user_praise // 用户是否点赞 } = hack; - const [defaultActiveKey, setDefaultActiveKey] = useState('comment'); + const [defaultActiveKey, setDefaultActiveKey] = useState('task'); const navItem = [ { @@ -51,6 +51,8 @@ const LeftPane = (props) => { comment: () }; + console.log('======>>>>>>>', props); + useEffect(() => { setDefaultActiveKey(userCodeTab); }, [userCodeTab]) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 98036301e..29f31f77c 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -475,7 +475,11 @@ class MessagSub extends Component { // } } case "Discuss": - return window.open(`/shixuns/${item.identifier}/shixun_discuss`); + if (item.parent_container_type === 'Hack' && item.extra) { + return window.open(`/myproblems/${item.extra}/comment`); + } else { + return window.open(`/shixuns/${item.identifier}/shixun_discuss`); + } case "Video": if (item.tiding_type === "Apply") { return window.open(`/admins/video_applies`); @@ -506,6 +510,10 @@ class MessagSub extends Component { //分组作业 return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}`); } + case 'Hack': + if (item.extra) { + return window.open(`/problems/${item.extra}/edit`); + } default : return } diff --git a/public/react/src/redux/reducers/ojForUserReducer.js b/public/react/src/redux/reducers/ojForUserReducer.js index f78385049..cbf0a04f3 100644 --- a/public/react/src/redux/reducers/ojForUserReducer.js +++ b/public/react/src/redux/reducers/ojForUserReducer.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 13:41:48 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 09:18:02 + * @LastEditTime : 2019-12-27 16:52:30 */ import types from "../actions/actionTypes"; import { Base64 } from 'js-base64'; From 194f8ff3d3ced2be5f382cb2448355b0aae9cf82 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 27 Dec 2019 18:13:04 +0800 Subject: [PATCH 06/58] =?UTF-8?q?=E5=AE=9E=E8=B7=B5=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E4=B8=AD=E7=9A=84jupyter=E5=AE=9E=E8=AE=AD=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E9=80=89=E7=94=A8=E5=88=B0=E8=AF=BE=E5=A0=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course.rb | 1 - app/models/shixun.rb | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/course.rb b/app/models/course.rb index b3e62bb99..2f561bba7 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -92,7 +92,6 @@ class Course < ApplicationRecord where("name LIKE ?", "%#{keywords.split(" ").join('|')}%") unless keywords.blank? } scope :started, -> { where("start_date is null or start_date <= '#{Date.today}'") } - scope :no_jupyter, -> { where(is_jupyter: false) } # acts_as_taggable diff --git a/app/models/shixun.rb b/app/models/shixun.rb index 9522c54da..d8a41ba6a 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -83,6 +83,7 @@ class Shixun < ApplicationRecord scope :publiced, lambda{ where(public: 2) } scope :field_for_recommend, lambda{ select([:id, :name, :identifier, :myshixuns_count]) } scope :find_by_ids,lambda{|k| where(id:k)} + scope :no_jupyter, -> { where(is_jupyter: false) } after_create :send_tiding #同步到trustie From 2652e5e4ab2ff8903411916c8c7d632d2ddfec1a 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, 27 Dec 2019 18:20:58 +0800 Subject: [PATCH 07/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Challenges/Challengesjupyter.js | 72 ++++++++++++++++--- 1 file changed, 63 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index b24d4dc2c..25495010e 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -344,14 +344,20 @@ class Challengesjupyter extends Component { identifier:id }}).then((response) => { if(response.data.status===0){ - setTimeout(()=>{ this.setState({ jupyter_url :response.data.url, booljupyterurls:true, }) - },1000); + },500); this.props.showNotification('重置实训成功!'); + + setTimeout(()=>{ + this.setState({ + booljupyterurls:true, + }) + },1000); + } }); } @@ -557,7 +563,49 @@ class Challengesjupyter extends Component { { this.state.jupyter_url === null || this.state.jupyter_url === undefined ? - "" + enlarge===true? +

+ +
+
+

任务详情

+

(请将实训题目写在下方并保存)

+
+
+ { + enlarge===true? + this.onclki(false)}> + : + this.onclki(true)}> + } + + +
+

导入

+
+
+ + +
+ +
+
+ + :"" : ( admin===true||business===true||mysidentity===true? @@ -640,15 +688,20 @@ class Challengesjupyter extends Component { this.state.jupyter_url===null || this.state.jupyter_url===undefined? ( booljupyterurls===false? - - :"" +
+ +
+ :
+
) : - +
+ scrolling="no" id="frame" + name="framename" width="100%" height="700" frameBorder="0" + > +
+ }
@@ -664,3 +717,4 @@ class Challengesjupyter extends Component { } export default Challengesjupyter; + From fa7e7426aabf25c16bb6ee3600bec366db73a90c Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 18:51:29 +0800 Subject: [PATCH 08/58] update style --- .../studentStudy/leftpane/taskDescription/index.js | 10 ++++++---- public/react/src/redux/actions/ojForm.js | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/developer/studentStudy/leftpane/taskDescription/index.js b/public/react/src/modules/developer/studentStudy/leftpane/taskDescription/index.js index f99d59092..ebc42b9a4 100644 --- a/public/react/src/modules/developer/studentStudy/leftpane/taskDescription/index.js +++ b/public/react/src/modules/developer/studentStudy/leftpane/taskDescription/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 09:49:30 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-25 14:50:37 + * @LastEditTime : 2019-12-27 18:42:59 */ import '../index.scss'; import React from 'react'; @@ -18,7 +18,7 @@ const {tagBackground, diffText} = CONST; const TaskDescription = (props) => { - const { hack = {} } = props; + const { hack = {}, userInfo = {} } = props; const {language, difficult, time_limit, username, description} = hack; return (
@@ -37,7 +37,7 @@ const TaskDescription = (props) => {

出题者: - {username} + {username}

@@ -52,8 +52,10 @@ const TaskDescription = (props) => { const mapStateToProps = (state) => { const { hack } = state.ojForUserReducer; + const { userInfo } = state.userReducer; return { - hack + hack, + userInfo } } diff --git a/public/react/src/redux/actions/ojForm.js b/public/react/src/redux/actions/ojForm.js index 9cd4e8228..094257f42 100644 --- a/public/react/src/redux/actions/ojForm.js +++ b/public/react/src/redux/actions/ojForm.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-20 16:35:46 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 14:18:02 + * @LastEditTime : 2019-12-27 18:50:22 */ import types from './actionTypes'; import CONST from '../../constants'; @@ -297,6 +297,9 @@ export const validateOjForm = (props, type, cb) => { type: types.SAVE_OJ_FORM_ID, payload: identifier }); + if (paramsObj['submitType'] === 'add' && identifier) { + props.history.push(`/problems/${identifier}/edit`) + }; } // 保存或更新后,调用start接口 // linkToDev(dispatch, props); From a298e38eb89a93378e5e0774dcba92aa48bc3983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 18:53:53 +0800 Subject: [PATCH 09/58] =?UTF-8?q?=E8=B0=83=E6=95=B4jupyter=E6=BB=91?= =?UTF-8?q?=E5=8A=A8=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/jupyter/index.js | 34 +++++++++++-------- .../react/src/modules/tpm/jupyter/index.scss | 6 ++++ .../src/redux/reducers/jupyterReducer.js | 6 +++- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index 25f82ef94..702ae2b71 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -279,9 +279,13 @@ function JupyterTPI (props) { }; // 分页处理 - const handleChangePage = (page) => { - - handlePageChange(page); + const handleChangePage = (e) => { + //滑动到底判断 + let newscrollTop=parseInt(e.currentTarget.scrollTop); + let allclientHeight=e.currentTarget.clientHeight+newscrollTop; + if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){ + handlePageChange(pagination.page+1); + } } // const listCtx = ; useEffect(() => { @@ -310,7 +314,7 @@ function JupyterTPI (props) { }); const oUl = ( -
    +
      handleChangePage(event)} > { oList }
    ); @@ -420,18 +424,18 @@ function JupyterTPI (props) {
- { renderCtx } -
- {total<20?"":} -
- + { renderCtx } + {/*
*/} + {/* {total<20?"":}*/} + {/*
*/} + diff --git a/public/react/src/modules/tpm/jupyter/index.scss b/public/react/src/modules/tpm/jupyter/index.scss index e6a95406a..57f833437 100644 --- a/public/react/src/modules/tpm/jupyter/index.scss +++ b/public/react/src/modules/tpm/jupyter/index.scss @@ -124,11 +124,17 @@ padding: 0px; } .ant-drawer-wrapper-body{ + overflow: hidden !important; padding-top: 60px; background: #070F1A; padding-bottom: 40px; } + .jupyter_data_list{ + height:500px; + overflow: auto; + } + .ant-pagination{ color:#fff !important; } diff --git a/public/react/src/redux/reducers/jupyterReducer.js b/public/react/src/redux/reducers/jupyterReducer.js index 75c9d374f..4b117b453 100644 --- a/public/react/src/redux/reducers/jupyterReducer.js +++ b/public/react/src/redux/reducers/jupyterReducer.js @@ -26,9 +26,13 @@ const JupyterReducer = (state = initState, action) => { switch (action.type) { case types.GET_JUPYTER_DATA_SETS: const { data_sets, data_sets_count,folder_name} = action.payload; + let newjupyter_data_set=state.jupyter_data_set; + data_sets.map((item,key)=>{ + newjupyter_data_set.push(item) + }) return { ...state, - jupyter_data_set: data_sets, + jupyter_data_set: newjupyter_data_set, jupyter_data_set_count: data_sets_count, jupyter_folder_name:folder_name, } From 6ac54750fd4866006bdfbc488952601a6b2e6c38 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, 27 Dec 2019 19:16:21 +0800 Subject: [PATCH 10/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/coursesDetail/CoursesBanner.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 7e1870895..acea19428 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -722,12 +722,13 @@ class CoursesBanner extends Component { color: rgba(255,255,255,0.3) !important; } .ant-tooltip-inner{ - background: #FFFFFF !important; - opacity: 0.2 !important; + background:#99CCFF !important; } .ant-tooltip-arrow::before{ - background: #FFFFFF !important; - opacity: 0.2 !important; + background:#99CCFF !important; + } + .antsoancss{ + color: #fff !important; } `} @@ -736,7 +737,10 @@ class CoursesBanner extends Component { 0?true:false} placement="topLeft" - title={
{coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?您有{coursedata.teacher_applies_count}条新的加入申请this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/teachers?tab=2")}>
+																		 title={
+																			 {coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?
+																				 您有{coursedata.teacher_applies_count}条新的加入申请
+																					 this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/teachers?tab=2")}>
 																			 

From c13f5c5a0391acb67454a1618fec70b43c3de643 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, 27 Dec 2019 19:17:28 +0800
Subject: [PATCH 11/58] =?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/courses/coursesDetail/CoursesBanner.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index acea19428..03d0816a3 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -728,7 +728,7 @@ class CoursesBanner extends Component {
 														background:#99CCFF !important;
 														}
 														.antsoancss{
-														color: #fff !important;
+														color: #fff;
 														}
 													`}
 												

From fba6f5067bb49ac35d1d564404601f7b4ffc5ae7 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, 27 Dec 2019 19:23:05 +0800
Subject: [PATCH 12/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../modules/tpm/shixunchild/Challenges/Challengesjupyter.js   | 4 ++--
 .../src/modules/tpm/shixunchild/shixunchildCss/Challenges.css | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js
index 25495010e..f7cc90654 100644
--- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js
+++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js
@@ -688,10 +688,10 @@ class Challengesjupyter extends Component {
 											this.state.jupyter_url===null || this.state.jupyter_url===undefined?
 												(
 													booljupyterurls===false?
-														
+
- :
+ :
) : diff --git a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css index f4f68cdba..d2bba2f84 100644 --- a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css +++ b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css @@ -214,6 +214,10 @@ right: 0px; } +.fangdatwoswidth{ + border-top: 1px solid #eeee; +} + .jupyterswidth{ width: 1140px; } From fd465c376d296a106efe4e2030b06fdf1b521e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 19:25:51 +0800 Subject: [PATCH 13/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/tpm/TPMsettings/Configuration.js | 4 +--- public/react/src/modules/tpm/jupyter/index.js | 19 ++++++++++--------- .../react/src/modules/tpm/jupyter/index.scss | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/tpm/TPMsettings/Configuration.js b/public/react/src/modules/tpm/TPMsettings/Configuration.js index bd93fa4e5..f48314261 100644 --- a/public/react/src/modules/tpm/TPMsettings/Configuration.js +++ b/public/react/src/modules/tpm/TPMsettings/Configuration.js @@ -164,7 +164,7 @@ export default class Shixuninformation extends Component { axios.post(url, { - scope_partment: list, + scope_partment:use_scope===0?undefined:list, shixun: { can_copy: can_copy, use_scope: use_scope, @@ -213,7 +213,6 @@ export default class Shixuninformation extends Component { if(scope_partment.length>0){ scope_partment.map((item, key) => { if (item === e) { - debugger scopetype = true } }) @@ -222,7 +221,6 @@ export default class Shixuninformation extends Component { if(oldscope_partment.length>0){ oldscope_partment.map((item, key) => { if (item === e) { - debugger scopetype = true } }) diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index 702ae2b71..feaa27e49 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -219,7 +219,6 @@ function JupyterTPI (props) { title: '重置环境', content: (

- 你在本文件中修改的内容将丢失,
是否确定重置环境?

), @@ -277,20 +276,22 @@ function JupyterTPI (props) { const firstDrawerWidth = ()=>{ return 260 }; - + let newPage=false // 分页处理 - const handleChangePage = (e) => { + const handleChangePage = (e,page) => { //滑动到底判断 let newscrollTop=parseInt(e.currentTarget.scrollTop); let allclientHeight=e.currentTarget.clientHeight+newscrollTop; - if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){ - handlePageChange(pagination.page+1); + if(dataSets.length { if (dataSets.length > 0) { - console.log('数据集的个数: ', dataSets.length); + // console.log('数据集的个数: ', dataSets.length); const oList = dataSets.map((item, i) => { return (
  • @@ -314,7 +315,7 @@ function JupyterTPI (props) { }); const oUl = ( -
      handleChangePage(event)} > +
        handleChangePage(event,pagination.page)} > { oList }
      ); @@ -413,7 +414,7 @@ function JupyterTPI (props) { 数据集 {/* 数据集 */} -

      + {dataSets&&dataSets.length===0?"":

      文件路径
      {jupyter_folder_name} @@ -423,7 +424,7 @@ function JupyterTPI (props) { }}>复制地址
      -

      + } { renderCtx } {/*
      */} {/* {total<20?"": Date: Fri, 27 Dec 2019 20:05:46 +0800 Subject: [PATCH 14/58] =?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/tpm/jupyter/index.js | 6 +++--- public/react/src/modules/tpm/jupyter/index.scss | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index feaa27e49..02a6c2259 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -414,11 +414,11 @@ function JupyterTPI (props) { 数据集 {/* 数据集 */} - {dataSets&&dataSets.length===0?"":

      + {dataSets&&dataSets.length===0?"":

      文件路径
      - {jupyter_folder_name} - {jupyter_folder_name} + { jsCopy("jupyter_folder_name") }}>复制地址 diff --git a/public/react/src/modules/tpm/jupyter/index.scss b/public/react/src/modules/tpm/jupyter/index.scss index 1808e4bb6..2428b93fd 100644 --- a/public/react/src/modules/tpm/jupyter/index.scss +++ b/public/react/src/modules/tpm/jupyter/index.scss @@ -237,4 +237,9 @@ line-height: 50px !important; white-space: nowrap; cursor: default; width: 181px; +} + +.height45lineheight45{ + height: 45px; + line-height: 45px !important; } \ No newline at end of file From da11a9079f1c154b2688153e762713350a5a9075 Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 20:06:01 +0800 Subject: [PATCH 15/58] update code not show --- .../components/myMonacoEditor/index2.js | 48 +++++++++++++++++++ .../newOrEditTask/rightpane/index.js | 10 ++-- .../developer/studentStudy/rightpane/index.js | 19 ++++---- public/react/src/redux/actions/ojForm.js | 14 +++--- .../src/redux/reducers/ojForUserReducer.js | 4 +- .../react/src/redux/reducers/ojFormReducer.js | 6 ++- 6 files changed, 78 insertions(+), 23 deletions(-) create mode 100644 public/react/src/modules/developer/components/myMonacoEditor/index2.js diff --git a/public/react/src/modules/developer/components/myMonacoEditor/index2.js b/public/react/src/modules/developer/components/myMonacoEditor/index2.js new file mode 100644 index 000000000..097fa2975 --- /dev/null +++ b/public/react/src/modules/developer/components/myMonacoEditor/index2.js @@ -0,0 +1,48 @@ +/* + * @Description: + * @Author: tangjiang + * @Github: + * @Date: 2019-12-27 19:18:09 + * @LastEditors: tangjiang + * @LastEditTime: 2019-12-27 19:19:23 + */ +import React, { useState } from 'react'; +import Editor from "@monaco-editor/react"; + +function App() { + const [theme, setTheme] = useState("light"); + const [language, setLanguage] = useState("javascript"); + const [isEditorReady, setIsEditorReady] = useState(false); + + function handleEditorDidMount() { + setIsEditorReady(true); + } + + function toggleTheme() { + setTheme(theme === "light" ? "dark" : "light"); + } + + function toggleLanguage() { + setLanguage(language === "javascript" ? "python" : "javascript"); + } + + return ( + + + + + + + + ); +} \ No newline at end of file diff --git a/public/react/src/modules/developer/newOrEditTask/rightpane/index.js b/public/react/src/modules/developer/newOrEditTask/rightpane/index.js index 16533c624..d42089d7f 100644 --- a/public/react/src/modules/developer/newOrEditTask/rightpane/index.js +++ b/public/react/src/modules/developer/newOrEditTask/rightpane/index.js @@ -4,10 +4,10 @@ * @Github: * @Date: 2019-12-01 10:18:35 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 10:17:07 + * @LastEditTime : 2019-12-27 19:33:50 */ import './index.scss'; -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { connect } from 'react-redux'; import MyMonacoEditor from '../../components/myMonacoEditor'; // import ControlSetting from '../../components/controlSetting'; @@ -18,6 +18,7 @@ function RightPane (props, ref) { const { // identifier, code, + showCode, language, // onSubmitForm, saveOjFormCode @@ -46,7 +47,7 @@ function RightPane (props, ref) {
      {/* { - const { ojForm, testCases, code, identifier } = state.ojFormReducer; + const { ojForm, testCases, code, identifier, showCode } = state.ojFormReducer; return { code, + showCode, identifier, language: ojForm.language, input: (testCases[0] && testCases[0].input) || '', diff --git a/public/react/src/modules/developer/studentStudy/rightpane/index.js b/public/react/src/modules/developer/studentStudy/rightpane/index.js index 8f4ac2533..ed500fb3a 100644 --- a/public/react/src/modules/developer/studentStudy/rightpane/index.js +++ b/public/react/src/modules/developer/studentStudy/rightpane/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 14:59:51 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 10:28:41 + * @LastEditTime : 2019-12-27 19:23:46 */ import React, { useState, useEffect } from 'react'; import {connect} from 'react-redux'; @@ -45,13 +45,14 @@ const RightPane = (props) => { // const [code, setCode] = useState(editor_code || hack.code); // let initFlag = true; - useEffect(() => { - if (editor_code) { - setEditorCode(editor_code); - } else { - setEditorCode(hack.code); - } - }, [hack, editor_code]); + // useEffect(() => { + // if (editor_code) { + // setEditorCode(editor_code); + // } else { + // setEditorCode(hack.code); + // } + // }, [hack, editor_code]); + const handleSubmitForm = () => { // 提交时, 先调用提交接口,提交成功后,循环调用测评接口 @@ -119,7 +120,7 @@ const RightPane = (props) => { notice={notice} identifier={identifier} language={hack.language} - code={editorCode} + code={editor_code || hack.code} hadCodeUpdate={hadCodeUpdate} onCodeChange={handleCodeChange} onUpdateNotice={handleUpdateNotice} diff --git a/public/react/src/redux/actions/ojForm.js b/public/react/src/redux/actions/ojForm.js index 094257f42..4e9173a3e 100644 --- a/public/react/src/redux/actions/ojForm.js +++ b/public/react/src/redux/actions/ojForm.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-20 16:35:46 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 18:50:22 + * @LastEditTime : 2019-12-27 20:03:12 */ import types from './actionTypes'; import CONST from '../../constants'; @@ -286,20 +286,22 @@ export const validateOjForm = (props, type, cb) => { } else if (type === 'challenge') { cb && cb(); } else { + const {identifier} = res.data; + // if (paramsObj['submitType'] === 'add' && identifier) { + // dispatch(validateOjForm(props, 'update')); + // props.history.push(`/problems/${identifier}/edit`); + // return; + // }; // message.success(paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功'); notification.success({ message: '提示', description: paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功' }); - const {identifier} = res.data; // 保存成功后的identifier identifier && dispatch({ type: types.SAVE_OJ_FORM_ID, payload: identifier }); - if (paramsObj['submitType'] === 'add' && identifier) { - props.history.push(`/problems/${identifier}/edit`) - }; } // 保存或更新后,调用start接口 // linkToDev(dispatch, props); @@ -502,7 +504,7 @@ export const deleteTestCase = (obj) => { export const getOJFormById = (id) => { return (dispatch) => { fetchGetOjById(id).then(res => { - console.log('获取OJ表单信息成功: ', res); + // console.log('获取OJ表单信息成功: ', res); dispatch({ type: types.SAVE_EDIT_OJ_FORM_AND_TEST_CASE, payload: res.data diff --git a/public/react/src/redux/reducers/ojForUserReducer.js b/public/react/src/redux/reducers/ojForUserReducer.js index cbf0a04f3..e95adf0ec 100644 --- a/public/react/src/redux/reducers/ojForUserReducer.js +++ b/public/react/src/redux/reducers/ojForUserReducer.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 13:41:48 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 16:52:30 + * @LastEditTime : 2019-12-27 19:56:06 */ import types from "../actions/actionTypes"; import { Base64 } from 'js-base64'; @@ -179,7 +179,7 @@ const ojForUserReducer = (state = initialState, action) => { commitTestRecordDetail: {}, // 调试代码执行结果 commitRecordDetail: {}, // 提交成功后记录提交的详情 commitRecord: [], // 提交记录 - userCode: '', // 保存当前用户输入的代码 + // userCode: '', // 保存当前用户输入的代码 isUpdateCode: false, // 是否更新了代码内容 userCodeTab: 'task', // 学员测评tab位置: task | record | comment userTestInput: '', // 用户自定义输入值 diff --git a/public/react/src/redux/reducers/ojFormReducer.js b/public/react/src/redux/reducers/ojFormReducer.js index b214eb3bc..952919aca 100644 --- a/public/react/src/redux/reducers/ojFormReducer.js +++ b/public/react/src/redux/reducers/ojFormReducer.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-20 16:40:32 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 10:35:06 + * @LastEditTime : 2019-12-27 20:00:26 */ import { Base64 } from 'js-base64'; import types from '../actions/actionTypes'; @@ -61,6 +61,7 @@ const init = { position: 1, // TODO 每次加载信息时同步指定positio值 score: 200, // 分值: 选择难易度后自动计算分值 200 | 500 | 1000 code: '', // 提交的代码 + showCode: '', // 编辑器显示的代码 identifier: '', // OJ表单id loading: false, // 僵尸loading标志 testCodeStatus: 'default', // 调试代码状态 default(默认值) | loading(加载中) | loaded(加载完成) | userCase(用户自定义测试用例) | finish(测试完成) @@ -216,7 +217,8 @@ const ojFormReducer = (state = initialState, action) => { testCases: curTestCases, testCasesValidate: curTcValidates, testCodeStatus: hack_sets.length > 0 ? 'userCase' : 'default', - isPublish: status + isPublish: status, + showCode: cbcode } case types.CHANGE_PUBLISH_VALUE: return { From fbf226979661d376d579d3676b5b6268bbbd01f2 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 27 Dec 2019 20:08:20 +0800 Subject: [PATCH 16/58] 1 --- app/views/hack_user_lastest_codes/show.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/hack_user_lastest_codes/show.json.jbuilder b/app/views/hack_user_lastest_codes/show.json.jbuilder index a158d074f..f866b3151 100644 --- a/app/views/hack_user_lastest_codes/show.json.jbuilder +++ b/app/views/hack_user_lastest_codes/show.json.jbuilder @@ -2,6 +2,7 @@ json.hack do json.(@hack, :id, :name, :difficult, :time_limit, :description, :score, :identifier, :status, :praises_count) json.language @hack.language json.username @hack.user.real_name + json.user_path "/users/#{@hack.user.login}" json.code @my_hack.code json.pass_count @hack.pass_num json.submit_count @hack.submit_num @@ -19,5 +20,4 @@ json.user do json.partial! 'users/user', user: current_user json.hack_manager @hack.manager?(current_user) json.admin current_user.admin_or_business? - end \ No newline at end of file From 8ad24ce770583204ca4ae5802f5049b9bf931718 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 27 Dec 2019 20:08:32 +0800 Subject: [PATCH 17/58] =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/hack_user_lastest_codes/show.json.jbuilder | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/hack_user_lastest_codes/show.json.jbuilder b/app/views/hack_user_lastest_codes/show.json.jbuilder index f866b3151..04b066aa0 100644 --- a/app/views/hack_user_lastest_codes/show.json.jbuilder +++ b/app/views/hack_user_lastest_codes/show.json.jbuilder @@ -1,8 +1,8 @@ json.hack do json.(@hack, :id, :name, :difficult, :time_limit, :description, :score, :identifier, :status, :praises_count) json.language @hack.language - json.username @hack.user.real_name - json.user_path "/users/#{@hack.user.login}" + json.username @hack.user&.real_name + json.user_path "/users/#{@hack.user&.login}" json.code @my_hack.code json.pass_count @hack.pass_num json.submit_count @hack.submit_num From f1a9828ca52d27cfeb2eebaf2792335b1fc17fe6 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, 27 Dec 2019 20:13:29 +0800 Subject: [PATCH 18/58] =?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/courses/coursesDetail/CoursesBanner.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 03d0816a3..8a71e36e6 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -722,10 +722,12 @@ class CoursesBanner extends Component { color: rgba(255,255,255,0.3) !important; } .ant-tooltip-inner{ - background:#99CCFF !important; + +background:rgba(204,204,204,0.2) !important; } .ant-tooltip-arrow::before{ - background:#99CCFF !important; + +background:rgba(204,204,204,0.2) !important; } .antsoancss{ color: #fff; From 30a5d8bec51b09ecff2faa61a8461a2c82a0cb37 Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 20:16:47 +0800 Subject: [PATCH 19/58] update code not show --- public/react/src/redux/actions/ojForm.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/public/react/src/redux/actions/ojForm.js b/public/react/src/redux/actions/ojForm.js index 4e9173a3e..d15bdce39 100644 --- a/public/react/src/redux/actions/ojForm.js +++ b/public/react/src/redux/actions/ojForm.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-20 16:35:46 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 20:03:12 + * @LastEditTime : 2019-12-27 20:13:01 */ import types from './actionTypes'; import CONST from '../../constants'; @@ -287,11 +287,7 @@ export const validateOjForm = (props, type, cb) => { cb && cb(); } else { const {identifier} = res.data; - // if (paramsObj['submitType'] === 'add' && identifier) { - // dispatch(validateOjForm(props, 'update')); - // props.history.push(`/problems/${identifier}/edit`); - // return; - // }; + // message.success(paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功'); notification.success({ message: '提示', @@ -302,6 +298,11 @@ export const validateOjForm = (props, type, cb) => { type: types.SAVE_OJ_FORM_ID, payload: identifier }); + // 保存成功后,调用编辑接口并改变路 + if (paramsObj['submitType'] === 'add' && identifier) { + dispatch(getOJFormById(identifier)); + props.history.push(`/problems/${identifier}/edit`); + }; } // 保存或更新后,调用start接口 // linkToDev(dispatch, props); From 0a0bd8c8ce8429af2d7489af17c5cd4e4c69570c Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 20:24:05 +0800 Subject: [PATCH 20/58] change link to url --- .../developer/studentStudy/leftpane/taskDescription/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/developer/studentStudy/leftpane/taskDescription/index.js b/public/react/src/modules/developer/studentStudy/leftpane/taskDescription/index.js index ebc42b9a4..348f68d27 100644 --- a/public/react/src/modules/developer/studentStudy/leftpane/taskDescription/index.js +++ b/public/react/src/modules/developer/studentStudy/leftpane/taskDescription/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 09:49:30 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 18:42:59 + * @LastEditTime : 2019-12-27 20:22:55 */ import '../index.scss'; import React from 'react'; @@ -37,7 +37,7 @@ const TaskDescription = (props) => {

      出题者: - {username} + {username}

      From f1b19b20928584c60aa1c0764f5cda4e98b8734e Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 27 Dec 2019 20:26:11 +0800 Subject: [PATCH 21/58] add log --- app/controllers/concerns/laboratory_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/concerns/laboratory_helper.rb b/app/controllers/concerns/laboratory_helper.rb index e03273d68..cd22dfe5d 100644 --- a/app/controllers/concerns/laboratory_helper.rb +++ b/app/controllers/concerns/laboratory_helper.rb @@ -11,6 +11,7 @@ module LaboratoryHelper def current_laboratory @_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)) + Rails.logger.info("current_laboratory is ######{@_current_laboratory}, domain is #{request.subdomains}") end def default_laboratory From 14d05d10a6245025920a0769452e6e5d83856ee7 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 27 Dec 2019 20:29:08 +0800 Subject: [PATCH 22/58] log --- app/controllers/concerns/laboratory_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/laboratory_helper.rb b/app/controllers/concerns/laboratory_helper.rb index cd22dfe5d..cc48581ac 100644 --- a/app/controllers/concerns/laboratory_helper.rb +++ b/app/controllers/concerns/laboratory_helper.rb @@ -11,7 +11,7 @@ module LaboratoryHelper def current_laboratory @_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)) - Rails.logger.info("current_laboratory is ######{@_current_laboratory}, domain is #{request.subdomains}") + Rails.logger.info("current_laboratory is ######{@_current_laboratory.try(:identifier)}, domain is #{request.subdomain}") end def default_laboratory From 896840cac384c82168f4e33fbd3a1e878a552dfb Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 27 Dec 2019 20:32:20 +0800 Subject: [PATCH 23/58] log --- app/controllers/concerns/laboratory_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/laboratory_helper.rb b/app/controllers/concerns/laboratory_helper.rb index cc48581ac..8044ce67c 100644 --- a/app/controllers/concerns/laboratory_helper.rb +++ b/app/controllers/concerns/laboratory_helper.rb @@ -11,7 +11,7 @@ module LaboratoryHelper def current_laboratory @_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)) - Rails.logger.info("current_laboratory is ######{@_current_laboratory.try(:identifier)}, domain is #{request.subdomain}") + # Rails.logger.info("current_laboratory is ######{@_current_laboratory.try(:identifier)}, domain is #{request.subdomain}") end def default_laboratory From d093bee6c50c3c1f6781cf88c8ee127cef278413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 20:35:12 +0800 Subject: [PATCH 24/58] =?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/tpm/jupyter/index.js | 5 +- .../Challenges/Challengesjupyter.js | 69 +++++++++++++++++-- 2 files changed, 67 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index 02a6c2259..c8b95095b 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -329,13 +329,14 @@ function JupyterTPI (props) { title: '倒计时截止', content: (

      - Jupyter将中断服务,是否需要延长使用时间? + 服务已中断,是否确认重置实验环境?

      ), okText: '确定', cancelText: '取消', onOk () { - active_with_tpi(myIdentifier, '重置成功'); + reset_with_tpi(myIdentifier, '重置成功'); + // active_with_tpi(myIdentifier, '重置成功'); } }) } diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index f7cc90654..011446cf4 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -1,11 +1,12 @@ import React, { Component } from 'react'; import { Link } from "react-router-dom"; import { markdownToHTML, configShareForCustom,getImageUrl,getUploadActionUrlthree,appendFileSizeToUploadFileAll} from 'educoder' -import { Divider, Tooltip,Upload,Modal,Spin} from 'antd'; +import { Divider, Tooltip,Upload,Modal,Countdown} from 'antd'; import LoadingSpin from '../../../../common/LoadingSpin'; import 'antd/lib/pagination/style/index.css'; import '../shixunchildCss/Challenges.css'; import axios from 'axios'; +import {addjypertime} from "../../../../redux/actions/jupyter"; const $ = window.$; class Challengesjupyter extends Component { @@ -28,7 +29,8 @@ class Challengesjupyter extends Component { enlarge:false, fileList:[], shuaxin:false, - showtime:false + showtime:false, + jupytertime:Date.now() +3600 * 1000 } } @@ -104,13 +106,44 @@ class Challengesjupyter extends Component { } componentDidMount() { - var that=this; + let that=this; setTimeout(this.ChallengesList(), 1000); let id = this.props.match.params.shixunId; - let ChallengesURL = `/jupyters/get_info_with_tpm.json`; let datas={ identifier:id, } + let timeinfo_with_tpm=`/jupyters/timeinfo_with_tpm.json` + axios.get(timeinfo_with_tpm, {params: datas}).then((response) => { + if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { + + }else{ + if(response.data.status===0){ + if(res.data.useSeconds===null){ + Modal.warning({ + title: '提示', + content: '因为这个实训pod不在了,请联系系统管理人员', + }); + }else{ + let useSeconds=res.data.useSeconds; + let summain=3600 * 1000; + let sums= useSeconds * 1000; + let sum=summain-sums; + setTimeout(()=>{ + this.setState({ + jupytertime:Date.now() +sum + }) + },500); + } + }else{ + + } + } + }).catch((error) => { + + }); + + let ChallengesURL = `/jupyters/get_info_with_tpm.json`; + axios.get(ChallengesURL, {params: datas}).then((response) => { if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { setTimeout(() => { @@ -383,6 +416,23 @@ class Challengesjupyter extends Component { }, }) } + + onFinish=()=>{ + let id=this.props.match.params.shixunId; + Modal.confirm({ + title: '倒计时截止', + content: ( +

      + 服务已中断,是否确认重置实验环境? +

      + ), + okText: '确定', + cancelText: '取消', + onOk () { + this.handleClickResetTpisync_code(id) + } + }) + } render() { let{ChallengesDataList,booljupyterurls,enlarge,fileList}=this.state; let id = this.props.match.params.shixunId; @@ -433,7 +483,7 @@ class Challengesjupyter extends Component {
      + + + +

      简介 From 8efd488d15a96ba20440bb1770e36c60c8f759cb Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 27 Dec 2019 20:36:13 +0800 Subject: [PATCH 25/58] log --- app/controllers/concerns/laboratory_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/laboratory_helper.rb b/app/controllers/concerns/laboratory_helper.rb index 8044ce67c..d1523abc8 100644 --- a/app/controllers/concerns/laboratory_helper.rb +++ b/app/controllers/concerns/laboratory_helper.rb @@ -11,7 +11,7 @@ module LaboratoryHelper def current_laboratory @_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)) - # Rails.logger.info("current_laboratory is ######{@_current_laboratory.try(:identifier)}, domain is #{request.subdomain}") + Rails.logger.info("current_laboratory domain is #{request.subdomain}") end def default_laboratory From 5af0ea8a2d5a86d0afa8b5b2e761b41e85d1d87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 20:37:39 +0800 Subject: [PATCH 26/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/tpm/shixunchild/Challenges/Challengesjupyter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 011446cf4..810aee050 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -1,14 +1,14 @@ import React, { Component } from 'react'; import { Link } from "react-router-dom"; import { markdownToHTML, configShareForCustom,getImageUrl,getUploadActionUrlthree,appendFileSizeToUploadFileAll} from 'educoder' -import { Divider, Tooltip,Upload,Modal,Countdown} from 'antd'; +import { Divider, Tooltip,Upload,Modal,Statistic} from 'antd'; import LoadingSpin from '../../../../common/LoadingSpin'; import 'antd/lib/pagination/style/index.css'; import '../shixunchildCss/Challenges.css'; import axios from 'axios'; import {addjypertime} from "../../../../redux/actions/jupyter"; const $ = window.$; - +const { Countdown } = Statistic; class Challengesjupyter extends Component { constructor(props) { super(props) From 4be9b82e262809337d3c869559adfa2b38be5246 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 27 Dec 2019 20:38:35 +0800 Subject: [PATCH 27/58] log --- app/controllers/concerns/laboratory_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/laboratory_helper.rb b/app/controllers/concerns/laboratory_helper.rb index d1523abc8..8abb4c7d4 100644 --- a/app/controllers/concerns/laboratory_helper.rb +++ b/app/controllers/concerns/laboratory_helper.rb @@ -11,7 +11,7 @@ module LaboratoryHelper def current_laboratory @_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)) - Rails.logger.info("current_laboratory domain is #{request.subdomain}") + Rails.logger.info("current_laboratory is ######{@_current_laboratory.try(:identifier)}") end def default_laboratory From 5ca3e943cda2538f38c90316575a6d9e72224ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 20:39:24 +0800 Subject: [PATCH 28/58] =?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 810aee050..f5bacfb22 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -383,7 +383,7 @@ class Challengesjupyter extends Component { booljupyterurls:true, }) },500); - this.props.showNotification('重置实训成功!'); + this.props.showNotification('重置环境成功!'); setTimeout(()=>{ this.setState({ From 01a776e6e786b7230b71b984f23c34369ea40646 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 27 Dec 2019 20:39:27 +0800 Subject: [PATCH 29/58] log --- app/controllers/concerns/laboratory_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/laboratory_helper.rb b/app/controllers/concerns/laboratory_helper.rb index 8abb4c7d4..d7fbc56b6 100644 --- a/app/controllers/concerns/laboratory_helper.rb +++ b/app/controllers/concerns/laboratory_helper.rb @@ -11,7 +11,7 @@ module LaboratoryHelper def current_laboratory @_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)) - Rails.logger.info("current_laboratory is ######{@_current_laboratory.try(:identifier)}") + # Rails.logger.info("current_laboratory is ######{@_current_laboratory.try(:identifier)}") end def default_laboratory From 42404e8b139e0694cf498210dba991aa87e2afcb Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 27 Dec 2019 20:41:12 +0800 Subject: [PATCH 30/58] add log for login --- app/controllers/application_controller.rb | 1 + app/controllers/concerns/laboratory_helper.rb | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fbb54e395..c0905e89c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -259,6 +259,7 @@ class ApplicationController < ActionController::Base # reacct静态资源加载不需要走这一步 return if params[:controller] == "main" # Find the current user + Rails.logger.info("current_laboratory is #{current_laboratory} domain is #{request.subdomain}") User.current = find_current_user uid_logger("user_setup: " + (User.current.logged? ? "#{User.current.try(:login)} (id=#{User.current.try(:id)})" : "anonymous")) diff --git a/app/controllers/concerns/laboratory_helper.rb b/app/controllers/concerns/laboratory_helper.rb index d7fbc56b6..e03273d68 100644 --- a/app/controllers/concerns/laboratory_helper.rb +++ b/app/controllers/concerns/laboratory_helper.rb @@ -11,7 +11,6 @@ module LaboratoryHelper def current_laboratory @_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)) - # Rails.logger.info("current_laboratory is ######{@_current_laboratory.try(:identifier)}") end def default_laboratory From 2bf03b74ec10dad1ff3a250a092800360e1f980c Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 20:50:42 +0800 Subject: [PATCH 31/58] show main.ph --- .../src/modules/developer/components/myMonacoEditor/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/developer/components/myMonacoEditor/index.js b/public/react/src/modules/developer/components/myMonacoEditor/index.js index 0e2d9d01b..b37770328 100644 --- a/public/react/src/modules/developer/components/myMonacoEditor/index.js +++ b/public/react/src/modules/developer/components/myMonacoEditor/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 15:02:52 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 18:01:48 + * @LastEditTime : 2019-12-27 20:49:46 */ import './index.scss'; import React, { useState, useRef, useEffect } from 'react'; @@ -23,7 +23,7 @@ const maps = { 'c': 'main.c', 'c++': 'main.cc', 'java': 'main.java', - 'pythone': 'main.py' + 'python': 'main.py' }; function MyMonacoEditor (props, ref) { From 4f1dc89a7ffa3cfd9e81e4bd97ef2d69ab7969e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 20:51:33 +0800 Subject: [PATCH 32/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/tpm/shixunchild/Challenges/Challengesjupyter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index f5bacfb22..b944d3aba 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -118,13 +118,13 @@ class Challengesjupyter extends Component { }else{ if(response.data.status===0){ - if(res.data.useSeconds===null){ + if(response.data.useSeconds===null){ Modal.warning({ title: '提示', content: '因为这个实训pod不在了,请联系系统管理人员', }); }else{ - let useSeconds=res.data.useSeconds; + let useSeconds=response.data.useSeconds; let summain=3600 * 1000; let sums= useSeconds * 1000; let sum=summain-sums; From 107fb8f1a6e9b8a0e762188333a56362cdda3145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 20:52:44 +0800 Subject: [PATCH 33/58] =?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 | 1 - 1 file changed, 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 b944d3aba..868fb95c3 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -402,7 +402,6 @@ class Challengesjupyter extends Component { title: '重置环境', content: (

      - 你在本文件中修改的内容将丢失,
      是否确定重置环境?

      ), From 0dc8d125e4592dc450ed7a76cd4f513da537d3c0 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, 27 Dec 2019 21:00:16 +0800 Subject: [PATCH 34/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tpm/shixunchild/Challenges/Challengesjupyter.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index f5bacfb22..ac3076b7c 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -118,13 +118,13 @@ class Challengesjupyter extends Component { }else{ if(response.data.status===0){ - if(res.data.useSeconds===null){ + if(response.data.useSeconds===null){ Modal.warning({ title: '提示', content: '因为这个实训pod不在了,请联系系统管理人员', }); }else{ - let useSeconds=res.data.useSeconds; + let useSeconds=response.data.useSeconds; let summain=3600 * 1000; let sums= useSeconds * 1000; let sum=summain-sums; @@ -750,7 +750,13 @@ class Challengesjupyter extends Component {
      - :
      + : +
      +
      + +

      加载实训失败,

      this.updatamakedowns()}>重新加载

      + +
      ) : From f0907f31291efe1175175987bd61ddf967e0fe8f 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, 27 Dec 2019 21:01:48 +0800 Subject: [PATCH 35/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunchild/Challenges/Challengesjupyter.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 64de3a02b..e02b709d0 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -568,20 +568,7 @@ class Challengesjupyter extends Component { }

      }

      - { - booljupyterurls===true? - ( - this.state.jupyter_url === null? -
      - -

      加载实训失败,

      this.updatamakedowns()}>重新加载

      - -
      - - :"" - ) - :"" - } +
      {this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> From af1c0a01e671a46d6b990f61683f8dd3d45d257a 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, 27 Dec 2019 21:02:01 +0800 Subject: [PATCH 36/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunchild/Challenges/Challengesjupyter.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index e02b709d0..fb29d26c6 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -568,7 +568,7 @@ class Challengesjupyter extends Component { }

      }

      - +
      {this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> @@ -768,4 +768,17 @@ class Challengesjupyter extends Component { } export default Challengesjupyter; - +{/*{*/} +{/* booljupyterurls===true?*/} +{/* (*/} +{/* this.state.jupyter_url === null?*/} +{/*
      */} +{/* */} +{/*

      加载实训失败,

      this.updatamakedowns()}>重新加载

      */} + +{/*
      */} + +{/* :""*/} +{/* )*/} +{/* :""*/} +{/*}*/} From 9c01bfec32bcda512eb077cf81e467aa9896540a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 21:03:31 +0800 Subject: [PATCH 37/58] =?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 | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 868fb95c3..e41ffca36 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -497,6 +497,7 @@ class Challengesjupyter extends Component { width:1px; height:1px; overflow: hidden; + display: block; } ` } From cb075d0f1744d884d1cc7afd6ec99c31afef0ee4 Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 21:07:36 +0800 Subject: [PATCH 38/58] restore code --- public/react/src/modules/message/js/MessagSub.js | 2 +- public/react/src/redux/reducers/ojForUserReducer.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 29f31f77c..3d42b7c98 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -511,7 +511,7 @@ class MessagSub extends Component { return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}`); } case 'Hack': - if (item.extra) { + if (item.extra && item.parent_container_type !== 'HackDelete') { return window.open(`/problems/${item.extra}/edit`); } default : diff --git a/public/react/src/redux/reducers/ojForUserReducer.js b/public/react/src/redux/reducers/ojForUserReducer.js index e95adf0ec..3e64ce7ac 100644 --- a/public/react/src/redux/reducers/ojForUserReducer.js +++ b/public/react/src/redux/reducers/ojForUserReducer.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 13:41:48 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 19:56:06 + * @LastEditTime : 2019-12-27 20:59:00 */ import types from "../actions/actionTypes"; import { Base64 } from 'js-base64'; @@ -138,7 +138,8 @@ const ojForUserReducer = (state = initialState, action) => { console.log(curHack); return { ...state, - hack: Object.assign({}, state.hack, curHack) + hack: Object.assign({}, state.hack, curHack), + editor_code: curHack['code'] } case types.SAVE_HACK_IDENTIFIER: return { From 95871b7b46edb4e5d888699ebd05c6a3795fc46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 21:34:49 +0800 Subject: [PATCH 39/58] =?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/tpm/jupyter/index.js | 2 ++ .../src/modules/tpm/jupyter/rightPane/index.js | 2 +- .../Challenges/Challengesjupyter.js | 6 ++---- public/react/src/redux/actions/jupyter.js | 18 ++++++++++++++---- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index c8b95095b..0b731c02c 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -188,6 +188,7 @@ function JupyterTPI (props) { // 重置实训 const handleClickResetTpi = () => { stopposttpip(1) + updataspinning(true) Modal.confirm({ title: '重置实训', content: ( @@ -206,6 +207,7 @@ function JupyterTPI (props) { }, onCancel() { stopposttpip(2) + updataspinning(false) }, }) } diff --git a/public/react/src/modules/tpm/jupyter/rightPane/index.js b/public/react/src/modules/tpm/jupyter/rightPane/index.js index da3a548d2..5cfa96260 100644 --- a/public/react/src/modules/tpm/jupyter/rightPane/index.js +++ b/public/react/src/modules/tpm/jupyter/rightPane/index.js @@ -26,7 +26,7 @@ function RightPane (props) { const loadInit = (
      - + {/**/}
      ); diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 5bfc133f2..7109ee460 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -119,10 +119,7 @@ class Challengesjupyter extends Component { }else{ if(response.data.status===0){ if(response.data.useSeconds===null){ - Modal.warning({ - title: '提示', - content: '因为这个实训pod不在了,请联系系统管理人员', - }); + this.handleClickResetTpi() }else{ let useSeconds=response.data.useSeconds; let summain=3600 * 1000; @@ -503,6 +500,7 @@ class Challengesjupyter extends Component { } + {/*this.state.jupytertime*/} diff --git a/public/react/src/redux/actions/jupyter.js b/public/react/src/redux/actions/jupyter.js index b2d66d6e6..08fba154e 100644 --- a/public/react/src/redux/actions/jupyter.js +++ b/public/react/src/redux/actions/jupyter.js @@ -248,10 +248,20 @@ export const timeinfo_with_tpi = (identifier, dispatch) => { if (res.status === 200) { if(res.data.status===0){ if(res.data.useSeconds===null){ - Modal.warning({ - title: '提示', - content: '因为这个实训pod不在了,无法获取倒计时,请联系系统管理人员', - }); + Modal.confirm({ + title: '重置环境', + content: ( +

      + 是否确定重置环境? +

      + ), + okText: '确定', + cancelText: '取消', + onOk () { + reset_with_tpi(identifier, '重置成功'); + }, + onCancel() {} + }) }else{ let useSeconds=res.data.useSeconds; let summain=3600 * 1000; From 1a1784e1a4b64dcb6b56fc986263b8ffa583439b Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 21:36:32 +0800 Subject: [PATCH 40/58] update code --- .../src/modules/developer/recordDetail/index.js | 15 ++++++++++++--- .../react/src/redux/reducers/ojForUserReducer.js | 5 +++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/developer/recordDetail/index.js b/public/react/src/modules/developer/recordDetail/index.js index 99a706f33..fd93b3f2a 100644 --- a/public/react/src/modules/developer/recordDetail/index.js +++ b/public/react/src/modules/developer/recordDetail/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-12-04 08:36:21 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 14:51:42 + * @LastEditTime : 2019-12-27 21:18:39 */ import './index.scss'; import React, { useState, useEffect } from 'react'; @@ -60,6 +60,14 @@ function RecordDetail (props) { props.history.push(`/myproblems/${identifier}`); } } + + const handleEditorCode = (identifier, code) => { + if (identifier) { + console.log(code); + saveEditorCodeForDetail(code); + props.history.push(`/myproblems/${identifier}`); + } + } return (
      @@ -114,9 +122,10 @@ function RecordDetail (props) { style={{ visibility: identifier ? 'visible' : 'hidden'}} className={'header_btn'} type="primary" + onClick={() => handleEditorCode(identifier, detail.code)} > - {/* 编辑代码 */} - 编辑代码 + 编辑代码 + {/* 编辑代码 */}
      diff --git a/public/react/src/redux/reducers/ojForUserReducer.js b/public/react/src/redux/reducers/ojForUserReducer.js index 3e64ce7ac..721c3e2cc 100644 --- a/public/react/src/redux/reducers/ojForUserReducer.js +++ b/public/react/src/redux/reducers/ojForUserReducer.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 13:41:48 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 20:59:00 + * @LastEditTime : 2019-12-27 21:28:28 */ import types from "../actions/actionTypes"; import { Base64 } from 'js-base64'; @@ -58,7 +58,8 @@ const ojForUserReducer = (state = initialState, action) => { ...state, hack: Object.assign({}, hack), test_case: Object.assign({}, test_case), - comment_identifier: hack.identifier + comment_identifier: hack.identifier, + userCode: tempCode } case types.COMMIT_RECORD_DETAIL: let result = action.payload.data; From f1cba4e45f3a794ee92207cbf5582093d3cc53e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 21:42:35 +0800 Subject: [PATCH 41/58] =?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/tpm/jupyter/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index 0b731c02c..dab3a1f5e 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -168,8 +168,7 @@ function JupyterTPI (props) { title: '更新通知', content: (
      {stopposttpip(1)} -

      该实训已更新,您选择更新后之前编写的实训代码将会丢失

      -

      如有需要请先使用【jupyter中-文件-下载】保存代码,再进行更新

      +

      该实训已更新,您选择更新后之前编写的实训代码将会丢失,如有需要请先使用【jupyter中-文件-下载】保存代码,再进行更新

      {/*

      还未完成评测的任务代码,请自行保存

      */}
      ), okText: '立即更新', From f178923c10e0b6ee04f8dde876e6b09a0b69ed1b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 27 Dec 2019 21:53:19 +0800 Subject: [PATCH 42/58] =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/hack_user_lastest_codes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/hack_user_lastest_codes_controller.rb b/app/controllers/hack_user_lastest_codes_controller.rb index 976317107..d2632ce8c 100644 --- a/app/controllers/hack_user_lastest_codes_controller.rb +++ b/app/controllers/hack_user_lastest_codes_controller.rb @@ -152,7 +152,7 @@ class HackUserLastestCodesController < ApplicationController when 'Java' content.scan(/.java.\d+/).map{|s| s.match(/\d+/)[0].to_i}.min when 'C', 'C++' - content.scan(/\d:\d+: error/).map{|s| s.match(/\d+/)[0]}.min + content.scan(/\d:\d+:/).map{|s| s.match(/\d+/)[0]}.min when 'Python' content.scan(/line \d+/).map{|s| s.match(/\d+/)[0].to_i}.min end From 20dca4eb387251c5cab3591dec3c7c05a5454912 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 27 Dec 2019 21:56:33 +0800 Subject: [PATCH 43/58] 1 --- app/controllers/hack_user_lastest_codes_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/hack_user_lastest_codes_controller.rb b/app/controllers/hack_user_lastest_codes_controller.rb index d2632ce8c..fe21663b6 100644 --- a/app/controllers/hack_user_lastest_codes_controller.rb +++ b/app/controllers/hack_user_lastest_codes_controller.rb @@ -148,6 +148,7 @@ class HackUserLastestCodesController < ApplicationController # 正则错误行数 def regular_match_error_line content, language content = Base64.decode64(content).force_encoding("utf-8") + logger.info("######content: #{content}") case language when 'Java' content.scan(/.java.\d+/).map{|s| s.match(/\d+/)[0].to_i}.min From 0a9533886fa7031ae2afb630cf89b44560eeb3bb Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 21:57:46 +0800 Subject: [PATCH 44/58] update stylle --- public/react/src/common/components/comment/index.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/react/src/common/components/comment/index.scss b/public/react/src/common/components/comment/index.scss index 87ea08557..84aa8ec03 100644 --- a/public/react/src/common/components/comment/index.scss +++ b/public/react/src/common/components/comment/index.scss @@ -41,12 +41,14 @@ $ml: 20px; } .item-desc{ flex: 1; - margin-left: $ml; + // margin-left: $ml; + margin-left: 5px; } .item-header{ font-size: $fz14; line-height: $lh14; color: #333; + margin-left: 15px; .item-time{ font-size: $fz12; line-height: $lh14; From f2fd5c9925d0fb8feacfce823adaa768f28a541e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 21:58:12 +0800 Subject: [PATCH 45/58] =?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/redux/actions/jupyter.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/react/src/redux/actions/jupyter.js b/public/react/src/redux/actions/jupyter.js index 08fba154e..bb56ac6c8 100644 --- a/public/react/src/redux/actions/jupyter.js +++ b/public/react/src/redux/actions/jupyter.js @@ -250,11 +250,7 @@ export const timeinfo_with_tpi = (identifier, dispatch) => { if(res.data.useSeconds===null){ Modal.confirm({ title: '重置环境', - content: ( -

      - 是否确定重置环境? -

      - ), + content:" 是否确定重置环境?" , okText: '确定', cancelText: '取消', onOk () { From b7f0994582369abbb4eccab7c59cd9044ca0ef85 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 27 Dec 2019 21:59:11 +0800 Subject: [PATCH 46/58] 1 --- app/controllers/hack_user_lastest_codes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/hack_user_lastest_codes_controller.rb b/app/controllers/hack_user_lastest_codes_controller.rb index fe21663b6..0b40bff3b 100644 --- a/app/controllers/hack_user_lastest_codes_controller.rb +++ b/app/controllers/hack_user_lastest_codes_controller.rb @@ -85,7 +85,7 @@ class HackUserLastestCodesController < ApplicationController testCase = ojEvaResult['testCase'] # 只有编译出错时,才正则匹配错误行数 error_line= - if params[:status] == "-4" + if params[:status] == "4" regular_match_error_line ojEvaResult['outPut'], @my_hack.hack.language end # debug 与submit 公用的参数 From 6be94153d2dc9974bfbf92cfeb8d2043f34b716b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 27 Dec 2019 22:04:28 +0800 Subject: [PATCH 47/58] 1 --- app/controllers/hack_user_lastest_codes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/hack_user_lastest_codes_controller.rb b/app/controllers/hack_user_lastest_codes_controller.rb index 0b40bff3b..641dcae2d 100644 --- a/app/controllers/hack_user_lastest_codes_controller.rb +++ b/app/controllers/hack_user_lastest_codes_controller.rb @@ -85,7 +85,7 @@ class HackUserLastestCodesController < ApplicationController testCase = ojEvaResult['testCase'] # 只有编译出错时,才正则匹配错误行数 error_line= - if params[:status] == "4" + if ojEvaResult['status'] == "4" || ojEvaResult['status'] == "5" regular_match_error_line ojEvaResult['outPut'], @my_hack.hack.language end # debug 与submit 公用的参数 From 09aecef7b377062fba4e63deb9c21a6936adeb2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 22:19:38 +0800 Subject: [PATCH 48/58] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Challenges/Challengesjupyter.js | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 7109ee460..fd93995e3 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -105,21 +105,16 @@ class Challengesjupyter extends Component { } } - componentDidMount() { - let that=this; - setTimeout(this.ChallengesList(), 1000); - let id = this.props.match.params.shixunId; - let datas={ - identifier:id, - } - let timeinfo_with_tpm=`/jupyters/timeinfo_with_tpm.json` - axios.get(timeinfo_with_tpm, {params: datas}).then((response) => { - if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { + + gettimeinfo_with_tpm=()=>{ + let timeinfo_with_tpm=`/jupyters/timeinfo_with_tpm.json` + axios.get(timeinfo_with_tpm, {params: datas}).then((response) => { + if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { }else{ if(response.data.status===0){ if(response.data.useSeconds===null){ - this.handleClickResetTpi() + this.handleClickResetTpi() }else{ let useSeconds=response.data.useSeconds; let summain=3600 * 1000; @@ -129,15 +124,24 @@ class Challengesjupyter extends Component { this.setState({ jupytertime:Date.now() +sum }) - },500); + },500); } }else{ } } - }).catch((error) => { + }).catch((error) => { + + }); + } + componentDidMount() { + let that=this; + setTimeout(this.ChallengesList(), 1000); + let id = this.props.match.params.shixunId; + let datas={ + identifier:id, + } - }); let ChallengesURL = `/jupyters/get_info_with_tpm.json`; @@ -150,6 +154,7 @@ class Challengesjupyter extends Component { }, 600) }else{ if(response.data.status===0){ + this.gettimeinfo_with_tpm(datas) setTimeout(() => { this.setState({ jupyter_url:response.data.url, From e08ff212e308e9e1415776ba0388dc160553797f Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 22:21:47 +0800 Subject: [PATCH 49/58] update test case --- public/react/src/redux/actions/ojForm.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/react/src/redux/actions/ojForm.js b/public/react/src/redux/actions/ojForm.js index d15bdce39..118295802 100644 --- a/public/react/src/redux/actions/ojForm.js +++ b/public/react/src/redux/actions/ojForm.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-20 16:35:46 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 20:13:01 + * @LastEditTime : 2019-12-27 22:19:15 */ import types from './actionTypes'; import CONST from '../../constants'; @@ -298,9 +298,14 @@ export const validateOjForm = (props, type, cb) => { type: types.SAVE_OJ_FORM_ID, payload: identifier }); + + console.log(identifier , props.identifier); + if (identifier || props.identifier) { + dispatch(getOJFormById(identifier || props.identifier)); + } // 保存成功后,调用编辑接口并改变路 if (paramsObj['submitType'] === 'add' && identifier) { - dispatch(getOJFormById(identifier)); + props.history.push(`/problems/${identifier}/edit`); }; } From 0d93af09631df79305ab038bb4d2adb01b1c408a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 22:25:32 +0800 Subject: [PATCH 50/58] =?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 fd93995e3..3fa98e88c 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -106,7 +106,7 @@ class Challengesjupyter extends Component { } - gettimeinfo_with_tpm=()=>{ + gettimeinfo_with_tpm=(datas)=>{ let timeinfo_with_tpm=`/jupyters/timeinfo_with_tpm.json` axios.get(timeinfo_with_tpm, {params: datas}).then((response) => { if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { From 54a42547bb463c444763080be921c104bb914b16 Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 22:41:45 +0800 Subject: [PATCH 51/58] upagte test code --- .../src/modules/developer/components/errorResult/index.js | 2 +- .../developer/studentStudy/leftpane/commitRecord/index.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/developer/components/errorResult/index.js b/public/react/src/modules/developer/components/errorResult/index.js index f92ea1773..25e4068b2 100644 --- a/public/react/src/modules/developer/components/errorResult/index.js +++ b/public/react/src/modules/developer/components/errorResult/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-12-03 15:20:55 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-25 11:41:42 + * @LastEditTime : 2019-12-27 22:35:14 */ import './index.scss'; import React from 'react'; diff --git a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js index e7a8eae9c..a25eec4b8 100644 --- a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js +++ b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 09:49:33 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 17:14:04 + * @LastEditTime : 2019-12-27 22:40:32 */ import './index.scss'; import React, { useState, useEffect } from 'react'; @@ -96,7 +96,7 @@ const CommitRecord = (props) => { const { id, // error_line, - // error_msg, + error_msg, // execute_memory, // execute_time, // input, @@ -123,7 +123,7 @@ const CommitRecord = (props) => { 复制错误信息

      -

      +

      显示详情 From 3baa80385d89904de52d73d73aa9603456b1a491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Dec 2019 23:06:27 +0800 Subject: [PATCH 52/58] =?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 | 8 ++++++++ public/stylesheets/educoder/edu-all.css | 8 ++++++++ public/stylesheets/educoder/edu-main.css | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 7bda233fe..76d5a3d52 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -3484,3 +3484,11 @@ a.singlepublishtwo{ text-align: justify; word-break: break-all; } + +.RightPaneDrawer .ant-drawer-content{ + background: #070f1a; +} + +.deletebuttom{ + border: transparent; +} \ No newline at end of file diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 4b663de87..99aa8f2b9 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -3804,3 +3804,11 @@ a.singlepublishtwo{ text-align: justify; word-break: break-all; } + +.RightPaneDrawer .ant-drawer-content{ + background: #070f1a; +} + +.deletebuttom{ + border: transparent; +} \ No newline at end of file diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index 9de4bfb1d..8fad41ea3 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -824,4 +824,12 @@ html>body #ajax-indicator { position: fixed; } .markdown-body { text-align: justify; word-break: break-all; +} + +.RightPaneDrawer .ant-drawer-content{ + background: #070f1a; +} + +.deletebuttom{ + border: transparent; } \ No newline at end of file From 187b1325ebe5c76713097c04317caa5a6dd66f1e 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, 27 Dec 2019 23:10:12 +0800 Subject: [PATCH 53/58] =?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/courses/coursesDetail/CoursesBanner.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 8a71e36e6..8a11b217c 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -721,15 +721,15 @@ class CoursesBanner extends Component { .ant-breadcrumb-separator{ color: rgba(255,255,255,0.3) !important; } - .ant-tooltip-inner{ + .pointer .ant-tooltip-inner{ background:rgba(204,204,204,0.2) !important; } - .ant-tooltip-arrow::before{ + .pointer .ant-tooltip-arrow::before{ background:rgba(204,204,204,0.2) !important; } - .antsoancss{ + .pointer .antsoancss{ color: #fff; } `} @@ -737,7 +737,7 @@ background:rgba(204,204,204,0.2) !important; - 0?true:false} + trigger.parentNode} visible={coursedata.teacher_applies_count===undefined?false:coursedata.teacher_applies_count>0?true:false} placement="topLeft" title={

       																			 {coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?
      
      From 66618bd1727d59f3fdceb67527b1e8f4502b20bc Mon Sep 17 00:00:00 2001
      From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
      Date: Fri, 27 Dec 2019 23:13:53 +0800
      Subject: [PATCH 54/58] =?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/stylesheets/educoder/edu-all.css  | 8 ++++++++
       public/stylesheets/educoder/edu-main.css | 8 ++++++++
       2 files changed, 16 insertions(+)
      
      diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
      index 4b663de87..99aa8f2b9 100644
      --- a/public/stylesheets/educoder/edu-all.css
      +++ b/public/stylesheets/educoder/edu-all.css
      @@ -3804,3 +3804,11 @@ a.singlepublishtwo{
           text-align: justify;
           word-break: break-all;
       }
      +
      +.RightPaneDrawer .ant-drawer-content{
      +    background: #070f1a;
      +}
      +
      +.deletebuttom{
      +    border: transparent;
      +}
      \ No newline at end of file
      diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css
      index 9de4bfb1d..8fad41ea3 100644
      --- a/public/stylesheets/educoder/edu-main.css
      +++ b/public/stylesheets/educoder/edu-main.css
      @@ -824,4 +824,12 @@ html>body #ajax-indicator { position: fixed; }
       .markdown-body {
           text-align: justify;
           word-break: break-all;
      +}
      +
      +.RightPaneDrawer .ant-drawer-content{
      +    background: #070f1a;
      +}
      +
      +.deletebuttom{
      +    border: transparent;
       }
      \ No newline at end of file
      
      From b508f7dc59499e84e33bcc6a1844b022246c1bc3 Mon Sep 17 00:00:00 2001
      From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
      Date: Fri, 27 Dec 2019 23:16:01 +0800
      Subject: [PATCH 55/58] =?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/stylesheets/educoder/edu-all.css  | 1 +
       public/stylesheets/educoder/edu-main.css | 1 +
       2 files changed, 2 insertions(+)
      
      diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
      index 99aa8f2b9..6e51119bb 100644
      --- a/public/stylesheets/educoder/edu-all.css
      +++ b/public/stylesheets/educoder/edu-all.css
      @@ -3807,6 +3807,7 @@ a.singlepublishtwo{
       
       .RightPaneDrawer .ant-drawer-content{
           background: #070f1a;
      +    overflow: hidden !important;
       }
       
       .deletebuttom{
      diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css
      index 8fad41ea3..6b422675f 100644
      --- a/public/stylesheets/educoder/edu-main.css
      +++ b/public/stylesheets/educoder/edu-main.css
      @@ -828,6 +828,7 @@ html>body #ajax-indicator { position: fixed; }
       
       .RightPaneDrawer .ant-drawer-content{
           background: #070f1a;
      +    overflow: hidden !important;
       }
       
       .deletebuttom{
      
      From 8fa425f0d39c9d2ed850d838a469088aa8dcd0fa Mon Sep 17 00:00:00 2001
      From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
      Date: Fri, 27 Dec 2019 23:17:57 +0800
      Subject: [PATCH 56/58] =?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      | 1 +
       public/stylesheets/educoder/edu-all.css  | 1 +
       public/stylesheets/educoder/edu-main.css | 1 +
       3 files changed, 3 insertions(+)
      
      diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css
      index 76d5a3d52..fa3d4ee37 100644
      --- a/public/react/public/css/edu-all.css
      +++ b/public/react/public/css/edu-all.css
      @@ -3487,6 +3487,7 @@ a.singlepublishtwo{
       
       .RightPaneDrawer .ant-drawer-content{
           background: #070f1a;
      +    overflow: hidden !important;
       }
       
       .deletebuttom{
      diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
      index 99aa8f2b9..6e51119bb 100644
      --- a/public/stylesheets/educoder/edu-all.css
      +++ b/public/stylesheets/educoder/edu-all.css
      @@ -3807,6 +3807,7 @@ a.singlepublishtwo{
       
       .RightPaneDrawer .ant-drawer-content{
           background: #070f1a;
      +    overflow: hidden !important;
       }
       
       .deletebuttom{
      diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css
      index 8fad41ea3..6b422675f 100644
      --- a/public/stylesheets/educoder/edu-main.css
      +++ b/public/stylesheets/educoder/edu-main.css
      @@ -828,6 +828,7 @@ html>body #ajax-indicator { position: fixed; }
       
       .RightPaneDrawer .ant-drawer-content{
           background: #070f1a;
      +    overflow: hidden !important;
       }
       
       .deletebuttom{
      
      From 053abbf342490f1376750b40f90873543b284f0c 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, 27 Dec 2019 23:20:09 +0800
      Subject: [PATCH 57/58] =?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/courses/coursesDetail/CoursesBanner.js    | 8 ++++----
       1 file changed, 4 insertions(+), 4 deletions(-)
      
      diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
      index 8a71e36e6..8a11b217c 100644
      --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
      +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
      @@ -721,15 +721,15 @@ class CoursesBanner extends Component {
       														.ant-breadcrumb-separator{
       														      color: rgba(255,255,255,0.3) !important;
       														}
      -														.ant-tooltip-inner{
      +														.pointer .ant-tooltip-inner{
       														
       background:rgba(204,204,204,0.2) !important;
       														}
      -														.ant-tooltip-arrow::before{
      +														.pointer .ant-tooltip-arrow::before{
       													
       background:rgba(204,204,204,0.2) !important;
       														}
      -														.antsoancss{
      +														.pointer .antsoancss{
       														color: #fff;
       														}
       													`}
      @@ -737,7 +737,7 @@ background:rgba(204,204,204,0.2) !important;
       												
       
       													
      -														0?true:false}
      +														 trigger.parentNode}  visible={coursedata.teacher_applies_count===undefined?false:coursedata.teacher_applies_count>0?true:false}
       														placement="topLeft"
       																		 title={
       																			 {coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?
      
      From 76bbcec8e5501cb5f45aec9d09175ef187b047cc Mon Sep 17 00:00:00 2001
      From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
      Date: Fri, 27 Dec 2019 23:20:49 +0800
      Subject: [PATCH 58/58] =?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      | 4 ++++
       public/stylesheets/educoder/edu-all.css  | 4 ++++
       public/stylesheets/educoder/edu-main.css | 4 ++++
       3 files changed, 12 insertions(+)
      
      diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css
      index fa3d4ee37..66adaf482 100644
      --- a/public/react/public/css/edu-all.css
      +++ b/public/react/public/css/edu-all.css
      @@ -3492,4 +3492,8 @@ a.singlepublishtwo{
       
       .deletebuttom{
           border: transparent;
      +}
      +
      +.RightPaneDrawer .jupyter_data_list{
      +    max-height: 340px;
       }
      \ No newline at end of file
      diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
      index 6e51119bb..d4b5633d7 100644
      --- a/public/stylesheets/educoder/edu-all.css
      +++ b/public/stylesheets/educoder/edu-all.css
      @@ -3812,4 +3812,8 @@ a.singlepublishtwo{
       
       .deletebuttom{
           border: transparent;
      +}
      +
      +.RightPaneDrawer .jupyter_data_list{
      +    max-height: 340px;
       }
      \ No newline at end of file
      diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css
      index 6b422675f..cbb6fb1f5 100644
      --- a/public/stylesheets/educoder/edu-main.css
      +++ b/public/stylesheets/educoder/edu-main.css
      @@ -833,4 +833,8 @@ html>body #ajax-indicator { position: fixed; }
       
       .deletebuttom{
           border: transparent;
      +}
      +
      +.RightPaneDrawer .jupyter_data_list{
      +    max-height: 340px;
       }
      \ No newline at end of file