diff --git a/public/react/src/modules/courses/exercise/new/JudgeEditor.js b/public/react/src/modules/courses/exercise/new/JudgeEditor.js index 280faa2e3..586d77ed0 100644 --- a/public/react/src/modules/courses/exercise/new/JudgeEditor.js +++ b/public/react/src/modules/courses/exercise/new/JudgeEditor.js @@ -56,23 +56,23 @@ class SingleEditor extends Component{ const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1); if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } const intScore = parseFloat(question_score) if(!question_score || intScore == NaN) { - this.props.showNotification('分值不能为空'); return; + this.props.showNotification('分值:不能为空'); return; } else { if (intScore == 0) { - this.props.showNotification('分值必须大于0'); return; + this.props.showNotification('分值:必须大于0'); return; } } if(!answerArray || answerArray.length == 0) { - this.props.showNotification('请先点击本题的正确选项'); return; + this.props.showNotification('必须设置标准答案'); return; } if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } diff --git a/public/react/src/modules/courses/exercise/new/MainEditor.js b/public/react/src/modules/courses/exercise/new/MainEditor.js index 9f6e643df..e9dd3b105 100644 --- a/public/react/src/modules/courses/exercise/new/MainEditor.js +++ b/public/react/src/modules/courses/exercise/new/MainEditor.js @@ -46,16 +46,16 @@ class MainEditor extends Component{ const answerArray = standard_answers if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } const intScore = parseFloat(question_score) if(!question_score || intScore == NaN) { - this.props.showNotification('分值不能为空'); return; + this.props.showNotification('分值:不能为空'); return; } else { if (intScore == 0) { - this.props.showNotification('分值必须大于0'); return; + this.props.showNotification('分值:必须大于0'); return; } } // if(!answerArray || answerArray.length == 0 || !answerArray[0]) { diff --git a/public/react/src/modules/courses/exercise/new/NullEditor.js b/public/react/src/modules/courses/exercise/new/NullEditor.js index dddadcf0a..299daf904 100644 --- a/public/react/src/modules/courses/exercise/new/NullEditor.js +++ b/public/react/src/modules/courses/exercise/new/NullEditor.js @@ -70,15 +70,15 @@ class NullEditor extends Component{ let answerArray = [] if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } const intScore = parseFloat(question_score) if(!question_score || intScore == NaN) { - this.props.showNotification('分值不能为空'); return; + this.props.showNotification('分值:不能为空'); return; } else { if (intScore == 0) { - this.props.showNotification('分值必须大于0'); return; + this.props.showNotification('分值:必须大于0'); return; } } let isEmpty = false; @@ -91,7 +91,8 @@ class NullEditor extends Component{ answerArray[index].answer_text.push(item) if(!item) { this.refs[`nullChildEditor${index}`].showError(itemIndex) - this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`); + // this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`); + this.props.showNotification(`答案:不能为空`); isEmpty = true; } }) @@ -101,7 +102,7 @@ class NullEditor extends Component{ } if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } diff --git a/public/react/src/modules/courses/exercise/new/ShixunEditor.js b/public/react/src/modules/courses/exercise/new/ShixunEditor.js index 581467257..e4835ee10 100644 --- a/public/react/src/modules/courses/exercise/new/ShixunEditor.js +++ b/public/react/src/modules/courses/exercise/new/ShixunEditor.js @@ -98,7 +98,7 @@ class ShixunEditor extends Component{ // } for(let _i = 0; _i < question_scores.length; _i++) { if (!question_scores[_i] || question_scores[_i] == '0') { - this.props.showNotification(`第${_i+1}题的分值必须大于0`); return; + this.props.showNotification(`第${_i+1}题的分值:必须大于0`); return; } } diff --git a/public/react/src/modules/courses/exercise/new/SingleEditor.js b/public/react/src/modules/courses/exercise/new/SingleEditor.js index a9e8aa3f5..8e68a593c 100644 --- a/public/react/src/modules/courses/exercise/new/SingleEditor.js +++ b/public/react/src/modules/courses/exercise/new/SingleEditor.js @@ -88,7 +88,7 @@ class SingleEditor extends Component{ const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1); if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; } @@ -105,7 +105,7 @@ class SingleEditor extends Component{ } if(!question_title) { this.refs['titleEditor'].showError() - this.props.showNotification('题目不能为空'); return; + this.props.showNotification('题目:不能为空'); return; }