diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index a08225c1f..0222907d3 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -287,7 +287,7 @@ class BoardsNew extends Component{ const isAdmin = this.props.isAdmin() const courseId=this.props.match.params.coursesId; const boardId = this.props.match.params.boardId - + const isCourseEnd = this.props.isCourseEnd() return(
{menu} { - isAdmin && + isAdmin && !isCourseEnd &&
this.refs['addDirModal'].open()}> diff --git a/public/react/src/modules/courses/boards/index.js b/public/react/src/modules/courses/boards/index.js index a4a3ed632..6d1c402ce 100644 --- a/public/react/src/modules/courses/boards/index.js +++ b/public/react/src/modules/courses/boards/index.js @@ -51,10 +51,7 @@ class Boards extends Component{ const sort_type = this.state.sort_type // page_size const url = `/boards/${bid}/messages.json?page_size=15&search=${_serachText || ''}&page=${_page}&sort=0&sort_type=${sort_type}` - axios.get(url, { - - }) - .then((response) => { + axios.get(encodeURI(url)).then((response) => { if (response.data.status == 0 && response.data.data) { let _newBoards = response.data.data.messages // if (_page > 1) { @@ -391,7 +388,7 @@ class Boards extends Component{ return
  • this.moveTo(item)} title={item.name}>{item.name}
  • }) } - { isAdmin && + { isAdmin && !isCourseEnd &&

    this.addDir()} diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index 9f98b9294..584965039 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -124,7 +124,7 @@ class commonWork extends Component{ if(search!=""){ url+="&search="+search; } - axios.get((url)).then((result)=>{ + axios.get(encodeURI(url)).then((result)=>{ if(result.status==200){ this.setState({ mainList:result.data, diff --git a/public/react/src/modules/courses/members/modal/AddStudentModal.js b/public/react/src/modules/courses/members/modal/AddStudentModal.js index cf7583a51..9113ba6ab 100644 --- a/public/react/src/modules/courses/members/modal/AddStudentModal.js +++ b/public/react/src/modules/courses/members/modal/AddStudentModal.js @@ -80,8 +80,9 @@ class AddStudentModal extends Component{ } setVisible = (visible) => { if (visible) { - this.setState({school_name: this.props.user.user_school}) - this.fetchMemberList() + this.setState({school_name: this.props.user.user_school},()=>{ + this.fetchMemberList(); + }) this.fetchOptions() } this.refs.modalWrapper.setVisible(visible) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 46e6ad77d..47d387e5d 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -324,7 +324,7 @@ class studentsList extends Component{ if(!!searchValue){ url+='&search='+searchValue; } - axios.get((url)).then((result)=>{ + axios.get(encodeURI(url)).then((result)=>{ if (result.data.students) { this.setState({ students: result.data.students, @@ -675,7 +675,7 @@ class studentsList extends Component{ ) }) } { course_groups && course_groups.length > 0 && } - { isAdmin && + { isAdmin && !isCourseEnd &&

    { + axios.get(encodeURI(url)).then((result)=>{ if(result.status===200){ this.setState({ ChooseShixunList:result.data, @@ -369,7 +369,7 @@ class DetailCardsEditAndEdit extends Component{ if(type!=0){ url+="&type="+type; } - axios.get(url).then((result)=>{ + axios.get(encodeURI(url)).then((result)=>{ if(result.status===200){ let list =result.data.shixun_list;