diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index c2930bcdf..09cfdf947 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -1246,43 +1246,43 @@ class Studentshavecompletedthelist extends Component { this.Generatenewdatas(response.data.exercise_users); if (response.data.exercise_types.subjective === 0) { if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) { - this.state.columnss.map((item,key)=>{ + var arr =[]; + for(var i=0;i{ + var arr =[]; + for(var i=0;i{ + var arr =[]; + for(var i=0;i{ + else{ + arr.push(item); + } + } + + var arr2 =[]; + for(var i=0;i{ + + var arr =[]; + for(var i=0;i{ - if(item.title==="客观题得分"){ - this.state.columns.splice(key,1) + else{ + arr.push(item); } - if(item.title==="主观题得分"){ - this.state.columns.splice(key,1) + } + var arr2 =[]; + for(var i=0;i{ + + var arr =[]; + for(var i=0;i{ + else{ + arr.push(item); + } + } + + var arr2 =[]; + for(var i=0;i{ + // this.state.columnsys.map((item,key)=>{ + // + // }) + var arr =[]; + for(var i=0;i{ + + var arr =[]; + for(var i=0;i 0) { //显示分班 //8ge - this.state.columnsys.map((item,key)=>{ + + var arr =[]; + for(var i=0;i{ + var arr =[]; + for(var i=0;i 0) { - this.state.columnsys.map((item,key)=>{ - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnsys.splice(key,1) - } + var arr =[]; + for(var i=0;i{ + var arr =[]; + for(var i=0;i{ + var arr =[]; + for(var i=0;i{ + for(var i=0;i< this.state.columns.length;i++){ + var item = this.state.columns[i]; if(item.title==="分班"){ - columns.splice(key,1) } - if(item.title==="关卡得分"){ - columns.splice(key,1) + else if(item.title==="关卡得分"){ } - if(item.title==="效率分"){ - columns.splice(key,1) + else if(item.title==="效率分"){ } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) + } + + }else{ if(course_group_info.length < 2){ - - columns.map((item,key)=>{ + for(var i=0;i< this.state.columns.length;i++){ + var item = this.state.columns[i]; if(item.title==="分班"){ - columns.splice(key,1) } - if(item.title==="关卡得分"){ - columns.splice(key,1) + else if(item.title==="关卡得分"){ } - if(item.title==="效率分"){ - columns.splice(key,1) + else if(item.title==="效率分"){ } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) - }else { + } - columns.map((item,key)=>{ - if(item.title==="关卡得分"){ - columns.splice(key,1) + }else { + for(var i=0;i< this.state.columns.length;i++){ + var item = this.state.columns[i]; + if(item.title==="关卡得分"){ } - if(item.title==="效率分"){ - columns.splice(key,1) + else if(item.title==="效率分"){ } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) + } } } }else { if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){ - columns.map((item,key)=>{ - if(item.title==="分班"){ - columns.splice(key,1) + + for(var i=0;i< this.state.columns.length;i++){ + var item = this.state.columns[i]; + if(item.title==="分班"){ } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) + } + + + + }else { if(course_group_info.length < 2) { - - columns.map((item,key)=>{ + for(var i=0;i< this.state.columns.length;i++){ + var item = this.state.columns[i]; if(item.title==="分班"){ - columns.splice(key,1) } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) + } } columns=this.state.columnss; } diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 2974bf6ac..cac639d13 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -391,16 +391,16 @@ class Listofworksstudentone extends Component { let datalist = []; let datalists = []; var styletable = {"display": "none"} + var arr =[]; + for(var i=0;i{ - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columns.splice(key,1) - } + }else{ + arr.push(item); } - }) - let columns2=this.state.columns; - + } + let columns2= arr; var teacherlist = undefined; var teacherlists = undefined; if (teacherdata !== undefined) { @@ -509,14 +509,18 @@ class Listofworksstudentone extends Component { // 设置数据 seacthdata = (teacherdata) => { let datalist = []; - this.state.columns.map((item,key)=>{ - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columns.splice(key,1) - } + + + var arr =[]; + for(var i=0;i设置 {/*导出成绩*/} - {this.props.isAdmin() ? 导出 : ""} + + {this.props.isAdmin() ?
  • + 导出 + +
  • : ""} {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? 立即截止:"" : ""} {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 393dbc023..2fe5df943 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -185,27 +185,44 @@ class LoginRegisterComponent extends Component { }; loginInputonChange = (e) => { // console.log(e.target.value); + var stirngt; + if(e.target.value.length>0){ + var str= e.target.value.replace(/\s*/g,"") + stirngt=str; + }else{ + stirngt= e.target.value; + } this.setState({ - login: e.target.value, + login: stirngt, }) - - } loginInputonChanges = (e) => { // console.log(e.target.value); + var stirngt; + if(e.target.value.length>0){ + var str= e.target.value.replace(/\s*/g,"") + stirngt=str; + }else{ + stirngt= e.target.value; + } this.setState({ - password: e.target.value, + password: stirngt, }) - } loginInputonChangess = (e) => { // console.log(e.target.value); + var stirngt; + if(e.target.value.length>0){ + var str= e.target.value.replace(/\s*/g,"") + stirngt=str; + }else{ + stirngt= e.target.value; + } this.setState({ - passwords: e.target.value, + passwords: stirngt, }) - } //获取code codesonChange = (e) => { @@ -380,12 +397,12 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotco && Phonenumberisnotco != "" ?

    - {Phonenumberisnotco} + {Phonenumberisnotco}

    :
    } diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 9d7790ee1..12afd7831 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -468,11 +468,17 @@ class LoginRegisterComponent extends Component { //获取登入 loginInputonChange = (e) => { // console.log(e.target.value); + var stirngt; + if(e.target.value.length>0){ + var str= e.target.value.replace(/\s*/g,"") + stirngt=str; + }else{ + stirngt= e.target.value; + } this.setState({ - login: e.target.value, + login: stirngt, }) - } //失去焦点判断 inputOnBlur = (e, id) => { @@ -482,23 +488,48 @@ class LoginRegisterComponent extends Component { //获取登入密码 passwordonChange = (e) => { // console.log(e.target.value); + var stirngt; + if(e.target.value.length>0){ + var str= e.target.value.replace(/\s*/g,"") + stirngt=str; + }else{ + stirngt= e.target.value; + } this.setState({ - password: e.target.value + password: stirngt, }) + // this.setState({ + // password: e.target.value + // }) } //获取注册登入 loginInputonChanges = (e) => { // console.log(e.target.value); + + var stirngt; + if(e.target.value.length>0){ + var str= e.target.value.replace(/\s*/g,"") + stirngt=str; + }else{ + stirngt= e.target.value; + } this.setState({ - logins: e.target.value, + logins: stirngt, }) } //获取注册密码 passwordonChanges = (e) => { // console.log(e.target.value); + var stirngt; + if(e.target.value.length>0){ + var str= e.target.value.replace(/\s*/g,"") + stirngt=str; + }else{ + stirngt= e.target.value; + } this.setState({ - passwords: e.target.value + passwords: stirngt, }) } //获取code @@ -527,6 +558,12 @@ class LoginRegisterComponent extends Component { // this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) } + loginonkeyup =(e)=>{ + if(e.keyCode==32){ + + return false; + } + } render() { const { activeKey, @@ -612,7 +649,7 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotco && Phonenumberisnotco != "" ?

    - {Phonenumberisnotco} + {Phonenumberisnotco}

    :
    } @@ -669,14 +706,14 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotcos && Phonenumberisnotcos != "" ?

    - {Phonenumberisnotcos} + {Phonenumberisnotcos}

    :
    }