From 32c3078f79f942afad6728b843885b3bd1a655bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 19 Feb 2020 16:10:52 +0800
Subject: [PATCH 001/100] =?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/testpaper/Testpaperlibrary.js | 4 ++--
public/react/src/modules/testpaper/component/Contentpart.js | 2 +-
public/react/src/modules/testpaper/component/Listjihe.js | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js
index 0fb34200e..76b30d2ba 100644
--- a/public/react/src/modules/testpaper/Testpaperlibrary.js
+++ b/public/react/src/modules/testpaper/Testpaperlibrary.js
@@ -304,7 +304,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
- keyword: this.state.keywords,
+ keyword: this.state.keyword,
page: this.state.page,
per_page:10,
};
@@ -330,7 +330,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
- keyword: this.state.keywords,
+ keyword: this.state.keyword,
page: this.state.page,
per_page:10,
};
diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js
index 8a3d57414..b73da225f 100644
--- a/public/react/src/modules/testpaper/component/Contentpart.js
+++ b/public/react/src/modules/testpaper/component/Contentpart.js
@@ -194,7 +194,7 @@ class Contentpart extends Component {
size="large"
onInput={(e)=>this.props.setdatafunsval(e)}
onSearch={ (value)=>this.props.setdatafuns(value)}
- value={this.props.keywords}
+ value={this.props.keyword}
/>
{
diff --git a/public/react/src/modules/testpaper/component/Listjihe.js b/public/react/src/modules/testpaper/component/Listjihe.js
index b2f358b96..1b39bfee3 100644
--- a/public/react/src/modules/testpaper/component/Listjihe.js
+++ b/public/react/src/modules/testpaper/component/Listjihe.js
@@ -82,7 +82,7 @@ class Listjihe extends Component {
试题数:{question_counts}
总分:{total_scores}
From 65c58d25d7b6b316d2c81adddeaa0470839658ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 19 Feb 2020 16:30:09 +0800 Subject: [PATCH 002/100] =?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/question/NewMyShixunModel.js | 11 +++++++- .../react/src/modules/question/Paperreview.js | 2 +- .../modules/testpaper/Paperlibraryeditid.js | 28 +++++++++---------- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/question/NewMyShixunModel.js b/public/react/src/modules/question/NewMyShixunModel.js index d50f41484..301a51614 100644 --- a/public/react/src/modules/question/NewMyShixunModel.js +++ b/public/react/src/modules/question/NewMyShixunModel.js @@ -219,6 +219,12 @@ class NewMyShixunModel extends Component { } this.callback(defaultActiveKeys); } + if(prevProps.Contentdata !== this.props.Contentdata){ + this.setState({ + Contentdata:this.props.Contentdata, + }) + + } } //公共和我的 @@ -884,7 +890,7 @@ class NewMyShixunModel extends Component { page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes,basket_list, completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count, program_questions_count, single_questions_count, subjective_questions_count,selectionbools, - modalsTypeInaudit + modalsTypeInaudit,Contentdata } = this.state; const Datacount = completion_questions_count + judgement_questions_count @@ -893,6 +899,8 @@ class NewMyShixunModel extends Component { + single_questions_count + subjective_questions_count; + // console.log("弹出框"); + // console.log(Contentdata) return (diff --git a/public/react/src/modules/question/component/JudquestionEditor.js b/public/react/src/modules/question/component/JudquestionEditor.js index 09cf1094f..e5134dafb 100644 --- a/public/react/src/modules/question/component/JudquestionEditor.js +++ b/public/react/src/modules/question/component/JudquestionEditor.js @@ -397,6 +397,7 @@ class JudquestionEditor extends Component{ } .signleEditor .quill_editor_for_react_area .ql-toolbar .ql-formats .ql-font { line-height: 20px; + min-width: 150px; } `}
diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index c1255c83a..fd3840727 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -399,6 +399,7 @@ class SingleEditor extends Component{ } .signleEditor .quill_editor_for_react_area .ql-toolbar .ql-formats .ql-font { line-height: 20px; + min-width: 150px; } `}
From 5d3f267cc39d2509eb660718cef40415a7984abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 19 Feb 2020 20:07:26 +0800 Subject: [PATCH 011/100] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/common/quillForEditor/font.css | 65 +++++++++++++++++++ .../react/src/common/quillForEditor/index.js | 1 + .../src/common/quillForEditor/quill.core.css | 18 +++++ .../src/common/quillForEditor/quill.snow.css | 28 ++++++++ .../question/component/ChoquesEditor.js | 1 + .../question/component/JudquestionEditor.js | 1 + .../question/component/SingleEditor.js | 1 + .../src/modules/question/questioncss/font.css | 65 +++++++++++++++++++ .../question/questioncss/quill.core.css | 18 +++++ .../question/questioncss/quill.snow.css | 28 ++++++++ 10 files changed, 226 insertions(+) create mode 100644 public/react/src/common/quillForEditor/font.css create mode 100644 public/react/src/common/quillForEditor/quill.core.css create mode 100644 public/react/src/common/quillForEditor/quill.snow.css create mode 100644 public/react/src/modules/question/questioncss/font.css create mode 100644 public/react/src/modules/question/questioncss/quill.core.css create mode 100644 public/react/src/modules/question/questioncss/quill.snow.css diff --git a/public/react/src/common/quillForEditor/font.css b/public/react/src/common/quillForEditor/font.css new file mode 100644 index 000000000..8537e9f23 --- /dev/null +++ b/public/react/src/common/quillForEditor/font.css @@ -0,0 +1,65 @@ +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { + content: "宋体"; + font-family: "SimSun"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { + content: "黑体"; + font-family: "SimHei"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { + content: "微软雅黑"; + font-family: "Microsoft YaHei"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { + content: "楷体"; + font-family: "KaiTi"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before { + content: "仿宋"; + font-family: "FangSong"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { + content: "Arial"; + font-family: "Arial"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { + content: "Times New Roman"; + font-family: "Times New Roman"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before { + content: "sans-serif"; + font-family: "sans-serif"; +} + +.ql-font-SimSun { + font-family: "SimSun"; +} +.ql-font-SimHei { + font-family: "SimHei"; +} +.ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei"; +} +.ql-font-KaiTi { + font-family: "KaiTi"; +} +.ql-font-FangSong { + font-family: "FangSong"; +} +.ql-font-Arial { + font-family: "Arial"; +} +.ql-font-Times-New-Roman { + font-family: "Times New Roman"; +} +.ql-font-sans-serif { + font-family: "sans-serif"; +} diff --git a/public/react/src/common/quillForEditor/index.js b/public/react/src/common/quillForEditor/index.js index 89a4f6224..6b41885e7 100644 --- a/public/react/src/common/quillForEditor/index.js +++ b/public/react/src/common/quillForEditor/index.js @@ -11,6 +11,7 @@ import 'quill/dist/quill.core.css'; // 核心样式 import 'quill/dist/quill.snow.css'; // 有工具栏 import 'quill/dist/quill.bubble.css'; // 无工具栏 import 'katex/dist/katex.min.css'; // katex 表达式样式 +import './font.css' import React, { useState, useRef, useEffect } from 'react'; import Quill from 'quill'; import katex from 'katex'; diff --git a/public/react/src/common/quillForEditor/quill.core.css b/public/react/src/common/quillForEditor/quill.core.css new file mode 100644 index 000000000..516e388b6 --- /dev/null +++ b/public/react/src/common/quillForEditor/quill.core.css @@ -0,0 +1,18 @@ +.ql-editor .ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei"; +} +.ql-editor .ql-font-SimSun { + font-family: "SimSun"; +} +.ql-editor .ql-font-SimHei { + font-family: "SimHei"; +} +.ql-editor .ql-font-KaiTi { + font-family: "KaiTi"; +} +.ql-editor .ql-font-Arial { + font-family: "Arial"; +} +.ql-editor .Times-New-Roman { + font-family: "Times New Roman"; +} diff --git a/public/react/src/common/quillForEditor/quill.snow.css b/public/react/src/common/quillForEditor/quill.snow.css new file mode 100644 index 000000000..962b40f99 --- /dev/null +++ b/public/react/src/common/quillForEditor/quill.snow.css @@ -0,0 +1,28 @@ +.ql-snow .ql-picker.ql-font .ql-picker-label::before, +.ql-snow .ql-picker.ql-font .ql-picker-item::before { + content: '微软雅黑'; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { + content: "微软雅黑"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { + content: "宋体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { + content: "黑体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { + content: "楷体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { + content: "Arial"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { + content: "Times New Roman"; +} diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index 803adbdff..d274a6573 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -9,6 +9,7 @@ import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor'; import axios from 'axios' import update from 'immutability-helper' import './../questioncss/questioncom.css'; +import '../questioncss/font.css'; import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder'; import QuillForEditor from '../../../common/quillForEditor'; const { TextArea } = Input; diff --git a/public/react/src/modules/question/component/JudquestionEditor.js b/public/react/src/modules/question/component/JudquestionEditor.js index e5134dafb..d2aa7a7f0 100644 --- a/public/react/src/modules/question/component/JudquestionEditor.js +++ b/public/react/src/modules/question/component/JudquestionEditor.js @@ -9,6 +9,7 @@ import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor'; import axios from 'axios' import update from 'immutability-helper' import './../questioncss/questioncom.css'; +import '../questioncss/font.css'; import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder'; import QuillForEditor from '../../../common/quillForEditor'; diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index fd3840727..3a4950f24 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -10,6 +10,7 @@ import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor'; import axios from 'axios' import update from 'immutability-helper' import './../questioncss/questioncom.css'; +import '../questioncss/font.css'; import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder'; const { TextArea } = Input; const confirm = Modal.confirm; diff --git a/public/react/src/modules/question/questioncss/font.css b/public/react/src/modules/question/questioncss/font.css new file mode 100644 index 000000000..8537e9f23 --- /dev/null +++ b/public/react/src/modules/question/questioncss/font.css @@ -0,0 +1,65 @@ +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { + content: "宋体"; + font-family: "SimSun"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { + content: "黑体"; + font-family: "SimHei"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { + content: "微软雅黑"; + font-family: "Microsoft YaHei"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { + content: "楷体"; + font-family: "KaiTi"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before { + content: "仿宋"; + font-family: "FangSong"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { + content: "Arial"; + font-family: "Arial"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { + content: "Times New Roman"; + font-family: "Times New Roman"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before { + content: "sans-serif"; + font-family: "sans-serif"; +} + +.ql-font-SimSun { + font-family: "SimSun"; +} +.ql-font-SimHei { + font-family: "SimHei"; +} +.ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei"; +} +.ql-font-KaiTi { + font-family: "KaiTi"; +} +.ql-font-FangSong { + font-family: "FangSong"; +} +.ql-font-Arial { + font-family: "Arial"; +} +.ql-font-Times-New-Roman { + font-family: "Times New Roman"; +} +.ql-font-sans-serif { + font-family: "sans-serif"; +} diff --git a/public/react/src/modules/question/questioncss/quill.core.css b/public/react/src/modules/question/questioncss/quill.core.css new file mode 100644 index 000000000..516e388b6 --- /dev/null +++ b/public/react/src/modules/question/questioncss/quill.core.css @@ -0,0 +1,18 @@ +.ql-editor .ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei"; +} +.ql-editor .ql-font-SimSun { + font-family: "SimSun"; +} +.ql-editor .ql-font-SimHei { + font-family: "SimHei"; +} +.ql-editor .ql-font-KaiTi { + font-family: "KaiTi"; +} +.ql-editor .ql-font-Arial { + font-family: "Arial"; +} +.ql-editor .Times-New-Roman { + font-family: "Times New Roman"; +} diff --git a/public/react/src/modules/question/questioncss/quill.snow.css b/public/react/src/modules/question/questioncss/quill.snow.css new file mode 100644 index 000000000..962b40f99 --- /dev/null +++ b/public/react/src/modules/question/questioncss/quill.snow.css @@ -0,0 +1,28 @@ +.ql-snow .ql-picker.ql-font .ql-picker-label::before, +.ql-snow .ql-picker.ql-font .ql-picker-item::before { + content: '微软雅黑'; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { + content: "微软雅黑"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { + content: "宋体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { + content: "黑体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { + content: "楷体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { + content: "Arial"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { + content: "Times New Roman"; +} From e64d002f42918c55d39557affe345c51fac76c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 19 Feb 2020 22:01:41 +0800 Subject: [PATCH 012/100] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=AD=97=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/common/quillForEditor/font.css | 33 +++++++++--------- .../react/src/common/quillForEditor/index.js | 10 +++--- .../question/component/ChoquesEditor.js | 9 +++-- .../question/component/JudquestionEditor.js | 10 ++++-- .../question/component/SingleEditor.js | 10 ++++-- .../src/modules/question/questioncss/font.css | 34 ++++++++++--------- 6 files changed, 60 insertions(+), 46 deletions(-) diff --git a/public/react/src/common/quillForEditor/font.css b/public/react/src/common/quillForEditor/font.css index 8537e9f23..08e78a5a2 100644 --- a/public/react/src/common/quillForEditor/font.css +++ b/public/react/src/common/quillForEditor/font.css @@ -1,65 +1,66 @@ +@charset "utf-8"; .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { content: "宋体"; - font-family: "SimSun"; + font-family:SimSun !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { content: "黑体"; - font-family: "SimHei"; + font-family:SimHei !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { content: "微软雅黑"; - font-family: "Microsoft YaHei"; + font-family:Microsoft YaHei !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { content: "楷体"; - font-family: "KaiTi"; + font-family:KaiTi !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before { content: "仿宋"; - font-family: "FangSong"; + font-family:FangSong !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { content: "Arial"; - font-family: "Arial"; + font-family:Arial !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { content: "Times New Roman"; - font-family: "Times New Roman"; + font-family:Times New Roman !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before { content: "sans-serif"; - font-family: "sans-serif"; + font-family:sans-serif !important; } .ql-font-SimSun { - font-family: "SimSun"; + font-family:SimSun !important; } .ql-font-SimHei { - font-family: "SimHei"; + font-family:SimHei !important; } .ql-font-Microsoft-YaHei { - font-family: "Microsoft YaHei"; + font-family:Microsoft YaHei !important; } .ql-font-KaiTi { - font-family: "KaiTi"; + font-family:KaiTi !important; } .ql-font-FangSong { - font-family: "FangSong"; + font-family:FangSong !important; } .ql-font-Arial { - font-family: "Arial"; + font-family:Arial !important; } .ql-font-Times-New-Roman { - font-family: "Times New Roman"; + font-family:Times New Roman !important; } .ql-font-sans-serif { - font-family: "sans-serif"; + font-family:sans-serif !important; } diff --git a/public/react/src/common/quillForEditor/index.js b/public/react/src/common/quillForEditor/index.js index 6b41885e7..ba37059ba 100644 --- a/public/react/src/common/quillForEditor/index.js +++ b/public/react/src/common/quillForEditor/index.js @@ -20,12 +20,12 @@ import { fetchUploadImage } from '../../services/ojService.js'; import { getImageUrl } from 'educoder' import ImageBlot from './ImageBlot'; import FillBlot from './FillBlot'; -const Size = Quill.import('attributors/style/size'); -const Font = Quill.import('formats/font'); +var Size = Quill.import('attributors/style/size'); // const Color = Quill.import('attributes/style/color'); Size.whitelist = ['14px', '16px', '18px', '20px', false]; -Font.whitelist = ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']; - +var fonts = ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong']; +var Font = Quill.import('formats/font'); +Font.whitelist = fonts; //将字体加入到白名单 window.Quill = Quill; window.katex = katex; Quill.register(ImageBlot); @@ -60,7 +60,7 @@ function QuillForEditor ({ {align: []}, {list: 'ordered'}, {list: 'bullet'}, // 列表 {script: 'sub'}, {script: 'super'}, { 'color': [] }, { 'background': [] }, - { 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']}, + { 'font': []}, {header: [1,2,3,4,5,false]}, 'blockquote', 'code-block', 'link', 'image', 'video', diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index d274a6573..be660b386 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -349,9 +349,9 @@ class ChoquesEditor extends Component{ // //////console.log("xuanzheshijuan"); // //////console.log(answerTagArray); // //////console.log(!exerciseIsPublish); - const options=['code-block', 'image', 'formula',{size: ['14px', '16px', '18px', '20px']}, - { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']}, - { 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']} + const options=['code-block', 'image', 'formula', + 'bold', 'italic', 'underline', 'strike',{size: ['14px', '16px', '18px', '20px']}, + { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']} ] return(
{/* {!question_id ? '新建' : '编辑'} */} diff --git a/public/react/src/modules/question/component/JudquestionEditor.js b/public/react/src/modules/question/component/JudquestionEditor.js index d2aa7a7f0..58954dd85 100644 --- a/public/react/src/modules/question/component/JudquestionEditor.js +++ b/public/react/src/modules/question/component/JudquestionEditor.js @@ -369,9 +369,10 @@ class JudquestionEditor extends Component{ // ////////console.log(answerTagArray); // ////////console.log(!exerciseIsPublish); const params= this.props&&this.props.match&&this.props.match.params; - const options=['code-block', 'image', 'formula',{size: ['14px', '16px', '18px', '20px']}, - { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']}, - { 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']} + const options=['code-block', 'image', 'formula', + 'bold', 'italic', 'underline', 'strike', + {size: ['14px', '16px', '18px', '20px']}, + { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']} ] return(
{/* {!question_id ? '新建' : '编辑'} */} diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index 3a4950f24..665785240 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -370,9 +370,10 @@ class SingleEditor extends Component{ // //////console.log("xuanzheshijuan"); // //////console.log(answerTagArray); // //////console.log(!exerciseIsPublish); - const options=['code-block', 'image', 'formula',{size: ['14px', '16px', '18px', '20px']}, - { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']}, - { 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']} + const options=['code-block', 'image', 'formula', + 'bold', 'italic', 'underline', 'strike', + ,{size: ['14px', '16px', '18px', '20px']}, + { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']} ] return(
{/* {!question_id ? '新建' : '编辑'} */}
diff --git a/public/react/src/modules/question/questioncss/font.css b/public/react/src/modules/question/questioncss/font.css
index 8537e9f23..1f2cd8386 100644
--- a/public/react/src/modules/question/questioncss/font.css
+++ b/public/react/src/modules/question/questioncss/font.css
@@ -1,65 +1,67 @@
+@charset "utf-8";
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before {
content: "宋体";
- font-family: "SimSun";
+ font-family:SimSun !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before {
content: "黑体";
- font-family: "SimHei";
+ font-family:SimHei !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before {
content: "微软雅黑";
- font-family: "Microsoft YaHei";
+ font-family:Microsoft YaHei !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before {
content: "楷体";
- font-family: "KaiTi";
+ font-family:KaiTi !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before {
content: "仿宋";
- font-family: "FangSong";
+ font-family:FangSong !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before {
content: "Arial";
- font-family: "Arial";
+ font-family:Arial !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before {
content: "Times New Roman";
- font-family: "Times New Roman";
+ font-family:Times New Roman !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before {
content: "sans-serif";
- font-family: "sans-serif";
+ font-family:sans-serif !important;
}
+
.ql-font-SimSun {
- font-family: "SimSun";
+ font-family:SimSun !important;
}
.ql-font-SimHei {
- font-family: "SimHei";
+ font-family:SimHei !important;
}
.ql-font-Microsoft-YaHei {
- font-family: "Microsoft YaHei";
+ font-family:Microsoft YaHei !important;
}
.ql-font-KaiTi {
- font-family: "KaiTi";
+ font-family:KaiTi !important;
}
.ql-font-FangSong {
- font-family: "FangSong";
+ font-family:FangSong !important;
}
.ql-font-Arial {
- font-family: "Arial";
+ font-family:Arial !important;
}
.ql-font-Times-New-Roman {
- font-family: "Times New Roman";
+ font-family:Times New Roman !important;
}
.ql-font-sans-serif {
- font-family: "sans-serif";
+ font-family:sans-serif !important;
}
From 27109c1c5f8b46dc441bea401540c786dbd4ffb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 19 Feb 2020 22:33:52 +0800
Subject: [PATCH 013/100] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/question/component/Headplugselections.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/question/component/Headplugselections.js b/public/react/src/modules/question/component/Headplugselections.js
index 4da7a57e3..d683ad43e 100644
--- a/public/react/src/modules/question/component/Headplugselections.js
+++ b/public/react/src/modules/question/component/Headplugselections.js
@@ -260,7 +260,7 @@ class Headplugselections extends Component {
disciplinesdata&&disciplinesdata.map((item,key)=>{
return(
item.sub_disciplines.length>0?
- 智能组卷 人工组卷 this.props.showmodels(items.id)}>
-
- 公开
- this.props.showmodelsInaudit(e)}>
-
- 公开审核中
+
+
+ 已公开
this.props.showmodels(items.id)}>
+
+ 公开
+ this.props.showmodelsInaudit(e)}>
+
+ 公开审核中
+
编辑
diff --git a/public/react/src/modules/question/component/SiderBars.js b/public/react/src/modules/question/component/SiderBars.js
index e6cee7761..724ae7f79 100644
--- a/public/react/src/modules/question/component/SiderBars.js
+++ b/public/react/src/modules/question/component/SiderBars.js
@@ -117,7 +117,7 @@ class SiderBars extends Component {
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true? 人工组卷 智能组卷 人工组卷 智能组卷 人工组卷 暂时还没有相关数据哦! Jupyter 非试用内容,需要授权
-
- {item.name}
-
-
-
- {/*
- {item.is_jupyter===false? 暂时还没有相关数据哦! Jupyter 非试用内容,需要授权
+
+ {item.name}
+
+
+
+
+ {item.is_jupyter === false ?
编辑
From 91fc391b4b4048808002902f36726eeda61d48ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 7 Mar 2020 01:05:55 +0800
Subject: [PATCH 095/100] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../developer/newOrEditTask/leftpane/editorTab/AddTestDemo.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/AddTestDemo.js b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/AddTestDemo.js
index e3cb54781..0e2203de0 100644
--- a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/AddTestDemo.js
+++ b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/AddTestDemo.js
@@ -162,6 +162,8 @@ const AddTestDemo = (props) => {
*/}
+ {/*
From c10833a3eb1548a3f14033988d41f208e9117c6c 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, 21 Feb 2020 20:03:12 +0800
Subject: [PATCH 027/100] =?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/AppConfig.js | 4 ++--
.../src/modules/question/component/QuestionModalPicture.js | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 5b5942f22..a5e51a81c 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -42,9 +42,9 @@ if (isDev) {
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// 超管
-// debugType="admin";
+debugType="admin";
// 老师
-debugType="teacher";
+// debugType="teacher";
// 学生
// debugType="student";
diff --git a/public/react/src/modules/question/component/QuestionModalPicture.js b/public/react/src/modules/question/component/QuestionModalPicture.js
index f54576d61..bf49253ea 100644
--- a/public/react/src/modules/question/component/QuestionModalPicture.js
+++ b/public/react/src/modules/question/component/QuestionModalPicture.js
@@ -45,7 +45,9 @@ class QuestionModalPicture extends Component {
+
其他语言正在规划中,敬请期待")
+ tip_exception(-2, "平台目前支持java、python语言的查重
其他语言正在规划中,敬请期待")
end
end
@@ -1295,23 +1241,23 @@ class HomeworkCommonsController < ApplicationController
student_works = @homework.student_works.where("work_status > 0")
# 按分班id搜索
user_ids =
- if params[:group_ids]
- # 筛选了分班
- group_student_ids = @course.course_members.where(course_group_id: params[:group_ids]).pluck(:user_id)
- student_works.where(:user_id => group_student_ids).pluck(:user_id)
+ if params[:group_ids]
+ # 筛选了分班
+ group_student_ids = @course.course_members.where(course_group_id: params[:group_ids]).pluck(:user_id)
+ student_works.where(:user_id => group_student_ids).pluck(:user_id)
+ else
+ # 如果当前用户有分班 显示分班内的学生,没有则显示全部
+ user_ids = @course.user_group_students(current_user.id).pluck(:user_id)
+ if user_ids.present?
+ student_works.where(:user_id => user_ids).pluck(:user_id)
else
- # 如果当前用户有分班 显示分班内的学生,没有则显示全部
- user_ids = @course.user_group_students(current_user.id).pluck(:user_id)
- if user_ids.present?
- student_works.where(:user_id => user_ids).pluck(:user_id)
- else
- student_works.pluck(:user_id)
- end
+ student_works.pluck(:user_id)
end
+ end
# 查询作品数总数
@all_reviews_count = user_ids.count
@users_reviews = @homework.homework_review_results.where("code_rate >= 50.0")
- .where(:user_id => user_ids).joins(user: :user_extension)
+ .where(:user_id => user_ids).joins(user: :user_extension)
# 按学号和姓名搜索
if params[:search]
@users_reviews = @users_reviews.where("concat(lastname, firstname) like :keyword or student_id like :keyword", keyword: "%#{params[:search]}%")
@@ -1325,9 +1271,9 @@ class HomeworkCommonsController < ApplicationController
# 如果未分班被查重过,则显示未分班列
@non_course_group =
- if @homework.homework_group_reviews.where(course_group_id: 0).count > 0
- @course.course_members.where(role: 4, course_group_id: 0).count
- end
+ if @homework.homework_group_reviews.where(course_group_id: 0).count > 0
+ @course.course_members.where(role: 4, course_group_id: 0).count
+ end
# 最新一次的查重时间
@last_review_time = format_time @homework.homework_group_reviews.last.try(:created_at)
@@ -1353,38 +1299,38 @@ class HomeworkCommonsController < ApplicationController
homework_challenge_settings = @homework.homework_challenge_settings
@challenges = @shixun.challenges.where(id: homework_challenge_settings.pluck(:challenge_id), st: 0)
@challenges =
- @challenges.map do |challenge|
- code_rate = 0
- game_codes = results.code_info.select {|info| challenge.path.split(";").include?(info.origin_path)}
- # 先判断用户该关卡是否查重了 取多个待补充文件的平均值
- if game_codes.count > 0
- code_rate += game_codes.map(&:rate).sum / challenge.path.split(";").length
- end
- logger.info("#####game_codes: #{game_codes}")
- #target = game_codes.count > 0 ? game_codes[0].target_user_id : nil
- # 作品完成时间
- game = challenge.games.find_by(user_id: @user.id)
- end_time = game.end_time
- # 用户关卡的得分
- all_score = homework_challenge_settings.find_by(challenge_id: challenge.id).try(:score).to_f
- final_score = @student_work.work_challenge_score game, all_score, challenge.id
- # 抄袭用户
- copy_user = User.find_by_id(game_codes[0].try(:target_user_id))
- copy_end_time = copy_user.games.find_by(challenge_id: challenge.id).try(:end_time) if copy_user.present?
- # 代码部分
- code_list = []
- challenge.path.split(";").each do |path|
- if code_info.select{|info| path == info.origin_path}.size > 0
- info = code_info.select{|info| path == info.origin_path}[0]
- code_list << {path: path, origin_content: info.origin_content, target_content: info.target_content}
- end
+ @challenges.map do |challenge|
+ code_rate = 0
+ game_codes = results.code_info.select {|info| challenge.path.split(";").include?(info.origin_path)}
+ # 先判断用户该关卡是否查重了 取多个待补充文件的平均值
+ if game_codes.count > 0
+ code_rate += game_codes.map(&:rate).sum / challenge.path.split(";").length
+ end
+ logger.info("#####game_codes: #{game_codes}")
+ #target = game_codes.count > 0 ? game_codes[0].target_user_id : nil
+ # 作品完成时间
+ game = challenge.games.find_by(user_id: @user.id)
+ end_time = game.end_time
+ # 用户关卡的得分
+ all_score = homework_challenge_settings.find_by(challenge_id: challenge.id).try(:score).to_f
+ final_score = @student_work.work_challenge_score game, all_score, challenge.id
+ # 抄袭用户
+ copy_user = User.find_by_id(game_codes[0].try(:target_user_id))
+ copy_end_time = copy_user.games.find_by(challenge_id: challenge.id).try(:end_time) if copy_user.present?
+ # 代码部分
+ code_list = []
+ challenge.path.split(";").each do |path|
+ if code_info.select {|info| path == info.origin_path}.size > 0
+ info = code_info.select {|info| path == info.origin_path}[0]
+ code_list << {path: path, origin_content: info.origin_content, target_content: info.target_content}
end
- # TODO: 这里本来应该前端做的,但是现在页面已经刷不开了。
- {code_rate: code_rate, copy_user_id: copy_user.try(:id), end_time: end_time, final_score: final_score,
- all_score: all_score, copy_end_time: copy_end_time, copy_username: copy_user.try(:full_name),
- username: game.user.full_name, code_list: code_list, subject: challenge.subject, position: challenge.position,
- id: challenge.id}
end
+ # TODO: 这里本来应该前端做的,但是现在页面已经刷不开了。
+ {code_rate: code_rate, copy_user_id: copy_user.try(:id), end_time: end_time, final_score: final_score,
+ all_score: all_score, copy_end_time: copy_end_time, copy_username: copy_user.try(:full_name),
+ username: game.user.full_name, code_list: code_list, subject: challenge.subject, position: challenge.position,
+ id: challenge.id}
+ end
else
if results.status == 1
@@ -1461,8 +1407,8 @@ class HomeworkCommonsController < ApplicationController
user_rate = 0
# 计算每个关卡的相似度
challenges.each do |challenge|
- game_codes = results.user_lists.select{|user_list| user_list.user_id == user &&
- challenge.path.split(";").include?(user_list.origin_path)}
+ game_codes = results.user_lists.select {|user_list| user_list.user_id == user &&
+ challenge.path.split(";").include?(user_list.origin_path)}
# 先判断用户该关卡是否查重了 取多个待补充文件的平均值
if game_codes.count > 0
user_rate += game_codes.map(&:rate).sum / challenge.path.split(";").length
From ea9925f2b092b26c05343acba8d309ba1ee2e4f7 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Fri, 6 Mar 2020 20:48:58 +0800
Subject: [PATCH 059/100] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/examination_banks_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/examination_banks_controller.rb b/app/controllers/examination_banks_controller.rb
index cc34d9fea..3df11a432 100644
--- a/app/controllers/examination_banks_controller.rb
+++ b/app/controllers/examination_banks_controller.rb
@@ -36,8 +36,8 @@ class ExaminationBanksController < ApplicationController
end
current_user.item_baskets.destroy_all
+ render_ok({exam_id: exam.id})
end
- render_ok
rescue ApplicationService::Error => ex
render_error(ex.message)
end
From 22c10fd8995cbcfb1ad09e0edc10256b00b8aa49 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Fri, 6 Mar 2020 20:57:42 +0800
Subject: [PATCH 060/100] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E5=BC=80=E5=90=AF=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/polls_controller.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb
index 21a919efd..edb3fba00 100644
--- a/app/controllers/polls_controller.rb
+++ b/app/controllers/polls_controller.rb
@@ -135,6 +135,7 @@ class PollsController < ApplicationController
:course_id => @course.id,
:polls_status => 1,
:polls_type => "Course",
+ :un_anonymous => true
}
@poll = Poll.create!(poll_options)
end
From 17ef1d3a2af2425c6f73e2428384ffef63cdffb2 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, 6 Mar 2020 21:08:28 +0800
Subject: [PATCH 061/100] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A2=98=E5=BA=93?=
=?UTF-8?q?=E5=8F=AF=E4=BB=A5=E8=BE=93=E5=85=A5=E7=A9=BA=E6=A0=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../question/component/ChoquesEditor.js | 73 +++++--------------
.../question/component/JudquestionEditor.js | 60 +++++----------
.../question/component/SingleEditor.js | 64 ++++++----------
public/react/src/modules/tpm/NewHeader.js | 30 ++++----
4 files changed, 78 insertions(+), 149 deletions(-)
diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js
index 725817d17..d2a0b231b 100644
--- a/public/react/src/modules/question/component/ChoquesEditor.js
+++ b/public/react/src/modules/question/component/ChoquesEditor.js
@@ -229,22 +229,9 @@ class ChoquesEditor extends Component{
var texts;
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
-
-
-
-
- if(this.isNull(_text)===true){
-
- return
- }
-
if (!reg.test(_text)) {
// 处理编辑器内容为空
- try {
- texts=JSON.stringify(value);
- }catch (e) {
texts="";
- }
} else {
if(_text.length>=500){
var result = _text.substring(0,450);
@@ -298,66 +285,46 @@ class ChoquesEditor extends Component{
// debugger
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
-
- if(this.isNull(_text)===true){
- this.setState({
- question_titleysl:""
- })
- return
- }
-
-
if (!reg.test(_text)) {
// 处理编辑器内容为空
- try {
- this.setState({
- question_titleysl: JSON.stringify(value)
- })
- }catch (e) {
this.setState({
question_titleysl:""
})
- }
} else {
// 提交到后台的内容需要处理一下;
- let texts="";
- texts = JSON.stringify(value);
- this.setState({
- question_titleysl:texts
- })
+ try {
+ let texts = JSON.stringify(value);
+ this.setState({
+ question_titleysl:texts
+ })
+ }catch (e) {
+ this.setState({
+ question_titleysl:""
+ })
+ }
}
}
onContentChanges=(value,quill)=>{
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
-
-
- if(this.isNull(_text)===true){
- this.setState({
- question_titlesysl:""
- })
- return
- }
-
if (!reg.test(_text)) {
// 处理编辑器内容为空
- try {
- this.setState({
- question_titlesysl: JSON.stringify(value)
- })
- }catch (e) {
this.setState({
question_titlesysl:""
})
- }
} else {
// 提交到后台的内容需要处理一下;
- let texts="";
+ try {
+ let texts = JSON.stringify(value);
+ this.setState({
+ question_titlesysl:texts
+ })
+ }catch (e) {
+ this.setState({
+ question_titlesysl:""
+ })
+ }
- texts = JSON.stringify(value);
- this.setState({
- question_titlesysl:texts
- })
}
}
diff --git a/public/react/src/modules/question/component/JudquestionEditor.js b/public/react/src/modules/question/component/JudquestionEditor.js
index 603fbd6e7..868700c6b 100644
--- a/public/react/src/modules/question/component/JudquestionEditor.js
+++ b/public/react/src/modules/question/component/JudquestionEditor.js
@@ -303,72 +303,50 @@ class JudquestionEditor extends Component{
// console.log(quill);
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
- // console.log(_text);
- // console.log(_text.length);
- if(this.isNull(_text)===true){
- this.setState({
- question_titleysl:""
- })
- return
- }
-
if (!reg.test(_text)) {
// 处理编辑器内容为空
- try {
this.setState({
- question_titleysl:JSON.stringify(value)
+ question_titleysl:""
+ })
+ // console.log("空");
+ } else {
+ // 提交到后台的内容需要处理一下;
+ try {
+ let texts = JSON.stringify(value);
+ this.setState({
+ question_titleysl:texts
})
}catch (e) {
this.setState({
question_titleysl:""
})
}
-
- // console.log("空");
- } else {
- // console.log("有");
-
- // 提交到后台的内容需要处理一下;
- let texts="";
- texts = JSON.stringify(value);
- this.setState({
- question_titleysl:texts
- })
}
}
onContentChanges=(value,quill)=>{
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
-
- if(this.isNull(_text)===true){
- this.setState({
- question_titlesysl:""
- })
- return
- }
if (!reg.test(_text)) {
// 处理编辑器内容为空
- try {
- this.setState({
- question_titlesysl:JSON.stringify(value)
- })
- }catch (e) {
this.setState({
question_titlesysl:""
})
- }
-
} else {
// 提交到后台的内容需要处理一下;
- let texts="";
+ try {
- texts = JSON.stringify(value);
- this.setState({
- question_titlesysl:texts
- })
+ let texts = JSON.stringify(value);
+ this.setState({
+ question_titlesysl:texts
+ })
+ }catch (e) {
+ this.setState({
+ question_titlesysl:""
+ })
+ }
}
}
render() {
diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js
index 464eb19e0..fab9170b8 100644
--- a/public/react/src/modules/question/component/SingleEditor.js
+++ b/public/react/src/modules/question/component/SingleEditor.js
@@ -140,7 +140,13 @@ class SingleEditor extends Component{
// this.refs['titleEditor'].showError()
this.props.showNotification('请您输入题干');
return editordata;
+ }else{
+ console.log("question_titleysl");
+ console.log(question_titleysl);
}
+
+
+
for(let i = 0; i < question_choices.length; i++) {
if (!question_choices[i]) {
// this.refs[`optionEditor${i}`].showError()
@@ -244,6 +250,7 @@ class SingleEditor extends Component{
this.setState({ standard_answers })
}
onOptionContentChange = (value,quill,index) => {
+ debugger
if (index >= this.state.question_choices.length) {
// TODO 新建,然后删除CD选项,再输入题干,会调用到这里,且index是3
return;
@@ -251,18 +258,9 @@ class SingleEditor extends Component{
var texts;
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
-
-
- if(this.isNull(_text)===true){
- return
- }
if (!reg.test(_text)) {
// 处理编辑器内容为空
- try {
- texts= JSON.stringify(value)
- }catch (e) {
texts="";
- }
} else {
if(_text.length>=500){
var result = _text.substring(0,450);
@@ -315,61 +313,47 @@ class SingleEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
-
- if(this.isNull(_text)===true){
- this.setState({
- question_titleysl:""
- })
- return
- }
-
-
-
if (!reg.test(_text)) {
// 处理编辑器内容为空
- try {
- this.setState({
- question_titleysl: JSON.stringify(value)
- })
- }catch (e) {
this.setState({
question_titleysl:""
})
- }
} else {
+ try {
let texts = JSON.stringify(value);
- this.setState({
- question_titleysl:texts
- })
+ this.setState({
+ question_titleysl:texts===undefined|| null?"":texts
+ })
+ }catch (e) {
+ this.setState({
+ question_titleysl:""
+ })
+ }
}
}
onContentChanges=(value,quill)=>{
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
- if(this.isNull(_text)===true){
- this.setState({
- question_titlesysl:""
- })
- return
- }
+
if (!reg.test(_text)) {
// 处理编辑器内容为空
+ this.setState({
+ question_titlesysl:""
+ })
+ } else {
try {
+ let texts = JSON.stringify(value);
this.setState({
- question_titlesysl:JSON.stringify(value)
+ question_titlesysl:texts===undefined|| null?"":texts
})
}catch (e) {
this.setState({
question_titlesysl:""
})
}
- } else {
- let texts = JSON.stringify(value);
- this.setState({
- question_titlesysl:texts
- })
+
}
}
handleShowImage = (url) => {
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 8d3c85378..dccdbc5a7 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -1075,21 +1075,21 @@ submittojoinclass=(value)=>{
`
}
- {/*{*/}
- {/* Periofters===true?*/}
- {/*
-
*/}
-
*/}
-
-
*/}
-
-
- {/*target="_blank"*/}
-
-
+
+
+
+
+