From f5df85ccb3e24599bf31654d89e67d01d51fe143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 10 Mar 2020 17:04:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesDetail/CoursesBanner.js | 2 +- .../courses/exercise/ExerciseNewCommon.js | 2 +- .../exercise/ExerciseReviewAndAnswer.js | 548 +++++++++--------- .../graduation/topics/GraduateTopicDetail.js | 4 +- .../src/modules/courses/new/Goldsubject.js | 2 +- .../react/src/modules/courses/poll/PollNew.js | 14 +- .../modules/courses/poll/PollNewQuestbank.js | 4 +- .../shixunHomework/ShixunWorkReport.js | 10 +- .../courses/shixunHomework/shixunHomework.js | 2 +- 9 files changed, 304 insertions(+), 284 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 8c3520054..7d2791b15 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -294,7 +294,7 @@ class CoursesBanner extends Component { }) that.modalCancel(); message.success("删除成功", 1) - push.push(`/courses`) + push.push(`/classrooms`) } }) diff --git a/public/react/src/modules/courses/exercise/ExerciseNewCommon.js b/public/react/src/modules/courses/exercise/ExerciseNewCommon.js index 736f44308..0f61b9942 100644 --- a/public/react/src/modules/courses/exercise/ExerciseNewCommon.js +++ b/public/react/src/modules/courses/exercise/ExerciseNewCommon.js @@ -157,7 +157,7 @@ class ExerciseNewCommon extends Component{ const exercise_id = response.data.data.exercise_id; this.isEdit = true; - this.props.history.replace(`/courses/${courseId}/exercises/${exercise_id}/edit`); + this.props.history.replace(`/classrooms/${courseId}/exercises/${exercise_id}/edit`); } }) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 97bdcdb25..a2a877b8e 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -99,7 +99,7 @@ class ExerciseReviewAndAnswer extends Component { this.getInfo(); } - //window.addEventListener('scroll', this.handleScroll); + //window.addEventListener('scroll', this.handleScroll); } remainTime = (time) => { @@ -169,7 +169,7 @@ class ExerciseReviewAndAnswer extends Component { sureCommit = () => { let coursesId = this.props.match.params.coursesId; let eId = this.props.match.params.Id; - this.props.history.push(`/courses/${coursesId}/exercises/${eId}/student_exercise_list?tab=0`); + this.props.history.push(`/classrooms/${coursesId}/exercises/${eId}/student_exercise_list?tab=0`); } // 滚动定位 @@ -283,7 +283,7 @@ class ExerciseReviewAndAnswer extends Component { changeQuestionStatus = (No, flag) => { this.setState( (prevState) => ({ - question_status: update(prevState.question_status, { [No]: { ques_status: { $set: flag } } }) + question_status : update(prevState.question_status, {[No]: { ques_status: {$set: flag} }}) }) ) } @@ -291,12 +291,12 @@ class ExerciseReviewAndAnswer extends Component { showSetScore = (key, flag, position, type, id) => { this.setState( (prevState) => ({ - exercise_questions: update(prevState.exercise_questions, { [key]: { setScore: { $set: flag == undefined || flag == false ? true : false } } }) - }), () => { - if (position && type && (flag == undefined || flag == false)) { - $("#input_" + position + "_" + type).focus(); - $("html").animate({ scrollTop: $("#Anchor_" + position + "_" + type).offset().top - 150 }); - if (id) { + exercise_questions : update(prevState.exercise_questions, {[key]: { setScore: {$set: flag == undefined || flag==false ? true : false}}}) + }),()=>{ + if (position && type && (flag == undefined || flag==false)) { + $("#input_"+position+"_"+type).focus(); + $("html").animate({ scrollTop: $("#Anchor_"+position+"_"+type).offset().top - 150 }); + if(id){ let { ajustSore } = this.state; let obj = ajustSore.filter(obj => obj.id === id).length > 0; if (!obj) { @@ -327,7 +327,7 @@ class ExerciseReviewAndAnswer extends Component { // }) this.setState( (prevState) => ({ - ajustSore: update(prevState.ajustSore, { [index]: { setTip: { $set: "请输入数字" } } }) + ajustSore : update(prevState.ajustSore, {[index]: { setTip: {$set: "请输入数字"}}}) }) ) return; @@ -338,7 +338,7 @@ class ExerciseReviewAndAnswer extends Component { // }) this.setState( (prevState) => ({ - ajustSore: update(prevState.ajustSore, { [index]: { inputSore: { $set: value }, setTip: { $set: "" } } }) + ajustSore : update(prevState.ajustSore, {[index]: { inputSore: {$set: value},setTip:{$set: ""}}}) }) ) } @@ -353,7 +353,7 @@ class ExerciseReviewAndAnswer extends Component { var index = ajustSore.map(function (item) { return item.id; }).indexOf(id); this.setState( (prevState) => ({ - ajustSore: update(prevState.ajustSore, { [index]: { desc: { $set: value } } }) + ajustSore : update(prevState.ajustSore, {[index]: { desc: {$set: value}}}) }) ) } @@ -372,7 +372,7 @@ class ExerciseReviewAndAnswer extends Component { // }) this.setState( (prevState) => ({ - ajustSore: update(prevState.ajustSore, { [index]: { setTip: { $set: "请输入分数" } } }) + ajustSore : update(prevState.ajustSore, {[index]: { setTip: {$set: "请输入分数"}}}) }) ) return; @@ -383,7 +383,7 @@ class ExerciseReviewAndAnswer extends Component { // }) this.setState( (prevState) => ({ - ajustSore: update(prevState.ajustSore, { [index]: { setTip: { $set: "分数必须大于或者等于0" } } }) + ajustSore : update(prevState.ajustSore, {[index]: { setTip: {$set: "分数必须大于或者等于0"}}}) }) ) return; @@ -394,7 +394,7 @@ class ExerciseReviewAndAnswer extends Component { // }) this.setState( (prevState) => ({ - ajustSore: update(prevState.ajustSore, { [index]: { setTip: { $set: "分数不能大于当前题目的分数" } } }) + ajustSore : update(prevState.ajustSore, {[index]: { setTip: {$set: "分数不能大于当前题目的分数"}}}) }) ) return; @@ -412,13 +412,13 @@ class ExerciseReviewAndAnswer extends Component { // let statusScore = score==0 ? 0 : score > 0 && score < maxScore ? 2 : 1; // this.setState( - // (prevState) => ({ + // (prevState) => ({ // exercise_questions : update(prevState.exercise_questions, {[key]: { user_score: {$set: parseFloat(score).toFixed(1)},answer_status : {$set: statusScore},question_comments:{$set:result.data.question_comments} }}), // }) // ) // this.setState( - // (prevState) => ({ + // (prevState) => ({ // ajustSore : update(prevState.ajustSore, {[index]: { desc: {$set: undefined},inputSore:{ $set:undefined }}}) // }) // ) @@ -441,7 +441,7 @@ class ExerciseReviewAndAnswer extends Component { //console.log(index+" "+ids); this.setState( (prevState) => ({ - exercise_questions: update(prevState.exercise_questions, { [index]: { user_answer: { $set: ids } } }), + exercise_questions : update(prevState.exercise_questions, {[index]: { user_answer: {$set: ids} }}), }) ) } @@ -450,7 +450,7 @@ class ExerciseReviewAndAnswer extends Component { changeA_flag = (index, status) => { this.setState( (prevState) => ({ - exercise_questions: update(prevState.exercise_questions, { [index]: { a_flag: { $set: status } } }) + exercise_questions : update(prevState.exercise_questions, {[index]: { a_flag: {$set: status} }}) }) ) } @@ -582,10 +582,10 @@ class ExerciseReviewAndAnswer extends Component { } // 返回 - returnBtn = () => { - let coursesId = this.props.match.params.coursesId; - let eId = this.props.match.params.Id; - this.props.history.push(`/courses/${coursesId}/exercises/${eId}/student_exercise_list?tab=0`) + returnBtn = () =>{ + let coursesId=this.props.match.params.coursesId; + let eId=this.props.match.params.Id; + this.props.history.push(`/classrooms/${coursesId}/exercises/${eId}/student_exercise_list?tab=0`) } deadline = (time) => { @@ -683,67 +683,86 @@ class ExerciseReviewAndAnswer extends Component { modalSave={ModalSave} loadtype={Loadtype} /> -
-

- {courseName} - > - {data && data.left_banner_name} - > - {data && data.left_banner_name}详情> - {exercise_answer_user && exercise_answer_user.user_name}{data && data.exercise.user_name} -

-

- {exercise && exercise.exercise_name} +

+

+ {courseName} + > + {data && data.left_banner_name} + > + {data && data.left_banner_name}详情> + {exercise_answer_user&&exercise_answer_user.user_name}{data&&data.exercise.user_name} +

+

+ {exercise && exercise.exercise_name} - - - - { - (isAdmin || (isStudent && exercise && user_exercise_status == 1)) ? - 返回 - : - time && time != 0 ? -

- -
- : "" - } - {/*
*/} - {/*
  • { hour >= 10 ? hour : '0'+hour}
  • */} - {/* :*/} - {/*
  • { minute >= 10 ? minute : '0'+minute}
  • */} - {/* :*/} - {/*
  • { second >= 10 ? second : '0'+second}
  • */} - {/*
    */} - { - isAdmin && 打回重做 - } -

    + + + + { + (isAdmin || ( isStudent && exercise && user_exercise_status == 1)) ? + 返回 + : + time && time != 0 ? +
    + +
    + :"" + } + {/*
    */} + {/*
  • { hour >= 10 ? hour : '0'+hour}
  • */} + {/* :*/} + {/*
  • { minute >= 10 ? minute : '0'+minute}
  • */} + {/* :*/} + {/*
  • { second >= 10 ? second : '0'+second}
  • */} + {/*
    */} + { + isAdmin && 打回重做 + } +

    + { + exercise && exercise.exercise_description && +

    {exercise.exercise_description}

    + } +

    + { + exercise_types && exercise_types.q_singles > 0 && + 单选题 {exercise_types.q_singles} 题,共 {exercise_types && exercise_types.q_singles_scores} 分 + } + { + exercise_types && exercise_types.q_doubles > 0 && + 多选题 {exercise_types.q_doubles} 题,共 {exercise_types && exercise_types.q_doubles_scores} 分 + } + { + exercise_types && exercise_types.q_judges > 0 && + 判断题 {exercise_types.q_judges} 题,共 {exercise_types && exercise_types.q_judges_scores} 分 + } + { + exercise_types && exercise_types.q_nulls > 0 && + 填空题 {exercise_types.q_nulls} 题,共 {exercise_types && exercise_types.q_nulls_scores} 分 + } + { + exercise_types && exercise_types.q_mains > 0 && + 简答题 {exercise_types.q_mains} 题,共 {exercise_types && exercise_types.q_mains_scores} 分 + } { exercise && exercise.exercise_description &&

    {exercise.exercise_description}

    } -

    - { - exercise_types && exercise_types.q_singles > 0 && - 单选题 {exercise_types.q_singles} 题,共 {exercise_types && exercise_types.q_singles_scores} 分 - } - { - exercise_types && exercise_types.q_doubles > 0 && - 多选题 {exercise_types.q_doubles} 题,共 {exercise_types && exercise_types.q_doubles_scores} 分 - } - { - exercise_types && exercise_types.q_judges > 0 && - 判断题 {exercise_types.q_judges} 题,共 {exercise_types && exercise_types.q_judges_scores} 分 - } - { - exercise_types && exercise_types.q_nulls > 0 && - 填空题 {exercise_types.q_nulls} 题,共 {exercise_types && exercise_types.q_nulls_scores} 分 - } - { - exercise_types && exercise_types.q_mains > 0 && - 简答题 {exercise_types.q_mains} 题,共 {exercise_types && exercise_types.q_mains_scores} 分 - } + {exercise_types &&exercise_types.q_scores} + 合计 {exercise_types &&exercise_types.q_counts} 题: +

    +
    + +
    + + { + exercise_start_at && 开始答题时间:{ exercise_start_at && moment(exercise_start_at).format(format) } + } + { + (isAdmin || (isStudent && exercise && exercise.exercise_status == 3)) && exerciseTotalScore && + 总分: { exerciseTotalScore } + } + { exercise_types && exercise_types.q_shixuns > 0 && 实训题 {exercise_types.q_shixuns} 题,共 {exercise_types && exercise_types.q_shixuns_scores} 分 @@ -759,60 +778,8 @@ class ExerciseReviewAndAnswer extends Component { exercise_start_at && 开始答题时间:{exercise_start_at && moment(exercise_start_at).format(format)} } { - (isAdmin || (isStudent && exercise && exercise.exercise_status == 3)) && exerciseTotalScore && - 总分: {exerciseTotalScore} - } - - { - // 老师身份 || 学生身份且试卷已经截止 - (isAdmin || (isStudent && exercise && exercise.exercise_status == 3)) && -
    - { - exercise_scores && exercise_scores.objective_scores && exercise_scores.objective_scores.length > 0 && -
    -

    - 客观题 - 正确 - 错误 - 部分得分 -

    - -
    - } - { - exercise_scores && exercise_scores.subjective_scores.length > 0 && -
    -

    - 主观题 - 已评 - 未评 -

    - -
    - } -
    - } - - { - //学生身份 且试卷还未截止 - isStudent && exercise && exercise.exercise_status == 2 ? -
    + exercise_scores && exercise_scores.subjective_scores.length > 0 && +

    已答 未答 @@ -826,140 +793,193 @@ class ExerciseReviewAndAnswer extends Component { }) } -

    : "" - } -
    - {/* 试卷题目 */} -
    - { - exercise_questions && exercise_questions.map((item, key) => { - let list = ajustSore && ajustSore.filter(obj => obj.id === item.question_id); - return ( -
    -

    - {item.q_position}、{type[item.question_type]}({item.question_score}分) - - { - // 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮 - isAdmin && ((parseInt(item.answer_status) != 0 && item.question_type == 4) || item.question_type == 3 || item.question_type == 1) ? - this.showSetScore(key, item.setScore, item.q_position, item.question_type, item.question_id)}>调分 : "" - } - { - // 简答题,未评分的显示未批 - isAdmin && parseInt(item.answer_status) == 0 && item.question_type == 4 ? - 未批 : "" - } - { - // 客观题:老师||学生(试卷已截止且答案公开)显示正确答案 - item.question_type < 3 && item.standard_answer_show ? - - 正确答案:{item.standard_answer_show} - : "" - } - { - //(老师身份且除实训题外) || (学生身份且试卷已经截止)就显示用户当前题目所得分数 - (isAdmin || (isStudent && exercise.exercise_status == 3)) && item.question_type != 5 && item.user_score ? - - {item.user_score} - : "" - } - { - //实训题 ,答题 - item.question_type == 5 && - 实训详情 - } - -

    -
  • - {/*

    */} - -
  • - { - // 选择题和判断题共用 - (item.question_type == 0 || item.question_type == 2) && - this.changeOption(index, ids)} - changeQuestionStatus={(No, flag) => this.changeQuestionStatus(No, flag)} - index={key} - > - } - { - // 多选题 - item.question_type == 1 && +
    + } +
    + } + + { + //学生身份 且试卷还未截止 + isStudent && exercise && exercise.exercise_status == 2 ? +
    +

    + 已答 + 未答 +

    + +
    :"" + } +
    + {/* 试卷题目 */} +
    + { + exercise_questions && exercise_questions.map((item,key)=>{ + let list = ajustSore && ajustSore.filter(obj => obj.id === item.question_id); + return( +
    +

    + {item.q_position}、{type[item.question_type]}({item.question_score}分) + + { + // 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮 + isAdmin && ((parseInt(item.answer_status) != 0 && item.question_type == 4) || item.question_type == 3 || item.question_type == 1) ? + this.showSetScore(key,item.setScore,item.q_position,item.question_type,item.question_id)}>调分:"" + } + { + // 简答题,未评分的显示未批 + isAdmin && parseInt(item.answer_status) == 0 && item.question_type == 4 ? + 未批:"" + } + { + // 客观题:老师||学生(试卷已截止且答案公开)显示正确答案 + item.question_type < 3 && item.standard_answer_show ? + + 正确答案:{ item.standard_answer_show } + :"" + } + { + //(老师身份且除实训题外) || (学生身份且试卷已经截止)就显示用户当前题目所得分数 + ( isAdmin || (isStudent && exercise.exercise_status == 3)) && item.question_type != 5 && item.user_score ? + + {item.user_score} + : "" + } + { + //实训题 ,答题 + item.question_type == 5 && + 实训详情 + } + +

    +
  • + {/*

    */} + +
  • + { + // 选择题和判断题共用 + (item.question_type == 0 || item.question_type == 2) && + this.changeOption(index,ids)} + changeQuestionStatus={(No,flag)=>this.changeQuestionStatus(No,flag)} + index={key} + > + } + { + // 多选题 + item.question_type == 1 && this.changeOption(index, ids)} - changeQuestionStatus={(No, flag) => this.changeQuestionStatus(No, flag)} - index={key} + {...this.props} + {...this.state} + exercise={exercise} + questionType={item} + user_exercise_status={user_exercise_status} + changeOption={(index,ids)=>this.changeOption(index,ids)} + changeQuestionStatus={(No,flag)=>this.changeQuestionStatus(No,flag)} + index={key} > - } - { - // 填空题 - item.question_type == 3 && - this.changeQuestionStatus(No, flag)} - index={key} - - > - } - { - // 简答题 - item.question_type == 4 && - this.changeQuestionStatus(No, flag)} - changeA_flag={(index, status) => this.changeA_flag(index, status)} - index={key} - > - } - { - // 实训题 - item.question_type == 5 && - - } + } + { + // 填空题 + item.question_type == 3 && + this.changeQuestionStatus(No,flag)} + index={key} - { - //调分理由部分 - item.question_comments && item.question_comments.comment && (item.question_type == 3 || item.question_type == 4 || item.question_type == 1) && -
    - -
    -
  • - {item.question_comments.user_name} - {moment(item.question_comments.updated_at).format(format)} -
  • -
  • {item.question_comments.comment}
  • -
    + > + } + { + // 简答题 + item.question_type == 4 && + this.changeQuestionStatus(No,flag)} + changeA_flag={(index,status)=>this.changeA_flag(index,status)} + index={key} + > + } + { + // 实训题 + item.question_type == 5 && + + } + + { + //调分理由部分 + item.question_comments && item.question_comments.comment && (item.question_type == 3 || item.question_type == 4 || item.question_type == 1) && +
    + +
    +
  • + {item.question_comments.user_name} + {moment(item.question_comments.updated_at).format(format)} +
  • +
  • {item.question_comments.comment}
  • +
    +
    + } + { + // 调分输入部分 + isAdmin && ((item.setScore && item.question_type == 3) || (item.setScore && item.question_type == 1) || ((item.setScore || parseInt(item.answer_status) == 0) && item.question_type == 4))? +
    +
    + *调分: +
  • +

    + 0 && list[0].inputSore} + step={0.1} + precision={1} + className={ list && list.length>0 && list[0].setTip !="" ? "edu-txt-center winput-115-40 fl mt3 noticeTip inputNumber30" : "edu-txt-center winput-115-40 fl mt3 inputNumber30"} + onChange={(value)=>this.inputScore(value,item.question_id)} + id={`${"input_"+item.q_position+"_"+item.question_type}`} + > + + { + parseInt(item.answer_status) == 0 && item.question_type == 4 ? 未评分 : '' + } + this.setAction(key,item.question_id,item.question_score,item.user_score)}>确认 +

    + { + list && list.length > 0 && list[0].setTip !="" ?

    { list[0].setTip }

    :"" + } +
  • } { @@ -1019,4 +1039,4 @@ class ExerciseReviewAndAnswer extends Component { ) } } -export default ExerciseReviewAndAnswer \ No newline at end of file +export default ExerciseReviewAndAnswer diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js index 4097a051e..50368fe9c 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js @@ -107,7 +107,7 @@ class GraduateTopicDetail extends Component{

    {tableData && tableData.course_name} > - {tableData.graduation_name} + {tableData.graduation_name} > 选题详情

    @@ -134,7 +134,7 @@ class GraduateTopicDetail extends Component{ 取消选题 } { - isAdmin && 编辑 + isAdmin && 编辑 }
    { diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index b3fd113da..6d637552d 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -720,7 +720,7 @@ class Goldsubject extends Component { {/* {Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}*/} {/**/}

    - {Whethertocreateanewclassroom===true?"教学课堂":name} > {Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"} diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 3b50695e8..a3cbba89b 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -362,7 +362,7 @@ class PollNew extends Component { pollid: result.data.data.id, Newedit: false, }) - this.props.history.push(`/courses/${this.props.match.params.coursesId}/polls/${result.data.data.id}/detail?tab=2`) + this.props.history.push(`/classrooms/${this.props.match.params.coursesId}/polls/${result.data.data.id}/detail?tab=2`) } }) } @@ -2590,7 +2590,7 @@ class PollNew extends Component { if (result.data.status === 0) { // console.log("更新题目成功") // this.props.showNotification("保存成功"); - this.props.history.push(`/courses/${this.props.match.params.coursesId}/polls/${pollid}/detail?tab=2`) + this.props.history.push(`/classrooms/${this.props.match.params.coursesId}/polls/${pollid}/detail?tab=2`) } } catch (e) { @@ -2766,7 +2766,7 @@ class PollNew extends Component { // // let courseId=this.props.match.params.coursesId; // if(courseId===undefined){ - // this.props.history.push("/courses"); + // this.props.history.push("/classrooms"); // }else{ // this.props.history.push(this.props.current_user.first_category_url); // } @@ -2833,10 +2833,10 @@ class PollNew extends Component { { this.props.match.params.news === "new"? 问卷 + href={`/classrooms/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollid}`}>问卷 : 问卷 + href={`/classrooms/${this.props.match.params.coursesId}/polls/${left_banner_id}`}>问卷 } > @@ -2847,10 +2847,10 @@ class PollNew extends Component { className="fl color-black summaryname mt5">{this.props.match.params.news === undefined ? "新建问卷" : this.props.match.params.news === "new" ? "新建问卷" : "编辑问卷"}

    { this.props.match.params.news === "new" ? - : - }
    diff --git a/public/react/src/modules/courses/poll/PollNewQuestbank.js b/public/react/src/modules/courses/poll/PollNewQuestbank.js index ad68530e7..58aa916c4 100644 --- a/public/react/src/modules/courses/poll/PollNewQuestbank.js +++ b/public/react/src/modules/courses/poll/PollNewQuestbank.js @@ -385,7 +385,7 @@ class PollNewQuestbank extends Component { pollid: result.data.data.id, Newedit: false, }) - this.props.history.push(`/courses/${this.props.match.params.coursesId}/polls/${result.data.data.id}/detail?tab=2`) + this.props.history.push(`/classrooms/${this.props.match.params.coursesId}/polls/${result.data.data.id}/detail?tab=2`) } }) } @@ -4309,4 +4309,4 @@ export default PollNewQuestbank {/* */ } {/*}*/ -} \ No newline at end of file +} diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 31e6b57fc..f7c0b9cd5 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -131,11 +131,11 @@ class ShixunWorkReport extends Component { } } } - gotohome = () => { - let courseId = this.props.match.params.coursesId; - if (courseId === undefined) { - this.props.history.push("/courses"); - } else { + gotohome=()=>{ + let courseId=this.props.match.params.coursesId; + if(courseId===undefined){ + this.props.history.push("/classrooms"); + }else{ this.props.history.push(this.props.current_user.first_category_url); } } diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 74f2ed7a2..605c649d8 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -974,7 +974,7 @@ class ShixunHomework extends Component{ gotohome=()=>{ let courseId=this.props.match.params.coursesId; if(courseId===undefined){ - this.props.history.push("/courses"); + this.props.history.push("/classrooms"); }else{ this.props.history.push(this.props.current_user.first_category_url); }