dev_forum
杨树林 5 years ago
parent f50faea37f
commit e28ccb3f03

@ -1451,70 +1451,11 @@ class Listofworks extends Component {
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className={"educontent "}>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
<a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin() ?
this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : <a
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
onClick={(e)=>this.ChangeTab(2)}>
代码查重</a> : ""}
<a
onClick={(e)=>this.ChangeTab(3)}
>设置</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;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</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={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
</ul>
</li>:""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "": ""}
</div>
</div>
<style>
{`
@ -1761,3 +1702,63 @@ export default Listofworks;
{/*</div>*/}
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white poll_list">
// <a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
// {this.props.isAdmin() ?
// this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : <a
// // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
// onClick={(e)=>this.ChangeTab(2)}>
// 代码查重</a> : ""}
// <a
// onClick={(e)=>this.ChangeTab(3)}
// >设置</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;
// }
// .drop_down_menu {
// width: 93px;
// }
// .drop_down_menu li {
// overflow: visible;
// width: 93px;
// }
// .drop_down_menu, .drop_down_normal {
// padding-top: 10px;
// padding-bottom: 8px;
// }
// a:hover {
// color:#1A0B00 !important;
// }
// `}</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={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
//
// </ul>
// </li>:""}
// {this.props.isAdmin() ?
// teacherdata && teacherdata.end_immediately === true ?
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
// : ""
// : ""}
// {this.props.isAdmin() ?
// teacherdata && teacherdata.publish_immediately === true ?
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
// : ""
// : ""}
// {this.props.isAdmin() ?
// teacherdata && teacherdata.code_review === true ?
// <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
// : "": ""}
{/* </div>*/}
{/*</div>*/}

@ -922,32 +922,9 @@ class Listofworksstudentone extends Component {
: ""
}
<div className={"educontent mb20"}>
<div className={"educontent "}>
<div className="edu-back-white" style={{width: "1200"}}>
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
<a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
<a
onClick={(e)=>this.ChangeTab(3)}
>设置</a>
{this.state.view_report===true?<a className="fr color-blue font-16" target={"_blank"}
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>
查看实训报告
</a>:""}
{/*<a className="fr color-blue font-16">查看实训报告</a>*/}
{
teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
}
{teacherdata === undefined ? "" : <Startshixuntask
{...this.props}
data={teacherdata}
/>}
</div>
</div>
{computeTimetype===false?<li className="clearfix startbox mb20">
@ -1076,27 +1053,7 @@ class Listofworksstudentone extends Component {
</div>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</Link>
<Link onClick={(e)=>this.ChangeTab(1)}>作业问答</Link>
<Link onClick={(e)=>this.ChangeTab(3)}>设置</Link>
{this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>
查看实训报告
</Link>:""}
{
teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
}
{teacherdata === undefined ? "" : <Startshixuntask
{...this.props}
data={teacherdata}
/>}
</div>
</div>
{computeTimetype===false?<li className="clearfix startbox mb20">
<span className={"startfont"}>
@ -1267,4 +1224,49 @@ class Listofworksstudentone extends Component {
}
}
export default Listofworksstudentone;
export default Listofworksstudentone;
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/* <div className=" clearfix edu-back-white poll_list">*/}
{/* <a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>*/}
{/* <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>*/}
{/* <a*/}
{/* onClick={(e)=>this.ChangeTab(3)}*/}
{/* >设置</a>*/}
{/* {this.state.view_report===true?<a className="fr color-blue font-16" target={"_blank"}*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>*/}
{/* 查看实训报告*/}
{/* </a>:""}*/}
{/* /!*<a className="fr color-blue font-16">查看实训报告</a>*!/*/}
{/* {*/}
{/* teacherdata === undefined ? ""*/}
{/* : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>*/}
{/* }*/}
{/* {teacherdata === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/}
{/* data={teacherdata}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/* <div className=" clearfix edu-back-white poll_list">*/}
{/* <Link className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</Link>*/}
{/* <Link onClick={(e)=>this.ChangeTab(1)}>作业问答</Link>*/}
{/* <Link onClick={(e)=>this.ChangeTab(3)}>设置</Link>*/}
{/* {this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}*/}
{/* to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>*/}
{/* 查看实训报告*/}
{/* </Link>:""}*/}
{/* {*/}
{/* teacherdata === undefined ? ""*/}
{/* : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>*/}
{/* }*/}
{/* {teacherdata === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/}
{/* data={teacherdata}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}

@ -1,6 +1,6 @@
import React,{ Component } from "react";
import {Link,NavLink} from 'react-router-dom';
import { WordsBtn ,ActionBtn} from 'educoder';
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn} from 'educoder';
import axios from 'axios';
import '../css/members.css';
import "../common/formCommon.css";
@ -14,39 +14,55 @@ import Trainingjobsetting from './Trainingjobsetting'
import Workquestionandanswer from './Workquestionandanswer'
import CoursesListType from '../coursesPublic/CoursesListType';
import ShixunStudentWork from "./ShixunStudentWork";
import Startshixuntask from "../coursesPublic/Startshixuntask";
class ShixunHomeworkPage extends Component {
constructor(props) {
super(props);
this.state={
tab:["0"],
jobsettingsdata:undefined,
teacherdata:undefined,
this.state = {
tab: ["0"],
jobsettingsdata: undefined,
teacherdata: undefined,
code_review: false,
view_report: false,
}
}
//切换tab
ChangeTab=(e)=>{
console.log(e);
ChangeTab = (e) => {
// console.log(e);
this.setState({
tab:e
tab: e
})
try {
var currenturl = window.location.href;
var newUrl = (currenturl.split("?"))[0];
window.history.pushState('','',newUrl+'?tab='+e);
}catch (e) {
console.log(e);
console.log("44");
}
}
Getdataback = (jobsettingsdata,teacherdata)=>{
this.setState({
jobsettingsdata:jobsettingsdata,
teacherdata:teacherdata,
})
Getdataback = (jobsettingsdata, teacherdata) => {
this.setState({
jobsettingsdata: jobsettingsdata,
teacherdata: teacherdata,
code_review: teacherdata.code_review,
view_report: teacherdata.view_report,
})
}
componentDidMount() {
const query =this.props.location.search;
const query = this.props.location.search;
const type = query.split('?tab=');
// let sum = []
// sum.push(type[1])
// console.log("componentDidMountcomponentDidMount");
console.log(type);
this.setState({
tab:type[1],
tab: type[1],
})
let querys = this.props.location.pathname;
const types = querys.split('/');
@ -57,11 +73,11 @@ class ShixunHomeworkPage extends Component {
}
render() {
let {tab,jobsettingsdata,teacherdata}=this.state;
const isAdmin =this.props.isAdmin();
let {tab, jobsettingsdata, teacherdata} = this.state;
const isAdmin = this.props.isAdmin();
return (
<div className="newMain clearfix " >
<div className={"educontent mb20"} style={{width:"1200px"}}>
<div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px"}}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
@ -70,20 +86,20 @@ class ShixunHomeworkPage extends Component {
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
<p className=" fl color-black summaryname" style={{heigth: "33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>
<CoursesListType
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"": jobsettingsdata.data.category.category_id}`}>返回</a>
href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
@ -91,21 +107,126 @@ class ShixunHomeworkPage extends Component {
</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 || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :
<a
className={parseInt(tab) === 2 ? "active" : ""}
onClick={(e) => this.ChangeTab(2)}>
代码查重</a> : ""}
{parseInt(tab) === 3?
<style>{
`
.poll_list a.active:after {
content: '';
width: 57px;
left: 10px;
bottom: 0px;
height: 2px;
background-color: #4CACFF;
position: absolute;
}
`
}</style>
:""}
<a className={parseInt(tab) === 3 ? "active" : ""}
onClick={(e) => this.ChangeTab(3)}
>设置</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;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</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={() => this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a>
</li>
<li><a
onClick={() => this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>学生成绩</a>
</li>
{
// 教师列表
parseInt(tab)===0 ? (isAdmin===true ?
<Listofworks {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></Listofworks>
</ul>
</li> : ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "" : ""}
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>
查看实训报告
</Link> : ""}
{
teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
}
{teacherdata === undefined ? "" : <Startshixuntask
{...this.props}
data={teacherdata}
/>}
</div>
</div>
</div>
{
// 教师列表
parseInt(tab) === 0 ? (isAdmin === true ?
<Listofworks {...this.props} {...this.state} ChangeTab={(e) => this.ChangeTab(e)}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworks>
:
<Listofworksstudentone {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></Listofworksstudentone>)
<Listofworksstudentone {...this.props} {...this.state} ChangeTab={(e) => this.ChangeTab(e)}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>)
:
parseInt(tab)===1 ?<Workquestionandanswer {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></Workquestionandanswer>
parseInt(tab) === 1 ?
<Workquestionandanswer {...this.props} {...this.state} ChangeTab={(e) => this.ChangeTab(e)}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>
:
parseInt(tab)===2? <ShixunStudentWork {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></ShixunStudentWork>
parseInt(tab) === 2 ?
<ShixunStudentWork {...this.props} {...this.state} ChangeTab={(e) => this.ChangeTab(e)}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>
:
<Trainingjobsetting {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></Trainingjobsetting>
}
</div>
<Trainingjobsetting {...this.props} {...this.state} ChangeTab={(e) => this.ChangeTab(e)}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>
}
</div>
</div>
)
}
@ -135,9 +256,9 @@ export default ShixunHomeworkPage;
//
// </div>
// </div>
{/* </div>*/}
{/* </div>*/
}
{/*</div>*/}
{/*</div>*/
}

@ -625,63 +625,10 @@ class ShixunStudentWork extends Component {
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className={"educontent "}>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
<a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin()?<a className="active" onClick={(e)=>this.ChangeTab(2)}>代码查重</a>:""}
<a onClick={(e)=>this.ChangeTab(3)}>设置</a>
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</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={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin()?
data&&data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
:"": ""}
{this.props.isAdmin()?
data&&data.publish_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "": ""}
{
jobsettingsdata&& jobsettingsdata.data === undefined ? ""
: jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
}
{ jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
{...this.props}
data={ jobsettingsdata&& jobsettingsdata.data}
/>}
</div>
</div>
<style>
{`
.startbox{
@ -844,4 +791,58 @@ class ShixunStudentWork extends Component {
}
}
export default ShixunStudentWork;
export default ShixunStudentWork;
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white poll_list">
// <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
// {this.props.isAdmin()?<a className="active" onClick={(e)=>this.ChangeTab(2)}>代码查重</a>:""}
// <a onClick={(e)=>this.ChangeTab(3)}>设置</a>
// <style>{`
// .drop_down_menu li a {
// padding: 0px;
// font-size: 14px;
// }
// .drop_down_menu {
// width: 93px;
// }
// .drop_down_menu li {
// overflow: visible;
// width: 93px;
// }
// .drop_down_menu, .drop_down_normal {
// padding-top: 10px;
// padding-bottom: 8px;
// }
// a:hover {
// color:#1A0B00 !important;
// }
// `}</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={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
// </li>
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
// </li>
// </ul>
// </li> : ""}
// {this.props.isAdmin()?
// data&&data.end_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
// :"": ""}
// {this.props.isAdmin()?
// data&&data.publish_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "": ""}
// {
// jobsettingsdata&& jobsettingsdata.data === undefined ? ""
// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
// <a className="fr color-blue font-16"
// href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
// }
// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
// {...this.props}
// data={ jobsettingsdata&& jobsettingsdata.data}
// />}
{/* </div>*/}
{/*</div>*/}

@ -1807,87 +1807,17 @@ class Trainingjobsetting extends Component {
loadtype={loadtype}
modalSave={modalSave}
></Modals>
<div className={"educontent mb20"}>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
<a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <a onClick={(e)=>this.ChangeTab(2)}>代码查重</a> : ""}
<style>{
`
.poll_list a.active:after {
content: '';
width: 57px;
left: 10px;
bottom: 0px;
height: 2px;
background-color: #4CACFF;
position: absolute;
}
`
}</style>
<a className="active"
onClick={(e)=>this.ChangeTab(3)}
>设置</a>
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</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={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li>: ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
: "": ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>: "" : ""}
{this.props.isAdmin()?
jobsettingsdata&&jobsettingsdata.data.code_review===true?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>: "":""}
{
jobsettingsdata&& jobsettingsdata&&jobsettingsdata.data === undefined ? ""
: jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
}
{ jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
{...this.props}
data={ jobsettingsdata&& jobsettingsdata.data}
/>}
</div>
</div>
<div className={"educontent "}>
<div className="edu-back-white" style={{paddingTop: "20px"}}>
{/*发布设置*/}
<div className="stud-class-set bor-bottom-greyE edu-back-white">
<div className=" mt20 pl20">
<div className=" pl20">
<p className=" clearfix " style={{height:"41px"}}>
<span className="font-16 fl "style={{"color":"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{"font-size":"14px","text-align":"left"}}></span></span>
{
!flagPageEdit && this.props.isAdmin() === true ?
<a className="fr" onClick={this.editSetting}><i
className="iconfont font-16 pr20 " style={{color:"#333333"}}>编辑</i></a>
<a className="fr" onClick={this.editSetting}><Tooltip title="编辑"><i
className="iconfont icon-bianjidaibeijing font-20 color-green pr20 "></i></Tooltip></a>
: ""
}
</p>
@ -2233,4 +2163,74 @@ class Trainingjobsetting extends Component {
}
}
export default Trainingjobsetting;
export default Trainingjobsetting;
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white poll_list">
// <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
// {this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <a onClick={(e)=>this.ChangeTab(2)}>代码查重</a> : ""}
// <style>{
// `
// .poll_list a.active:after {
// content: '';
// width: 57px;
// left: 10px;
// bottom: 0px;
// height: 2px;
// background-color: #4CACFF;
// position: absolute;
// }
// `
// }</style>
// <a className="active"
// onClick={(e)=>this.ChangeTab(3)}
// >设置</a>
// <style>{`
// .drop_down_menu li a {
// padding: 0px;
// font-size: 14px;
// }
// .drop_down_menu {
// width: 93px;
// }
// .drop_down_menu li {
// overflow: visible;
// width: 93px;
// }
// .drop_down_menu, .drop_down_normal {
// padding-top: 10px;
// padding-bottom: 8px;
// }
// a:hover {
// color:#1A0B00 !important;
// }
// `}</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={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
// </li>
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
// </li>
// </ul>
// </li>: ""}
// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
// : "": ""}
// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>: "" : ""}
// {this.props.isAdmin()?
// jobsettingsdata&&jobsettingsdata.data.code_review===true?
// <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>: "":""}
// {
// jobsettingsdata&& jobsettingsdata&&jobsettingsdata.data === undefined ? ""
// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
// <a className="fr color-blue font-16"
// href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
// }
// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
// {...this.props}
// data={ jobsettingsdata&& jobsettingsdata.data}
// />}
{/* </div>*/}
{/*</div>*/}

@ -405,83 +405,12 @@ class Workquestionandanswer extends Component {
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
<a className="active" onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin() ?
this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :
<a
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
onClick={(e)=>this.ChangeTab(2)}>
代码查重</a> : ""}
<a
onClick={(e)=>this.ChangeTab(3)}
>设置</a>
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</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={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
:""
: ""}
{this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
: ""
: ""}
{this.props.isAdmin() ?
jobsettingsdata && jobsettingsdata.data.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "" : ""}
{
jobsettingsdata&& jobsettingsdata.data === undefined ? ""
: jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
}
{ jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
{...this.props}
data={ jobsettingsdata&& jobsettingsdata.data}
/>}
</div>
</div>
<div className={"educontent "}>
<div className="edu-back-white" style={{paddingTop: "20px"}}>
{jobsettingsdata === undefined || jobsettingsdata.data.description === null ? "无" :
<div className=" clearfix edu-back-white poll_list mt20 mr20 ">
<div className=" clearfix edu-back-white poll_list mr20 ">
<span>
<style>
{
@ -589,4 +518,76 @@ class Workquestionandanswer extends Component {
}
}
export default Workquestionandanswer;
export default Workquestionandanswer;
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/* <div className=" clearfix edu-back-white poll_list">*/}
{/* <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>*/}
{/* <a className="active" onClick={(e)=>this.ChangeTab(1)}>作业问答</a>*/}
{/* {this.props.isAdmin() ?*/}
{/* this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :*/}
{/* <a*/}
{/* // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}*/}
{/* onClick={(e)=>this.ChangeTab(2)}>*/}
{/* 代码查重</a> : ""}*/}
{/* <a*/}
{/* onClick={(e)=>this.ChangeTab(3)}*/}
{/* >设置</a>*/}
{/* <style>{`*/}
{/* .drop_down_menu li a {*/}
{/* padding: 0px;*/}
{/* font-size: 14px;*/}
{/* }*/}
{/* .drop_down_menu {*/}
{/* width: 93px;*/}
{/* }*/}
{/* .drop_down_menu li {*/}
{/* overflow: visible;*/}
{/* width: 93px;*/}
{/* }*/}
{/* .drop_down_menu, .drop_down_normal {*/}
{/* padding-top: 10px;*/}
{/* padding-bottom: 8px;*/}
{/* }*/}
{/* a:hover {*/}
{/* color:#1A0B00 !important;*/}
{/* }*/}
{/* `}</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={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>*/}
{/* </li>*/}
{/* <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>*/}
{/* </li>*/}
{/* </ul>*/}
{/* </li> : ""}*/}
{/* {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?*/}
{/* <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>*/}
{/* :""*/}
{/* : ""}*/}
{/* {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?*/}
{/* <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>*/}
{/* : ""*/}
{/* : ""}*/}
{/* {this.props.isAdmin() ?*/}
{/* jobsettingsdata && jobsettingsdata.data.code_review === true ?*/}
{/* <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>*/}
{/* : "" : ""}*/}
{/* {*/}
{/* jobsettingsdata&& jobsettingsdata.data === undefined ? ""*/}
{/* : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>*/}
{/* }*/}
{/* { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/}
{/* data={ jobsettingsdata&& jobsettingsdata.data}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}
Loading…
Cancel
Save