|
|
|
@ -117,12 +117,12 @@ class ShixunHomeworkPage extends Component {
|
|
|
|
|
/// 重做的确认
|
|
|
|
|
ModalSaves=()=>{
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
ModalsType:false,
|
|
|
|
|
Modalstopval:""
|
|
|
|
|
});
|
|
|
|
|
this.setState({
|
|
|
|
|
ModalsType:false,
|
|
|
|
|
Modalstopval:""
|
|
|
|
|
});
|
|
|
|
|
if(this.state.teacherdatapage){
|
|
|
|
|
this.resetshixunCombat(this.state.teacherdatapage.myshixun_identifier);
|
|
|
|
|
this.resetshixunCombat(this.state.teacherdatapage.myshixun_identifier);
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
console.log("this.child");
|
|
|
|
@ -149,29 +149,29 @@ class ShixunHomeworkPage extends Component {
|
|
|
|
|
}
|
|
|
|
|
//重置按钮
|
|
|
|
|
resetshixunCombat=(id)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
mylistisSpin:true,
|
|
|
|
|
this.setState({
|
|
|
|
|
mylistisSpin:true,
|
|
|
|
|
})
|
|
|
|
|
let zrl=`/myshixuns/${id}/reset_my_game.json`;
|
|
|
|
|
axios.get(zrl).then((response) => {
|
|
|
|
|
// window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges";
|
|
|
|
|
this.setState({
|
|
|
|
|
mylistisSpin:false,
|
|
|
|
|
})
|
|
|
|
|
this.child.Isupdatass();
|
|
|
|
|
this.props.showNotification("已清空本实训的学习记录\n" +
|
|
|
|
|
"\n" +
|
|
|
|
|
"请点击“开启挑战”重做实训作业");
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
mylistisSpin:false,
|
|
|
|
|
})
|
|
|
|
|
let zrl=`/myshixuns/${id}/reset_my_game.json`;
|
|
|
|
|
axios.get(zrl).then((response) => {
|
|
|
|
|
// window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges";
|
|
|
|
|
this.setState({
|
|
|
|
|
mylistisSpin:false,
|
|
|
|
|
})
|
|
|
|
|
this.child.Isupdatass();
|
|
|
|
|
this.props.showNotification("已清空本实训的学习记录\n" +
|
|
|
|
|
"\n" +
|
|
|
|
|
"请点击“开启挑战”重做实训作业");
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
mylistisSpin:false,
|
|
|
|
|
})
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
bindRef = ref => { this.child = ref }
|
|
|
|
|
///////////////教师截止
|
|
|
|
|
//编辑作业
|
|
|
|
|
//编辑作业
|
|
|
|
|
Showupdateinstructionsboolfalse (bool) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Showupdateinstructions:bool
|
|
|
|
@ -183,7 +183,7 @@ class ShixunHomeworkPage extends Component {
|
|
|
|
|
Showupdateinstructions:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
gotohome=()=>{
|
|
|
|
|
gotohome=()=>{
|
|
|
|
|
// console.log(this.props)
|
|
|
|
|
let {jobsettingsdatapage}=this.state
|
|
|
|
|
|
|
|
|
@ -194,7 +194,7 @@ class ShixunHomeworkPage extends Component {
|
|
|
|
|
|
|
|
|
|
const isAdmin = this.props.isAdmin();
|
|
|
|
|
// console.log(119)
|
|
|
|
|
// console.log(jobsettingsdatapage);
|
|
|
|
|
// console.log(jobsettingsdatapage);
|
|
|
|
|
document.title=jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name;
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix ">
|
|
|
|
@ -224,34 +224,34 @@ class ShixunHomeworkPage extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div className="educontent mb20">
|
|
|
|
|
<p className=" fl color-black summaryname" style={{heigth: "33px"}}>
|
|
|
|
|
{teacherdatapage === undefined ? "" : teacherdatapage.homework_name}
|
|
|
|
|
</p>
|
|
|
|
|
<CoursesListType
|
|
|
|
|
typelist={teacherdatapage === undefined ? [""] : teacherdatapage.homework_status}
|
|
|
|
|
/>
|
|
|
|
|
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" onClick={()=>this.gotohome()}>返回</a>
|
|
|
|
|
<a className="color-grey-9 fr font-16 mr20"
|
|
|
|
|
href={`/shixuns/${teacherdatapage === undefined ? "" : teacherdatapage.shixun_identifier}/challenges`}
|
|
|
|
|
target={"_blank"}>实训详情</a>
|
|
|
|
|
<div className="educontent mb20">
|
|
|
|
|
<p className=" fl color-black summaryname" style={{heigth: "33px"}}>
|
|
|
|
|
{teacherdatapage === undefined ? "" : teacherdatapage.homework_name}
|
|
|
|
|
</p>
|
|
|
|
|
<CoursesListType
|
|
|
|
|
typelist={teacherdatapage === undefined ? [""] : teacherdatapage.homework_status}
|
|
|
|
|
/>
|
|
|
|
|
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" onClick={()=>this.gotohome()}>返回</a>
|
|
|
|
|
<a className="color-grey-9 fr font-16 mr20"
|
|
|
|
|
href={`/shixuns/${teacherdatapage === undefined ? "" : teacherdatapage.shixun_identifier}/challenges`}
|
|
|
|
|
target={"_blank"}>实训详情</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div className="edu-back-white ">
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE ">
|
|
|
|
|
<div className=" clearfix edu-back-white poll_list">
|
|
|
|
|
<a className={parseInt(tab) === 0 ? "active" : ""} onClick={(e) => this.ChangeTab(0)}>作品列表</a>
|
|
|
|
|
<a className={parseInt(tab) === 1 ? "active" : ""} onClick={(e) => this.ChangeTab(1)}>作业描述</a>
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
this.state.code_review === true || jobsettingsdatapage === undefined ? [""] : jobsettingsdatapage.data.homework_status[0] === "未发布" ? "" :
|
|
|
|
|
<a
|
|
|
|
|
className={parseInt(tab) === 2 ? "active" : ""}
|
|
|
|
|
onClick={(e) => this.ChangeTab(2)}>
|
|
|
|
|
代码查重</a> : ""}
|
|
|
|
|
{parseInt(tab) === 3?
|
|
|
|
|
<style>{this.props.isAdmin()?
|
|
|
|
|
`
|
|
|
|
|
</div>
|
|
|
|
|
<div className="edu-back-white ">
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE ">
|
|
|
|
|
<div className=" clearfix edu-back-white poll_list">
|
|
|
|
|
<a className={parseInt(tab) === 0 ? "active" : ""} onClick={(e) => this.ChangeTab(0)}>作品列表</a>
|
|
|
|
|
<a className={parseInt(tab) === 1 ? "active" : ""} onClick={(e) => this.ChangeTab(1)}>作业描述</a>
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
this.state.code_review === true || jobsettingsdatapage === undefined ? [""] : jobsettingsdatapage.data.homework_status[0] === "未发布" ? "" :
|
|
|
|
|
<a
|
|
|
|
|
className={parseInt(tab) === 2 ? "active" : ""}
|
|
|
|
|
onClick={(e) => this.ChangeTab(2)}>
|
|
|
|
|
代码查重</a> : ""}
|
|
|
|
|
{parseInt(tab) === 3?
|
|
|
|
|
<style>{this.props.isAdmin()?
|
|
|
|
|
`
|
|
|
|
|
.poll_list a.active:after {
|
|
|
|
|
content: '';
|
|
|
|
|
width: 57px;
|
|
|
|
@ -262,17 +262,17 @@ class ShixunHomeworkPage extends Component {
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
`:""
|
|
|
|
|
}</style>
|
|
|
|
|
:""}
|
|
|
|
|
}</style>
|
|
|
|
|
:""}
|
|
|
|
|
|
|
|
|
|
<a className={parseInt(tab) === 3 ? "active" : ""}
|
|
|
|
|
onClick={(e) => this.ChangeTab(3)}
|
|
|
|
|
>{this.props.isAdmin()?"设置":"得分规则"}</a>
|
|
|
|
|
{/*{this.props.isAdmin() ? <a*/}
|
|
|
|
|
{/* className="fr color-blue font-16"*/}
|
|
|
|
|
{/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
|
|
|
|
|
{/*>导出</a> : ""}*/}
|
|
|
|
|
<style>{`
|
|
|
|
|
<a className={parseInt(tab) === 3 ? "active" : ""}
|
|
|
|
|
onClick={(e) => this.ChangeTab(3)}
|
|
|
|
|
>{this.props.isAdmin()?"设置":"得分规则"}</a>
|
|
|
|
|
{/*{this.props.isAdmin() ? <a*/}
|
|
|
|
|
{/* className="fr color-blue font-16"*/}
|
|
|
|
|
{/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
|
|
|
|
|
{/*>导出</a> : ""}*/}
|
|
|
|
|
<style>{`
|
|
|
|
|
.drop_down_menu li a {
|
|
|
|
|
padding: 0px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
@ -288,74 +288,74 @@ class ShixunHomeworkPage extends Component {
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
padding-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`}</style>
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
|
|
|
|
|
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
|
|
|
|
|
{/*<li><a*/}
|
|
|
|
|
{/* onClick={(child,i) => this.confirmysl(this.child,1)}>实训报告</a>*/}
|
|
|
|
|
{/*</li>*/}
|
|
|
|
|
<li><a
|
|
|
|
|
onClick={(child,i) => this.confirmysl(this.child,2)}>学生成绩</a>
|
|
|
|
|
</li>
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
|
|
|
|
|
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
|
|
|
|
|
{/*<li><a*/}
|
|
|
|
|
{/* onClick={(child,i) => this.confirmysl(this.child,1)}>实训报告</a>*/}
|
|
|
|
|
{/*</li>*/}
|
|
|
|
|
<li><a
|
|
|
|
|
onClick={(child,i) => this.confirmysl(this.child,2)}>学生成绩</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
</li> : ""}
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
teacherdatapage && teacherdatapage.end_immediately === true ?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={(child)=>this.homeworkendss(this.child)}>立即截止</a>
|
|
|
|
|
: ""
|
|
|
|
|
: ""}
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
teacherdatapage && teacherdatapage.publish_immediately === true ?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={(child)=>this.homeworkstarts(this.child)}>立即发布</a>
|
|
|
|
|
: ""
|
|
|
|
|
: ""}
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
teacherdatapage && teacherdatapage.code_review === true ?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={(child)=>this.workshowmodels(this.child)}>代码查重</a>
|
|
|
|
|
: "" : ""}
|
|
|
|
|
{
|
|
|
|
|
parseInt(tab)===1?
|
|
|
|
|
this.props.isAdmin() ?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={()=>this.edenwork()}>编辑作业</a>
|
|
|
|
|
</ul>
|
|
|
|
|
</li> : ""}
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
teacherdatapage && teacherdatapage.end_immediately === true ?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={(child)=>this.homeworkendss(this.child)}>立即截止</a>
|
|
|
|
|
: ""
|
|
|
|
|
: ""}
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
teacherdatapage && teacherdatapage.publish_immediately === true ?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={(child)=>this.homeworkstarts(this.child)}>立即发布</a>
|
|
|
|
|
: ""
|
|
|
|
|
: ""}
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|
teacherdatapage && teacherdatapage.code_review === true ?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={(child)=>this.workshowmodels(this.child)}>代码查重</a>
|
|
|
|
|
: "" : ""}
|
|
|
|
|
{
|
|
|
|
|
parseInt(tab)===1?
|
|
|
|
|
this.props.isAdmin() ?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={()=>this.edenwork()}>编辑作业</a>
|
|
|
|
|
:""
|
|
|
|
|
:""
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
|
|
|
|
|
to={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage&&teacherdatapage.work_id}/shixun_work_report`}>
|
|
|
|
|
查看实训报告
|
|
|
|
|
</Link> : ""}
|
|
|
|
|
{
|
|
|
|
|
teacherdatapage === undefined ? ""
|
|
|
|
|
: teacherdatapage.commit_des === null || teacherdatapage.commit_des === undefined ? "" :
|
|
|
|
|
<a className="fr color-blue font-16"
|
|
|
|
|
href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage === undefined ? "" : teacherdatapage.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdatapage.commit_des}</a>
|
|
|
|
|
}
|
|
|
|
|
{teacherdatapage === undefined ? "" : <Startshixuntask
|
|
|
|
|
{...this.props}
|
|
|
|
|
data={teacherdatapage}
|
|
|
|
|
/>}
|
|
|
|
|
{this.props.isStudent() ?
|
|
|
|
|
(
|
|
|
|
|
teacherdatapage&&teacherdatapage.redo_work===true?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={()=>this.Modalcancelss()}>重做</a>
|
|
|
|
|
:""
|
|
|
|
|
)
|
|
|
|
|
: "" }
|
|
|
|
|
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
|
|
|
|
|
to={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage&&teacherdatapage.work_id}/shixun_work_report`}>
|
|
|
|
|
查看实训报告
|
|
|
|
|
</Link> : ""}
|
|
|
|
|
{
|
|
|
|
|
teacherdatapage === undefined ? ""
|
|
|
|
|
: teacherdatapage.commit_des === null || teacherdatapage.commit_des === undefined ? "" :
|
|
|
|
|
<a className="fr color-blue font-16"
|
|
|
|
|
href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage === undefined ? "" : teacherdatapage.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdatapage.commit_des}</a>
|
|
|
|
|
}
|
|
|
|
|
{teacherdatapage === undefined ? "" : <Startshixuntask
|
|
|
|
|
{...this.props}
|
|
|
|
|
data={teacherdatapage}
|
|
|
|
|
/>}
|
|
|
|
|
{this.props.isStudent() ?
|
|
|
|
|
(
|
|
|
|
|
teacherdatapage&&teacherdatapage.redo_work===true?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={()=>this.Modalcancelss()}>重做</a>
|
|
|
|
|
:""
|
|
|
|
|
)
|
|
|
|
|
: "" }
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""}
|
|
|
|
|
{parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)} Showupdateinstructionsboolfalse={(i)=>this.Showupdateinstructionsboolfalse(i)}></Workquestionandanswer>:""}
|
|
|
|
|
{parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""}
|
|
|
|
|
{parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
|
|
|
|
|
</Spin>
|
|
|
|
|
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""}
|
|
|
|
|
{parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)} Showupdateinstructionsboolfalse={(i)=>this.Showupdateinstructionsboolfalse(i)}></Workquestionandanswer>:""}
|
|
|
|
|
{parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""}
|
|
|
|
|
{parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
|
|
|
|
|
</Spin>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|