diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 7cb7ee800..6ffe277a3 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -692,7 +692,7 @@ class PollsController < ApplicationController else unified_setting = @poll.unified_setting end - show_result = params[:show_result] ? 1 : 0 + show_result = params[:show_result].to_i un_anonymous = params[:un_anonymous] ? true : false # 统一设置或者分班为0,则更新问卷,并删除问卷分组 if unified_setting || (course_group_ids.size == 0) diff --git a/app/views/users/_user.json.jbuilder b/app/views/users/_user.json.jbuilder index 4fb05b7ba..581072072 100644 --- a/app/views/users/_user.json.jbuilder +++ b/app/views/users/_user.json.jbuilder @@ -4,5 +4,5 @@ json.name user.full_name json.grade user.grade json.identity user&.user_extension&.identity # json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开 -json.image_url image_tag(url_to_avatar(user)) +json.image_url url_to_avatar(user) json.school user.school_name \ No newline at end of file diff --git a/app/views/users/homepage_info.json.jbuilder b/app/views/users/homepage_info.json.jbuilder index 78e0e1d7b..112bd215c 100644 --- a/app/views/users/homepage_info.json.jbuilder +++ b/app/views/users/homepage_info.json.jbuilder @@ -1,6 +1,6 @@ json.id @user.id json.name @user.full_name -json.avatar_url image_tag("/" + url_to_avatar(@user)) +json.avatar_url url_to_avatar(@user) json.is_logged_user @user.logged_user? json.experience @user.experience json.grade @user.grade diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 41768333a..7c697e31b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -285,7 +285,7 @@ class GraduationTasksSubmitedit extends Component{ let{ search,page,limit,workslist}=this.state; - let newpage=page+2 + let newpage=page+1 this.searchList(search,newpage,limit,workslist.task_id,1) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index be29d45a4..7438b36a4 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -271,20 +271,27 @@ class GraduationTasksSubmitnew extends Component{ contentViewScroll=(e)=>{ - //滑动到底判断 + + + //滑动到底判断 + const {memberslist} = this.state; let newscrollTop=parseInt(e.currentTarget.scrollTop); let allclientHeight=e.currentTarget.clientHeight+newscrollTop; - if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){ - // console.log("到达底部"); - let{ search,page,limit }=this.state; + if(memberslist.length===0){ + return; + }else{ + let{ search,page,limit }=this.state; - let newpage=page+2 + let newpage=page+1 + + this.searchList(search,newpage,limit,1) + + } + } - this.searchList(search,newpage,limit,1) - } } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 3adf9c06e..02bd222a8 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -80,6 +80,8 @@ class GraduationTaskssettingapp extends Component{ starttime:undefined, DownloadType:false, DownloadMessageval:undefined, + commentstatustype:undefined, + commenttimeone:undefined } } @@ -102,10 +104,10 @@ class GraduationTaskssettingapp extends Component{ } let starttype=false; let endtype=false; - if(moment(result.data.publish_time){ - let {latetime,end_time,allowlate}=this.state; + let {latetime,end_time,allowlate,commenttime,commenttimeone}=this.state; + let commenttimetype=commenttime===null||commenttime===""; + let newlatetimea=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm"); let newcommenttimea=moment(new Date()).format("YYYY-MM-DD HH:mm"); @@ -377,26 +385,33 @@ class GraduationTaskssettingapp extends Component{ let newend_timed=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm"); let newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm"); - let newtime; if(e.target.checked===true){ - - if(allowlate===1||allowlate===true){ - if(latetime===null||latetime===""){ - this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea) - }else{ - this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes) - } - }else{ - if(end_time===null||end_time===""){ - this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb) + if(commenttimetype===true){ + + if(allowlate===1||allowlate===true){ + if(latetime===null||latetime===""){ + this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea) + }else{ + this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes) + } + }else{ + if(end_time===null||end_time===""){ + this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb) + }else{ + this.updatesfuncrosscomment(2,newend_timed,newcommenttimed) + } + } }else{ - this.updatesfuncrosscomment(2,newend_timed,newcommenttimed) - } - } + this.setState({ + crosscomment:e.target.checked, + commenttime:commenttimeone, + }) + } + }else{ this.setState({ crosscomment:e.target.checked, - commenttime:undefined + commenttime:undefined }) } } @@ -519,7 +534,7 @@ class GraduationTaskssettingapp extends Component{ } - if(moment(end_time)评分设置
最终成绩组成 (取各教师最终评分的平均分)
启用交叉评阅 (给老师分配其他指导老师的学生作品) + disabled={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?true:false:true:true} >启用交叉评阅 (给老师分配其他指导老师的学生作品) {crosscomment===true?
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 20a34ab89..0469d5d9c 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -850,47 +850,47 @@ class GraduationTaskssettinglist extends Component{ ), }, { - title: '操作', - key: 'operation', - width:'100px', - dataIndex: 'operation', - className:'edu-txt-center', - render: operation => ( -
- {this.props.isAdmin()?operation.map((tag,key) => { - return( - - { - tag.name && - 调整学生最终成绩
其它历史评分将全部失效:""}> - {tag.name==="评阅"? - {tag.name} - - : - this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> - {tag.name} - - } -
- } -
- ) - }):""} - { - this.props.isStudent()? - operation.map((tag,key) => { - return( -
- {tag.view_work===false?"--":查看} -
- )} - ):"" - } -
+ title: '操作', + key: 'operation', + width:'100px', + dataIndex: 'operation', + className:'edu-txt-center', + render: operation => ( +
+ {this.props.isAdmin()?operation.map((tag,key) => { + return( + + { + tag.name && + 调整学生最终成绩
其它历史评分将全部失效:""}> + {tag.name==="评阅"? + {tag.name} + + : + this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> + {tag.name} + + } +
+ } +
+ ) + }):""} + { + this.props.isStudent()? + operation.map((tag,key) => { + return( +
+ {tag.view_work===false?"--":查看} +
+ )} + ):"" + } +
- ), - }]; + ), + }]; let courseId=this.props.match.params.coursesId; let position=this.props.match.params.position; @@ -972,7 +972,7 @@ class GraduationTaskssettinglist extends Component{ text-overflow: ellipsis; white-space: nowrap; } - .ant-table-tbody>tr>td, .ant-table-thead>tr>th{ + .ant-table-tbody>tr>td, .ant-table-thead>tr>th{ padding: 16px 10px } diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 2b06936cf..366f239d0 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1717,6 +1717,19 @@ class Trainingjobsetting extends Component { unifiedsetting:this.state.unifiedsetting, latedeductiontwo:20, }); + //均分比例 + try { + if(this.state.proportion==="均分比例"){ + this.Equalproportion(20); + + }else if(this.state.proportion==="经验值比例"){ + this.Empiricalvalueratio(20); + + } + }catch (e) { + + } + }else { this.setState({ flagPageEditsbox:true,