Merge branches 'dev_aliyun' and 'newopenshixun0316' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
杨树明 5 years ago
commit be36987708

@ -14,9 +14,9 @@ function CommonWorkAppraiseReviseAttachments(props) {
}
`}</style>
<div className={"color-grey-6 mb10 font-16"}>
补交附件
补交内容
</div>
{/* {age} */}
<div className={"ml20"}>
@ -47,6 +47,6 @@ function CommonWorkAppraiseReviseAttachments(props) {
</div>}
</React.Fragment>
)
}
export default CommonWorkAppraiseReviseAttachments;

@ -24,7 +24,10 @@ class PublishRightnow extends Component{
Savesname:undefined,
Cancel:undefined,
Saves:undefined,
Topvalright:undefined
Topvalright:undefined,
modallate_time:undefined,
immediatelyopen:false,
starttimeslate_time:undefined
}
}
open = (usingCheckBeforePost) => {
@ -70,6 +73,8 @@ class PublishRightnow extends Component{
Cancel:this.homeworkhide,
Saves:this.homeworkstartend,
typs:showdatatypes ? "start" : "end",
immediatelyopen:true,
modallate_time:showdatatypes?this.state.starttimeslate_time:undefined,
})
}
homeworkhide=()=>{
@ -91,7 +96,9 @@ class PublishRightnow extends Component{
StudentList_value:undefined,
addname:undefined,
addnametype:false,
addnametab:undefined
addnametab:undefined,
modallate_time:undefined,
immediatelyopen:false
})
}
@ -187,6 +194,7 @@ class PublishRightnow extends Component{
this.setState({
course_groups: response.data.course_groups,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
starttimeslate_time:response.data.late_time===undefined||response.data.late_time===null||response.data.late_time===""?undefined:response.data.late_time,
})
})
.catch(function (error) {
@ -260,6 +268,8 @@ class PublishRightnow extends Component{
starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs}
immediatelyopen={this.state.immediatelyopen}
modallate_time={this.state.starttimeslate_time}
/>:""}
{ showActionButton && <a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>{ showdatatypes ? "立即发布" : "立即截止" }</a> }
</div>

@ -35,7 +35,10 @@ class OneSelfOrderModal extends Component{
group_ids:[],
endtime:"",
course_groups:undefined,
Checkboxtype:true
Checkboxtype:true,
endtimetypevalue:undefined,
endtimetypeid:undefined,
endtimetypename:undefined
}
}
componentDidMount() {
@ -202,29 +205,35 @@ class OneSelfOrderModal extends Component{
}
propsSaves=(ds,endtime)=>{
this.setState({
endtimetype:false
})
let {course_groups}=this.state;
if(this.props.typs=="end"){
this.props.Saves()
}else{
if(this.props.typs!="end"){
if(!endtime){
this.setState({
endtimetype:true,
endtimetypevalue:"截止时间不能为空"
})
return
}
if(moment(endtime,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){
this.setState({
endtimetype:true,
endtimetypevalue:"必须晚于当前时间"
})
return
if(!this.props.immediatelyopen){
if(this.props.typs!="end"){
if(!endtime){
this.setState({
endtimetype:true,
endtimetypevalue:"截止时间不能为空"
})
return
}
if(moment(endtime,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){
this.setState({
endtimetype:true,
endtimetypevalue:"必须晚于当前时间"
})
return
}
}
}
let type=false
if(course_groups===undefined||course_groups.length===0){
this.props.Saves(ds,moment(handleDateString(endtime),"YYYY-MM-DD HH:mm").format("YYYY-MM-DD HH:mm"))
@ -238,6 +247,7 @@ class OneSelfOrderModal extends Component{
this.setState({
endtimetype:true,
endtimetypeid:items.id,
endtimetypename:items.name,
endtimetypevalue:"截止时间不能为空"
})
return
@ -245,12 +255,29 @@ class OneSelfOrderModal extends Component{
// arr.push(moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"))
}else{
if(moment(items.end_time,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){
type=true
this.setState({
endtimetype:true,
endtimetypevalue:"必须晚于当前时间"
endtimetypeid:items.id,
endtimetypename:items.name,
endtimetypevalue:"截止时间必须晚于当前时间"
})
return
}
if(this.props.modallate_time){
if(moment(items.end_time,"YYYY-MM-DD HH:mm") >= moment(this.props.modallate_time,"YYYY-MM-DD HH:mm")){
type=true
this.setState({
endtimetype:true,
endtimetypeid:items.id,
endtimetypename:items.name,
endtimetypevalue:"截止时间必须晚于补交结束时间"
})
return
}
}
arr.push(handleDateString(items.end_time))
}
}

@ -295,10 +295,10 @@ class Studentshavecompletedthelist extends Component {
)
},
{
title:<span>最终成绩<Tooltip placement="top" visible={true} title={<pre>
title:<span>最终成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/>
看得分明细<br/>
</pre>}></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -340,6 +340,22 @@ class Studentshavecompletedthelist extends Component {
}}>{record.efficiencyscore}</span>
</Tooltip>
:
<Tooltip placement="right" title={<div>
<div>{record.objective_score===undefined?"":record.objective_score === "--" ? <span>客观题得分0</span> :
<span>客观题得分{record.objective_score}</span>}
</div>
<div>{record.subjective_score===undefined?"":record.subjective_score === "--" ? <span>主观题得分0</span> :
<span>主观题得分{record.subjective_score}</span>}
</div>
<div>{record.efficiencyscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.efficiencyscore}</span>}
</div>
</div>
}>
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center"
@ -353,6 +369,7 @@ class Studentshavecompletedthelist extends Component {
color: '#747A7F',
textAlign: "center"
}}>{record.efficiencyscore}</span>
</Tooltip>
}
</span>
)
@ -590,10 +607,10 @@ class Studentshavecompletedthelist extends Component {
)
},
{
title:<span>最终成绩<Tooltip placement="top" visible={true} title={<pre>
title:<span>最终成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/>
看得分明细<br/>
</pre>}></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -637,6 +654,22 @@ class Studentshavecompletedthelist extends Component {
}}>{record.efficiencyscore}</span>
</Tooltip>
:
<Tooltip placement="right" title={<div>
<div>{record.objective_score===undefined?"":record.objective_score === "--" ? <span>客观题得分0</span> :
<span>客观题得分{record.objective_score}</span>}
</div>
<div>{record.subjective_score===undefined?"":record.subjective_score === "--" ? <span>主观题得分0</span> :
<span>主观题得分{record.subjective_score}</span>}
</div>
<div>{record.efficiencyscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.efficiencyscore}</span>}
</div>
</div>
}>
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
@ -654,6 +687,7 @@ class Studentshavecompletedthelist extends Component {
textAlign: "center",
width:"199px"
}}>{record.efficiencyscore}</span>
</Tooltip>
}
</span>
@ -877,10 +911,10 @@ class Studentshavecompletedthelist extends Component {
)
},
{
title: <span>最终成绩<Tooltip placement="top" visible={true} title={<pre>
title: <span>最终成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/>
看得分明细<br/>
</pre>}></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -918,6 +952,22 @@ class Studentshavecompletedthelist extends Component {
}}>{record.efficiencyscore}</span>
</Tooltip>
:
<Tooltip placement="right" title={<div>
<div>{record.objective_score===undefined?"":record.objective_score === "--" ? <span>客观题得分0</span> :
<span>客观题得分{record.objective_score}</span>}
</div>
<div>{record.subjective_score===undefined?"":record.subjective_score === "--" ? <span>主观题得分0</span> :
<span>主观题得分{record.subjective_score}</span>}
</div>
<div>{record.efficiencyscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.efficiencyscore}</span>}
</div>
</div>
}>
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
@ -931,6 +981,7 @@ class Studentshavecompletedthelist extends Component {
color: '#747A7F',
textAlign: "center",
}}>{record.efficiencyscore}</span>
</Tooltip>
}
</span>
)
@ -1104,10 +1155,10 @@ class Studentshavecompletedthelist extends Component {
)
},
{
title: <span>最终成绩<Tooltip placement="top" visible={true} title={<pre>
title: <span>最终成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/>
看得分明细<br/>
</pre>}></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -1144,6 +1195,22 @@ class Studentshavecompletedthelist extends Component {
}}>{record.efficiencyscore}</span>
</Tooltip>
:
<Tooltip placement="right" title={<div>
<div>{record.objective_score===undefined?"":record.objective_score === "--" ? <span>客观题得分0</span> :
<span>客观题得分{record.objective_score}</span>}
</div>
<div>{record.subjective_score===undefined?"":record.subjective_score === "--" ? <span>主观题得分0</span> :
<span>主观题得分{record.subjective_score}</span>}
</div>
<div>{record.efficiencyscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.efficiencyscore}</span>}
</div>
</div>
}>
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
@ -1157,6 +1224,7 @@ class Studentshavecompletedthelist extends Component {
color: '#747A7F',
textAlign: "center",
}}>{record.efficiencyscore}</span>
</Tooltip>
}
</span>
)
@ -1511,6 +1579,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
operating: "评阅",
commit_method:exercise_users[i].commit_method,
})
@ -1527,6 +1597,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
operating: "--",
commit_method:exercise_users[i].commit_method
})
@ -1552,6 +1624,8 @@ class Studentshavecompletedthelist extends Component {
submitstate: current_answer_user.commit_status === 1 ? "已提交" : "未提交",
updatetime: moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm'),
efficiencyscore: current_answer_user.score === undefined ? "--" : current_answer_user.score === null ? "--" : current_answer_user.score === "" ? "--" : current_answer_user.score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
review_status: current_answer_user.review_status,
completion: current_answer_user.objective_score === undefined ? "--" : current_answer_user.objective_score === null ? "--" : current_answer_user.objective_score === "" ? "--" : current_answer_user.objective_score,
levelscore: current_answer_user.subjective_score === undefined ? "--" : current_answer_user.subjective_score === null ? "--" : current_answer_user.subjective_score === "" ? "--" : current_answer_user.subjective_score,
@ -1594,6 +1668,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
operating: "查看",
commit_method:exercise_users[i].commit_method,
})
@ -1739,6 +1815,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
finalscore: "评阅",
user_id: exercise_users[i].user_id,
commit_method:exercise_users[i].commit_method
@ -1756,6 +1834,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
finalscore: "--",
user_id: exercise_users[i].user_id,
commit_method:exercise_users[i].commit_method

@ -353,7 +353,7 @@ class PollDetailTabForthRules extends Component{
render(){
let {rules,course_group,flagPageEdit}=this.state
let isAdmin=this.props.isAdmin();
console.log(flagPageEdit)
// console.log(flagPageEdit)
return(
<div className="bor-top-greyE pt20">
<p className="clearfix mb10">

@ -1204,10 +1204,10 @@ class Listofworksstudentone extends Component {
)
},
{
title: <span>当前成绩<Tooltip placement="top" visible={true} title={<pre>
title: <span>当前成绩<Tooltip placement="top"title={<pre>
鼠标停留具体分值上可查<br/>
看得分明细<br/>
</pre>}></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'work_score',
key: 'work_score',
align: 'center',
@ -1572,10 +1572,10 @@ class Listofworksstudentone extends Component {
)
},
{
title: <span>当前成绩<Tooltip placement="top" visible={true} title={<pre>
title: <span>当前成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/>
看得分明细<br/>
</pre>}></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'work_score',
key: 'work_score',
align: 'center',

@ -135,6 +135,8 @@ class Trainingjobsetting extends Component {
borredszfls:'',
total_scoretwo:0,
total_score:0,
immediatelyopen:false,
modallate_time:undefined
}
// console.log("获取到的值")
// console.log("Trainingjobsetting")
@ -1757,7 +1759,9 @@ class Trainingjobsetting extends Component {
Savesname: "立即发布",
Cancel: this.homeworkhide,
Saves: this.homeworkstartend,
course_groups: response.data.course_groups,
course_groups:response.data.course_groups,
immediatelyopen:true,
modallate_time:response.data.late_time,
})
}
}).catch((error) => {
@ -1799,6 +1803,7 @@ class Trainingjobsetting extends Component {
}
// 立即发布
homeworkstartend = (ds, endtime) => {
debugger
var homeworkid = this.props.match.params.homeworkid;
let data = {}
@ -1914,6 +1919,8 @@ class Trainingjobsetting extends Component {
typs: undefined,
starttimes: undefined,
starttimesend: undefined,
immediatelyopen:false,
modallate_time:undefined,
})
}
cancelBox = () => {
@ -2401,6 +2408,8 @@ class Trainingjobsetting extends Component {
starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs}
immediatelyopen={this.state.immediatelyopen}
modallate_time={this.state.modallate_time}
/> : ""}
<Modals

@ -13,6 +13,7 @@ class AccountImg extends Component {
<ChangeHeaderPicModal
{...this.props} ref="picModal" imageSrc={picUrl} userLogin={this.props.current_user ? this.props.current_user.login : '' }></ChangeHeaderPicModal>
<style>{`
/*
.headphoto {
text-align: center;
@ -26,11 +27,13 @@ class AccountImg extends Component {
margin-top: 19px;
box-sizing: border-box;
}
.headphoto img {
width: 109px;
border-radius: 50%;
height: 109px;
}
.headphoto-black {
display: none;
cursor: pointer;
@ -45,9 +48,11 @@ class AccountImg extends Component {
background-color: rgba(0,0,0,0.3);
color: #fff;
} */
.headphoto:hover .headphoto-black {
display: block;
}
.newheadphotoblack{
position: absolute;
top: 49px;
@ -59,9 +64,17 @@ class AccountImg extends Component {
line-height:23px;
background: rgba(76,172,255,0.7);
}
.borderradiusbox{
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
`}</style>
<img alt="头像" id="user_avatar_show" nhname="avatar_image" src={`${picUrl}`}></img>
<p className="newheadphotoblack" onClick={this.editImg} >修改头像</p>
<img alt="头像" id="user_avatar_show" nhname="avatar_image" className={"xiaoshou"} src={`${picUrl}`} onClick={this.editImg} ></img>
<div className="newheadphotoblack xiaoshou borderradiusbox" onClick={this.editImg} >修改头像</div>
</div>
);
}

Loading…
Cancel
Save