diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 2cc5dbafb..1cae3d559 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -49,8 +49,19 @@ class Fileslists extends Component{ this.seactall(parseInt(this.props.match.params.Id),1) } this.updadatalist(); + on('updateNavSuccess', this.updateNavSuccess) } + updateNavSuccess=()=>{ + this.setState({ + isSpin:true + }) + if(this.props.match.params.main_id){ + this.seactall(); + }else if(this.props.match.params.Id){ + this.seactall(parseInt(this.props.match.params.Id),1) + } + } componentDidUpdate = (prevProps) => { if(prevProps.match.params.main_id != this.props.match.params.main_id){ this.setState({ diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index f587697f2..43e44c500 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -55,12 +55,12 @@ class CoursesBanner extends Component { let courseId = this.props.match.params.coursesId; let url = "/courses/" + courseId + "/top_banner.json" axios.get(url).then((result) => { - let data = result.data; - this.setState({ - coursedata: data - }) - // console.log(data) - + if( result!=undefined){ + let data = result.data; + this.setState({ + coursedata: data + }) + } }) } showeditmenu = () => { diff --git a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js index f448483d2..bc2fb60b5 100644 --- a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js +++ b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js @@ -200,7 +200,7 @@ class HomeworkModal extends Component{ {this.props.modaltype===undefined||this.props.modaltype===2||this.props.modaltype===4 || !course_groups || course_groups.length == 0 || this.props.usingCheckBeforePost ?"":
- {exercise_questions.q_position}、{type[item.question_type]}({item.question_score}分)
+ {item.q_position}、{type[item.question_type]}({item.question_score}分)
{
// 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮
diff --git a/public/react/src/modules/courses/exercise/question/fillEmpty.js b/public/react/src/modules/courses/exercise/question/fillEmpty.js
index 030dec7e8..b5e8d62b5 100644
--- a/public/react/src/modules/courses/exercise/question/fillEmpty.js
+++ b/public/react/src/modules/courses/exercise/question/fillEmpty.js
@@ -65,7 +65,7 @@ class fillEmpty extends Component{
if(array[i].value ==""){ count++; }
}
let k = count==array.length ? 0 : 1;
- this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.question_number)-1,k);
+ this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.q_position)-1,k);
}
}).catch((error)=>{
console.log(error);
@@ -115,11 +115,11 @@ class fillEmpty extends Component{
: