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 20c40f025..337a9b7e9 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -30,8 +30,8 @@ const { Countdown } = Statistic; const Textarea =Input.TextArea const tagArray = [ - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', - 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', + 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ] const $ = window.$; @@ -99,8 +99,8 @@ class ExerciseReviewAndAnswer extends Component{ if(this.props.coursedata.name){ this.getInfo(); } - - //window.addEventListener('scroll', this.handleScroll); + + //window.addEventListener('scroll', this.handleScroll); } remainTime=(time)=>{ @@ -170,7 +170,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`); } // 滚动定位 @@ -279,7 +279,7 @@ class ExerciseReviewAndAnswer extends Component{ //答题后更改题目列表得状态 changeQuestionStatus=(No,flag)=>{ this.setState( - (prevState) => ({ + (prevState) => ({ question_status : update(prevState.question_status, {[No]: { ques_status: {$set: flag} }}) }) ) @@ -287,7 +287,7 @@ class ExerciseReviewAndAnswer extends Component{ // 调分 showSetScore=(key,flag,position,type,id)=>{ this.setState( - (prevState) => ({ + (prevState) => ({ exercise_questions : update(prevState.exercise_questions, {[key]: { setScore: {$set: flag == undefined || flag==false ? true : false}}}) }),()=>{ if (position && type && (flag == undefined || flag==false)) { @@ -323,7 +323,7 @@ class ExerciseReviewAndAnswer extends Component{ // setTip:"请输入数字" // }) this.setState( - (prevState) => ({ + (prevState) => ({ ajustSore : update(prevState.ajustSore, {[index]: { setTip: {$set: "请输入数字"}}}) }) ) @@ -334,7 +334,7 @@ class ExerciseReviewAndAnswer extends Component{ // score:value // }) this.setState( - (prevState) => ({ + (prevState) => ({ ajustSore : update(prevState.ajustSore, {[index]: { inputSore: {$set: value},setTip:{$set: ""}}}) }) ) @@ -349,7 +349,7 @@ class ExerciseReviewAndAnswer extends Component{ let { ajustSore } = this.state; var index = ajustSore.map(function (item) { return item.id; }).indexOf(id); this.setState( - (prevState) => ({ + (prevState) => ({ ajustSore : update(prevState.ajustSore, {[index]: { desc: {$set: value}}}) }) ) @@ -368,7 +368,7 @@ class ExerciseReviewAndAnswer extends Component{ // setTip:"请输入分数" // }) this.setState( - (prevState) => ({ + (prevState) => ({ ajustSore : update(prevState.ajustSore, {[index]: { setTip: {$set: "请输入分数"}}}) }) ) @@ -379,7 +379,7 @@ class ExerciseReviewAndAnswer extends Component{ // setTip:"分数必须大于或者等于0" // }) this.setState( - (prevState) => ({ + (prevState) => ({ ajustSore : update(prevState.ajustSore, {[index]: { setTip: {$set: "分数必须大于或者等于0"}}}) }) ) @@ -390,7 +390,7 @@ class ExerciseReviewAndAnswer extends Component{ // setTip:"分数不能大于当前题目的分数" // }) this.setState( - (prevState) => ({ + (prevState) => ({ ajustSore : update(prevState.ajustSore, {[index]: { setTip: {$set: "分数不能大于当前题目的分数"}}}) }) ) @@ -407,15 +407,15 @@ class ExerciseReviewAndAnswer extends Component{ this.props.showNotification('调分成功'); this.getInfo(); // 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 }}}) // }) // ) @@ -430,14 +430,14 @@ class ExerciseReviewAndAnswer extends Component{ console.log(error); }) } - + } // 选择题,切换答案 changeOption = (index,ids) =>{ //console.log(index+" "+ids); this.setState( - (prevState) => ({ + (prevState) => ({ exercise_questions : update(prevState.exercise_questions, {[index]: { user_answer: {$set: ids} }}), }) ) @@ -446,7 +446,7 @@ class ExerciseReviewAndAnswer extends Component{ //简答题 显示和隐藏答案 changeA_flag=(index,status)=>{ this.setState( - (prevState) => ({ + (prevState) => ({ exercise_questions : update(prevState.exercise_questions, {[index]: { a_flag: {$set: status} }}) }) ) @@ -582,7 +582,7 @@ 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`) + this.props.history.push(`/classrooms/${coursesId}/exercises/${eId}/student_exercise_list?tab=0`) } deadline=(time)=>{ @@ -684,9 +684,9 @@ class ExerciseReviewAndAnswer extends Component{
@@ -722,23 +722,23 @@ class ExerciseReviewAndAnswer extends Component{ }
{ - exercise_types && exercise_types.q_singles > 0 && + 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 && 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 && 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 && 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 && exercise_types.q_mains > 0 && 简答题 {exercise_types.q_mains} 题,共 {exercise_types && exercise_types.q_mains_scores} 分 } { @@ -755,11 +755,11 @@ class ExerciseReviewAndAnswer extends Component{ { exercise_start_at && 开始答题时间:{ exercise_start_at && moment(exercise_start_at).format(format) } } - { - (isAdmin || (isStudent && exercise && exercise.exercise_status == 3)) && exerciseTotalScore && + { + (isAdmin || (isStudent && exercise && exercise.exercise_status == 3)) && exerciseTotalScore && 总分: { exerciseTotalScore } 分 } - + { // 老师身份 || 学生身份且试卷已经截止 (isAdmin || (isStudent && exercise && exercise.exercise_status == 3)) && @@ -785,7 +785,7 @@ class ExerciseReviewAndAnswer extends Component{ } { - exercise_scores && exercise_scores.subjective_scores.length > 0 && + exercise_scores && exercise_scores.subjective_scores.length > 0 &&
主观题 @@ -804,8 +804,8 @@ class ExerciseReviewAndAnswer extends Component{
-
- {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" ? - : - }