diff --git a/app/controllers/concerns/controller_rescue_handler.rb b/app/controllers/concerns/controller_rescue_handler.rb
index 6ff15cfbc..4ab5d3276 100644
--- a/app/controllers/concerns/controller_rescue_handler.rb
+++ b/app/controllers/concerns/controller_rescue_handler.rb
@@ -6,10 +6,12 @@ module ControllerRescueHandler
Util.logger_error e
render json: {status: -1, message: e.message}
end
+
rescue_from ActiveRecord::StatementInvalid do |e|
Util.logger_error e
render json: {status: -1, message: "接口数据异常"}
end
+
rescue_from NoMethodError do |e|
Util.logger_error e
render json: {status: -1, message: "接口方法异常"}
@@ -18,6 +20,7 @@ module ControllerRescueHandler
rescue_from ActionController::UnknownFormat do |e|
render json: {status: -1, message: "接口调用非JSON格式"}
end
+
# rescue_from ActionView::MissingTemplate, with: :object_not_found
# rescue_from ActiveRecord::RecordNotFound, with: :object_not_found
rescue_from Educoder::TipException, with: :tip_show
@@ -32,6 +35,7 @@ module ControllerRescueHandler
rescue_from ActiveRecord::RecordInvalid do |ex|
render_error(ex.record.errors.full_messages.join(','))
end
+
# rescue_from RuntimeError do |ex|
# Util.logger_error "#######ex:#{ex}"
# render_error(ex.message)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index c7cdc84ab..24caf0c67 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -44,9 +44,9 @@ if (isDev) {
// 超管
debugType="admin";
// 老师
-//debugType="teacher";
+// debugType="teacher";
// 学生
-//debugType="student";
+// debugType="student";
diff --git a/public/react/src/common/quillForEditor/index.js b/public/react/src/common/quillForEditor/index.js
index 012743141..89a4f6224 100644
--- a/public/react/src/common/quillForEditor/index.js
+++ b/public/react/src/common/quillForEditor/index.js
@@ -22,8 +22,8 @@ import FillBlot from './FillBlot';
const Size = Quill.import('attributors/style/size');
const Font = Quill.import('formats/font');
// const Color = Quill.import('attributes/style/color');
-Size.whitelist = ['12px', '14px', '16px', '18px', '20px', false];
-Font.whitelist = ['SimSun', 'SimHei','Microsoft-YaHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif'];
+Size.whitelist = ['14px', '16px', '18px', '20px', false];
+Font.whitelist = ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif'];
window.Quill = Quill;
window.katex = katex;
@@ -55,10 +55,11 @@ function QuillForEditor ({
// toolbar 默认值
const defaultConfig = [
'bold', 'italic', 'underline',
- {size: ['12px', '14px', '16px', '18px', '20px']},
+ {size: ['14px', '16px', '18px', '20px']},
{align: []}, {list: 'ordered'}, {list: 'bullet'}, // 列表
{script: 'sub'}, {script: 'super'},
{ 'color': [] }, { 'background': [] },
+ { 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']},
{header: [1,2,3,4,5,false]},
'blockquote', 'code-block',
'link', 'image', 'video',
@@ -99,7 +100,7 @@ function QuillForEditor ({
*/
handler: function (range, context) {
/**
- * index: 删除元素的位置
+ * index: 删除元素的位置
* length: 删除元素的个数
*/
const {index, length} = range;
@@ -123,7 +124,7 @@ function QuillForEditor ({
let delIndexs = [];
// 获取删除元素的下标
delArrs.forEach((item, i) => {
- leaveLen === 0 ? delIndexs.push(i) : delIndexs.push(leaveLen + i);
+ leaveLen === 0 ? delIndexs.push(i) : delIndexs.push(leaveLen + i);
});
deleteFill && deleteFill(delIndexs); // 调用删除回调, 返回删除的元素下标[]
return true
diff --git a/public/react/src/modules/courses/Video/LiveItem.js b/public/react/src/modules/courses/Video/LiveItem.js
index 913235ef0..b71e5b02b 100644
--- a/public/react/src/modules/courses/Video/LiveItem.js
+++ b/public/react/src/modules/courses/Video/LiveItem.js
@@ -174,4 +174,4 @@ class LiveItem extends Component{
)
}
}
-export default LiveItem;
\ No newline at end of file
+export default LiveItem;
diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js
index d490887bf..d58a2f187 100644
--- a/public/react/src/modules/courses/Video/VideoIndex.js
+++ b/public/react/src/modules/courses/Video/VideoIndex.js
@@ -294,4 +294,4 @@ class VideoIndex extends Component{
)
}
}
-export default VideoIndex;
\ No newline at end of file
+export default VideoIndex;
diff --git a/public/react/src/modules/developer/components/knowledge/index.js b/public/react/src/modules/developer/components/knowledge/index.js
index 9598037ab..0a1e00125 100644
--- a/public/react/src/modules/developer/components/knowledge/index.js
+++ b/public/react/src/modules/developer/components/knowledge/index.js
@@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-30 13:51:19
* @LastEditors : tangjiang
- * @LastEditTime : 2020-01-07 15:46:24
+ * @LastEditTime : 2020-02-11 16:34:18
*/
import './index.scss';
import React, { useState, useEffect } from 'react';
@@ -22,7 +22,6 @@ function KnowLedge (props) {
showAdd, // 显示新增图标
addKnowledge // 调用新增知识点接口
} = props;
-
useEffect(() => {
const _options = [];
const _selects = [];
diff --git a/public/react/src/modules/developer/newOrEditTask/index.js b/public/react/src/modules/developer/newOrEditTask/index.js
index 9be899b9c..565d6af30 100644
--- a/public/react/src/modules/developer/newOrEditTask/index.js
+++ b/public/react/src/modules/developer/newOrEditTask/index.js
@@ -35,7 +35,10 @@ const NewOrEditTask = (props) => {
getUserInfoForNew,
handleCancelPublish,
validateOjForm,
- getQuestion
+ getQuestion,
+ saveSearchParams,
+ setOjInitialValue,
+ courseQuestions
// updateTestAndValidate,
} = props;
@@ -54,14 +57,35 @@ const NewOrEditTask = (props) => {
useEffect(() => {
// 获取用户信息
getUserInfoForNew();
+ // console.log('获取路由参数: ====', props.match.params);
+ const id = props.match.params.id;
+ // 保存OJForm的id号,指明是编辑还是新增
+ props.saveOJFormId(id);
+ // 获取地址栏查询参数
+ const $searchs = window.location.search && window.location.search.substring(1);
+ if ($searchs) {
+ const $params = $searchs.split('&') || [];
+ let obj = Object.create(null);
+ $params.forEach(item => {
+ const keys = item.split('=');
+ obj[keys[0]] = keys[1];
+ });
+ // 保存初始值
+ if (obj['newoj']) {
+ const tags = obj['tag_discipline_id'];
+ const tag_arrs = (tags && tags.split(',').map(tag => +tag)) || [];
+ setOjInitialValue({
+ difficult: obj['difficult'],
+ sub_discipline_id: obj['sub_discipline_id'],
+ tag_discipline_id: tag_arrs
+ });
+ }
+ saveSearchParams({searchParams: $searchs, curPage: obj['pages']});
+ }
// 获取课程列表
getQuestion({
source: 'question'
});
- // console.log('获取路由参数: ====', props.match.params);
- const id = props.match.params.id;
- // 保存OJForm的id号,指明是编辑还是新增
- props.saveOJFormId(id);
if (id) { // id号即 identifier
// TODO id 存在时, 编辑, 获取 store 中的记录数
props.getOJFormById(id);
@@ -96,7 +120,8 @@ const NewOrEditTask = (props) => {
props.clearOJFormStore();
// 清空描述信息
toStore('oj_description', '');
- props.history.push('/problems');
+ // props.history.push('/problems');
+ props.history.push(`/question?${props.searchParams}`);
}
// 发布
@@ -236,7 +261,7 @@ const NewOrEditTask = (props) => {
}
const mapStateToProps = (state) => {
- const { ojForm, identifier, testCases, isPublish } = state.ojFormReducer;
+ const { ojForm, identifier, testCases, isPublish, searchParams, courseQuestions } = state.ojFormReducer;
const { publishLoading, submitLoading } = state.commonReducer;
const { userInfo } = state.userReducer;
return {
@@ -246,7 +271,9 @@ const mapStateToProps = (state) => {
isPublish, // 是否已发布
publishLoading,
submitLoading,
- userInfo
+ userInfo,
+ searchParams,
+ courseQuestions
}
};
@@ -278,7 +305,9 @@ const mapDispatchToProps = (dispatch) => ({
// 新建时获取信息
getUserInfoForNew: () => dispatch(actions.getUserInfoForNew()),
validateOjForm: (props, type, cb) => dispatch(actions.validateOjForm(props, type, cb)),
- getQuestion: (params) => dispatch(actions.getQuestion(params))
+ getQuestion: (params) => dispatch(actions.getQuestion(params)),
+ saveSearchParams: (params) => dispatch(actions.saveSearchParams(params)),
+ setOjInitialValue: (params) => dispatch(actions.setOjInitialValue(params))
});
export default withRouter(connect(
diff --git a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js
index cdbf14a30..afa68fb23 100644
--- a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js
+++ b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js
@@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 10:35:40
* @LastEditors : tangjiang
- * @LastEditTime : 2020-02-05 13:26:58
+ * @LastEditTime : 2020-02-11 16:44:57
*/
import './index.scss';
// import 'katex/dist/katex.css';
@@ -61,7 +61,7 @@ class EditTab extends React.Component {
top: 500,
bottom: 20,
offsetTop: 0,
- showAdd: false
+ showAdd: props.tag_discipline_id || false
// knowledges: [],
// coursers: [] // 选中的课程
}
diff --git a/public/react/src/modules/developer/studentStudy/index.js b/public/react/src/modules/developer/studentStudy/index.js
index 0c8c7012f..184ce0af5 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 : 2020-01-06 15:27:34
+ * @LastEditTime : 2020-02-10 18:24:01
*/
import './index.scss';
import React, { useEffect, useState } from 'react';
@@ -31,7 +31,9 @@ function StudentStudy (props) {
// user_program_identifier,
restoreInitialCode,
changeUserCodeTab,
- changeShowOrHideControl
+ changeShowOrHideControl,
+ searchParams,
+ saveSearchParams
} = props;
const {
@@ -47,7 +49,16 @@ function StudentStudy (props) {
saveUserProgramIdentifier(id);
// startProgramQuestion(id);
getUserProgramDetail(id);
-
+ const $searchs = window.location.search && window.location.search.substring(1);
+ if ($searchs) {
+ const $params = $searchs.split('&') || [];
+ let obj = Object.create(null);
+ $params.forEach(item => {
+ const keys = item.split('=');
+ obj[keys[0]] = keys[1];
+ });
+ saveSearchParams({searchParams: $searchs, curPage: obj['pages']});
+ }
if (tab) {
changeUserCodeTab(tab);
}
@@ -97,7 +108,7 @@ function StudentStudy (props) {
changeShowOrHideControl(false);
props.saveEditorCodeForDetail('');
props.clearOjForUserReducer();
- props.history.push(`/problems/${identifier}/edit`);
+ props.history.push(`/problems/${identifier}/edit?{searchParams}`);
}
// 处理退出
const handleClickQuit = () => {
@@ -106,7 +117,8 @@ function StudentStudy (props) {
// 将控制台关闭
changeShowOrHideControl(false);
props.saveEditorCodeForDetail('');
- props.history.push('/problems');
+ // props.history.push('/problems');
+ props.history.push(`/question?${searchParams}`);
}
return (
@@ -163,11 +175,13 @@ function StudentStudy (props) {
const mapStateToProps = (state) => {
const { userInfo } = state.userReducer;
const { hack_identifier, user_program_identifier, hack } = state.ojForUserReducer;
+ const { searchParams } = state.ojFormReducer;
return {
hack,
userInfo,
user_program_identifier,
- hack_identifier
+ hack_identifier,
+ searchParams
};
};
@@ -182,7 +196,8 @@ const mapDispatchToProps = (dispatch) => ({
restoreInitialCode: (identifier, msg) => dispatch(actions.restoreInitialCode(identifier, msg)),
changeShowOrHideControl: (flag) => dispatch(actions.changeShowOrHideControl(flag)),
clearOjForUserReducer: () => dispatch(actions.clearOjForUserReducer()),
- changeUserCodeTab: (tab) => dispatch(actions.changeUserCodeTab(tab))
+ changeUserCodeTab: (tab) => dispatch(actions.changeUserCodeTab(tab)),
+ saveSearchParams: (params) => dispatch(actions.saveSearchParams(params))
});
export default withRouter(connect(
diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js
index 2adc77c03..33f137cd1 100644
--- a/public/react/src/modules/question/Paperreview.js
+++ b/public/react/src/modules/question/Paperreview.js
@@ -406,14 +406,14 @@ class Paperreview extends Component {
Cohetepaperbool===false?
artificialtype==="artificial"?
{indexx}
、 +{indexx}
、{ objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description? -
{
itemsnamesy===null || itemsnamesy===undefined?
diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js
index ba0b10b68..e4a618f19 100644
--- a/public/react/src/modules/question/Question.js
+++ b/public/react/src/modules/question/Question.js
@@ -118,6 +118,7 @@ class Question extends Component {
setsub_discipline_id=(discipline_id,sub_discipline_id)=>{
this.setState({
sub_discipline_id:sub_discipline_id,
+ discipline_id:discipline_id,
tag_discipline_id:null,
keyword:"",
page:1,
@@ -937,6 +938,7 @@ class Question extends Component {
/>
{/*头部*/}
{/* {!question_id ? '新建' : '编辑'} */}
@@ -369,7 +375,7 @@ class ChoquesEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '155px'}}
placeholder="请您输入题干"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={question_title}
onContentChange={this.onContentChange}
@@ -403,7 +409,7 @@ class ChoquesEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '166px'}}
placeholder="请您输入题干"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={item}
onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)}
/>
@@ -413,7 +419,7 @@ class ChoquesEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '166px'}}
placeholder="请您输入题干"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={JSON.parse(item)}
onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)}
/>
@@ -452,7 +458,7 @@ class ChoquesEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{height: '166px' }}
placeholder="请您输入题目解析"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={question_titles}
onContentChange={this.onContentChanges}
/>
diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js
index 61a0fb8ea..6b6c57a43 100644
--- a/public/react/src/modules/question/component/Contentpart.js
+++ b/public/react/src/modules/question/component/Contentpart.js
@@ -38,7 +38,7 @@ class Contentpart extends Component {
}
componentDidUpdate(prevProps) {
if(prevProps.current_user !== this.props.current_user) {
- debugger
+
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
@@ -53,50 +53,51 @@ class Contentpart extends Component {
}
}
xinzenw=(e)=>{
- var urls="?";
+ var urls="";
if(this.props.discipline_id){
- if(urls==="?"){
- urls=urls+`discipline_id=${this.props.discipline_id}`
- }else {
+ // if(urls==="?"){
+ // urls=urls+`discipline_id=${this.props.discipline_id}`
+ // }else {
urls=urls+`&discipline_id=${this.props.discipline_id}`
- }
+ // }
}
if(this.props.sub_discipline_id){
- if(urls==="?"){
- urls=urls+`sub_discipline_id=${this.props.sub_discipline_id}`
- }else {
+ // if(urls==="?"){
+ // urls=urls+`sub_discipline_id=${this.props.sub_discipline_id}`
+ // }else {
urls=urls+`&sub_discipline_id=${this.props.sub_discipline_id}`
- }
+ // }
}
if(this.props.tag_discipline_id){
- if(urls==="?"){
- urls=urls+`sub_discipline_id=${this.props.tag_discipline_id}`
- }else {
+ // if(urls==="?"){
+ // urls=urls+`sub_discipline_id=${this.props.tag_discipline_id}`
+ // }else {
urls=urls+`&sub_discipline_id=${this.props.tag_discipline_id}`
- }
+ // }
}
if(this.props.difficulty){
- if(urls==="?"){
- urls=urls+`difficulty=${this.props.difficulty}&`
- }else {
+ // if(urls==="?"){
+ // urls=urls+`difficulty=${this.props.difficulty}&`
+ // }else {
urls=urls+`&difficulty=${this.props.difficulty}`
- }
+ // }
}
if(this.props.item_type){
- if(urls==="?"){
- urls=urls+`item_type=${this.props.item_type}`
- }else {
+ // if(urls==="?"){
+ // urls=urls+`item_type=${this.props.item_type}`
+ // }else {
urls=urls+`&item_type=${this.props.item_type}`
- }
+ // }
}
+ this.props.history.push("/question/newitem?pages="+this.props.pages+urls);
- this.props.history.push("/question/newitem"+urls);
}
render() {
let {page}=this.state;
let {defaultActiveKey,item_type,booljupyterurls}=this.props;
+ const defaultActiveKeys=defaultActiveKey+'';
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
@@ -166,14 +167,14 @@ class Contentpart extends Component {
{
isysladmins===true||(is_teacher===true&&professional_certification===true)?
-
{/* {!question_id ? '新建' : '编辑'} */}
@@ -384,7 +410,7 @@ class JudquestionEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '155px'}}
placeholder="请您输入题干"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={question_title}
onContentChange={this.onContentChange}
@@ -434,7 +460,7 @@ class JudquestionEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{height: '166px' }}
placeholder="请您输入题目解析"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={question_titles}
onContentChange={this.onContentChanges}
/>
diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js
index cdca0367e..d613227fe 100644
--- a/public/react/src/modules/question/component/Listjihe.js
+++ b/public/react/src/modules/question/component/Listjihe.js
@@ -151,10 +151,13 @@ class Listjihe extends Component {
}catch (e) {
analysisnames=items&&items.analysis;
}
- console.log(items.name);
- console.log(itemsnamesy);
-
- console.log(analysisnames);
+ // console.log(items.name);
+ // console.log(itemsnamesy);
+ //
+ // console.log(analysisnames);
+ const options = [
+ 'bold', // 加粗
+ ]
return (
this.Selectingpracticaltrainings(items.id)}>
-
- 撤销
编辑
@@ -364,7 +379,7 @@ class Listjihe extends Component {
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
-
+
编辑
@@ -400,7 +415,15 @@ class Listjihe extends Component {
公开
this.props.showmodelsInaudit(e)}>
+
+ 公开审核中
+
+ 解析:
+
{items ?
items.analysis=== undefined || items.analysis=== null || items.analysis === "" ?
- ""
+ "暂无解析"
:
items.analysis.length>0?
analysisnames===null || analysisnames===undefined?"":
@@ -467,7 +495,7 @@ class Listjihe extends Component {
value={analysisnames}
/>
:
- ""
+ "暂无解析"
:
""
}
diff --git a/public/react/src/modules/question/component/Newknledpots.js b/public/react/src/modules/question/component/Newknledpots.js
index b299654af..7e0a79228 100644
--- a/public/react/src/modules/question/component/Newknledpots.js
+++ b/public/react/src/modules/question/component/Newknledpots.js
@@ -9,7 +9,10 @@ class PaperDeletModel extends Component {
constructor(props) {
super(props);
this.state={
- newkntypeinput:""
+ newkntypeinput:"",
+ errores:false,
+ errorestit:'',
+ addonAfteronelens3:0,
}
}
isNull=( str )=>{
@@ -28,12 +31,13 @@ class PaperDeletModel extends Component {
// })
// //console.log(e.target.value);
// //console.log(e.target.value.length);
- if(this.isNull(e.target.value)===true){
- this.props.showNotification('不能输入空格');
- return
- }
+
this.setState({
- newkntypeinput: e.target.value
+ newkntypeinput: e.target.value,
+ addonAfteronelens3:e.target.value.length,
+ errorestit:'',
+ errores:false,
+ boolred:false,
})
this.props.setboolred(false);
//
@@ -48,7 +52,8 @@ class PaperDeletModel extends Component {
// })
// }
// }
- }
+ };
+
mysinputOnBlur=(e)=>{
//console.log("失去焦点了");
}
@@ -57,8 +62,28 @@ class PaperDeletModel extends Component {
//console.log("获取焦点");
}
+ NewknTypedeltyoedels=()=>{
+ debugger
+ if(this.state.newkntypeinput.length===0){
+ this.setState({
+ errorestit:'请输入知识点',
+ errores:true,
+ boolred:true,
+ })
+ return
+ }
+ if(this.isNull(this.state.newkntypeinput)===true){
+ this.setState({
+ errorestit:'不能输入空格',
+ errores:true,
+ boolred:true,
+ })
+ return
+ }
+ this.props.NewknTypedeltyoedel(this.state.newkntypeinput)
+ }
render() {
-
+ let{errores,errorestit,addonAfteronelens3}=this.state;
return(
{errorestit}
{/* {!question_id ? '新建' : '编辑'} */}
@@ -401,7 +397,7 @@ class SingleEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '155px'}}
placeholder="请您输入题干"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={question_title}
onContentChange={this.onContentChange}
/>
@@ -433,7 +429,7 @@ class SingleEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '166px'}}
placeholder="请您输入题干"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={item}
onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)}
/>
@@ -443,7 +439,7 @@ class SingleEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '166px'}}
placeholder="请您输入题干"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={JSON.parse(item)}
onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)}
/>
@@ -484,7 +480,7 @@ class SingleEditor extends Component{
imgAttrs={{width: '146px', height: '136px'}}
style={{height: '166px' }}
placeholder="请您输入题目解析"
- options={['code-block', 'image', 'formula']}
+ options={options}
value={question_titles}
onContentChange={this.onContentChanges}
/>
diff --git a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js
index 662a5a9d5..a426e7ea7 100644
--- a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js
+++ b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js
@@ -621,6 +621,9 @@ class Comthetestpaperst extends Component {
@@ -142,12 +153,12 @@ class Paperlibraryseeid_items extends Component {
objectsingle.item_type==="PROGRAM"?