diff --git a/public/react/src/modules/courses/exercise/ExerciseNewCommon.js b/public/react/src/modules/courses/exercise/ExerciseNewCommon.js index f5df492d4..609a88884 100644 --- a/public/react/src/modules/courses/exercise/ExerciseNewCommon.js +++ b/public/react/src/modules/courses/exercise/ExerciseNewCommon.js @@ -262,7 +262,8 @@ class ExerciseNewCommon extends Component{ if (this._checkIsEditing()) { return; } - const url = `/exercise_questions/${question_id}/up_down.json` + + const url = `/${this.props.exercise_url_questions || 'exercise_questions'}/${question_id}/up_down.json` axios.post(url, { opr: isUp ? 'up' : 'down'}) .then((response) => { if (response.data.status == 0) { @@ -351,7 +352,7 @@ class ExerciseNewCommon extends Component{ this.props.confirm({ content: `确认要删除这个问题吗?`, onOk: () => { - const url = `/exercise_questions/${question_id}.json` + const url = `/${this.props.exercise_url_questions || 'exercise_questions'}/${question_id}.json` axios.delete(url) .then((response) => { if (response.data.status == 0) {