diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 1d03004ab..1430b8c5d 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -834,7 +834,7 @@ class CoursesIndex extends Component{ } > {/*修改精品课堂*/} - () } diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 356cd84cf..961984341 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -353,17 +353,17 @@ class CoursesBanner extends Component { window.location.href = "/courses/" + this.props.match.params.coursesId + "/settings"; }; postsettingstwo=()=>{ - var ids =1; - try { - if(this.state.coursedata.is_public){ - ids=1; - }else { - ids=0; - } - }catch (e) { - - } - window.location.href = `/courses/${this.props.match.params.coursesId}/newgolds/settings/${ids}`; + // var ids =1; + // try { + // if(this.state.coursedata.is_public){ + // ids=1; + // }else { + // ids=0; + // } + // }catch (e) { + // + // } + window.location.href = `/courses/${this.props.match.params.coursesId}/newgolds/settings`; }; diff --git a/public/react/src/modules/courses/elearning/Elearning.js b/public/react/src/modules/courses/elearning/Elearning.js index 4923535af..4f55fb178 100644 --- a/public/react/src/modules/courses/elearning/Elearning.js +++ b/public/react/src/modules/courses/elearning/Elearning.js @@ -208,7 +208,7 @@ class Elearning extends Component{ }) } render(){ - let{description,whethertoedit,isSpin,start_learning,hidestartshixunsreplacevalues,learned,last_shixun} =this.state; + let{description,whethertoedit,isSpin,start_learning,hidestartshixunsreplacevalues,learned,last_shixun,stages} =this.state; const isNotMembers=this.props.isNotMember();//非课堂成员 const antIcon = ; return( @@ -305,11 +305,22 @@ class Elearning extends Component{
-
- {/*开始学习*/} - this.Startlearningtwo()} Myreload={()=>this.Myreload()} > -
+ { + stages===undefined||stages===JSON.stringify("[]")||stages.length===0? +
+ +
+
+

暂时还没有相关数据哦!

+
+
: +
+ {/*开始学习*/} + this.Startlearningtwo()} Myreload={()=>this.Myreload()} > +
+ }
diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index c279fb83b..6bda01cba 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -34,6 +34,7 @@ class Testpapersettinghomepage extends Component{ DownloadType:false, DownloadMessageval:undefined, donwloading:false, + exercise_status:3, } } //切换tab @@ -69,7 +70,8 @@ class Testpapersettinghomepage extends Component{ if(response.status === 200){ this.setState({ Commonheadofthetestpaper:response.data, - current_status:response.data.user_permission.current_status + current_status:response.data.user_permission.current_status, + exercise_status:response.data.exercise_status, }) // console.log(JSON.stringify(response.data.show_statistic)); @@ -262,11 +264,13 @@ class Testpapersettinghomepage extends Component{ this.props.history.goBack() } render(){ - let {tab,visible,Commonheadofthetestpaper}=this.state; + let {tab,visible,Commonheadofthetestpaper,exercise_status}=this.state; const isAdmin =this.props.isAdmin(); const isStudent = this.props.isStudent(); // TODO + // console.log(Commonheadofthetestpaper.exercise_status); + return(
{/*this.setgameexercise(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${this.props.current_user.login}`)}>开始答题: - {Commonheadofthetestpaper && Commonheadofthetestpaper.exercise_status===3?"":Commonheadofthetestpaper && Commonheadofthetestpaper.exercise_status===4?"":start_Value[Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status]} + {exercise_status===2?"":exercise_status===3?"":exercise_status===4?"":start_Value[exercise_status]} :""} diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index d2ee8d61a..d72ccc486 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -130,7 +130,7 @@ class Goldsubject extends Component { this.setState({ datatimetwo: data.start_date === undefined ? "" : moment(data.start_date, dateFormat), datatime: data.end_date === undefined ? "" : moment(data.end_date, dateFormat), - is_public: this.props.match.params.id, + is_public: data.is_public, Realnamecertification: data.authentication, Professionalcertification:data.professional_certification, name: data.name, @@ -308,7 +308,7 @@ class Goldsubject extends Component { credit: parseFloat(values.credit), start_date:values.starttime, end_date: values.endtime, - is_public: is_public, //这是也是带过来的值 + is_public: this.state.is_public, //这是也是带过来的值 course_module_types: values.checkboxgroup, school:values.school } diff --git a/public/react/src/modules/courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js index 9400341e4..a141db961 100644 --- a/public/react/src/modules/courses/poll/PollDetailIndex.js +++ b/public/react/src/modules/courses/poll/PollDetailIndex.js @@ -30,6 +30,7 @@ class PollDetailIndex extends Component{ user_permission:undefined, DownloadType:false, DownloadMessageval:undefined, + polls_status:3, } } @@ -41,7 +42,8 @@ class PollDetailIndex extends Component{ if(result.status==200){ this.setState({ pollDetail:result.data, - user_permission:result.data.user_permission + user_permission:result.data.user_permission, + polls_status:result.data.polls_status, }) } }).catch((error)=>{ @@ -109,7 +111,7 @@ class PollDetailIndex extends Component{ }) } render(){ - let {tab,pollDetail,user_permission}=this.state; + let {tab,pollDetail,user_permission,polls_status}=this.state; const { current_user } = this.props; const isAdmin =this.props.isAdmin(); const isStudent = this.props.isStudent(); @@ -207,7 +209,7 @@ class PollDetailIndex extends Component{ user_permission && user_permission.current_status!=3 ? { user_permission && user_permission.current_status ==0 ? "继续答题" : user_permission.current_status == 1 ? - (pollDetail && pollDetail.polls_status===3?"":pollDetail && pollDetail.polls_status===4?"":"查看答题") + (polls_status===2?"":polls_status===3?"":polls_status===4?"":"查看答题") : "开始答题" } :""