dev_forum
杨树林 5 years ago
parent 896cc174cc
commit 432dea42a3

@ -73,6 +73,10 @@ const WrappedCoursesNewApp= Loadable({
loading: Loading,
})
const ShixunHomeworkPage =Loadable({
loader: () => import('./shixunHomework/ShixunHomeworkPage'),
loading: Loading,
})
//实训作业
const ShixunHomework= Loadable({
loader: () => import('./shixunHomework/shixunHomework'),
@ -95,7 +99,6 @@ const Listofworks= Loadable({
// loader: () => import('./shixunHomework/Listofworksstudentone'),
// loading: Loading,
// })
//实训作业列表完成的
const Studenthascompleted= Loadable({
loader: () => import('./shixunHomework/Listofworksstudentone'),
@ -720,12 +723,12 @@ class CoursesIndex extends Component{
{/*实训查重列表*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/student_work"
render={
(props) => (<ShixunStudentWork {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/student_work"
render={
(props) => (<ShixunStudentWork {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
@ -744,24 +747,29 @@ class CoursesIndex extends Component{
{/*教师列表*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/list"
render={
(props) => (<Listofworks {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/list"
render={
(props) => (<Listofworks {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训作业page*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/Page"
render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训作业设置*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/settings"
render={
(props) => (<Trainingjobsetting {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/settings"
render={
(props) => (<Trainingjobsetting {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*/!*实训作品列表教师*!/*/}
@ -790,13 +798,13 @@ class CoursesIndex extends Component{
{/*实训学生作品列表已公布*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/openlist"
render={
(props) => (<Studenthascompleted {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训学生作品列表已公布*/}
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/openlist"
render={
(props) => (<Studenthascompleted {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
@ -805,14 +813,14 @@ class CoursesIndex extends Component{
{/*实训作业问答主目录*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/questions"
render={
(props) => (<Workquestionandanswer {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训作业问答子目录*/}
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/questions"
render={
(props) => (<Workquestionandanswer {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>

@ -98,7 +98,7 @@ class CommitSummary extends Component{
// console.log("提交总结接口")
// console.log(JSON.stringify(result))
// message.success(result.data.message);
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`);
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`);
}
}).catch((error) => {
console.log(error)
@ -136,7 +136,7 @@ class CommitSummary extends Component{
</div>
<div>
<p className="ml29 fl color-black mt10 summaryname" onClick={this.asdasdsad}>提交总结</p>
<a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`} className="color-grey-6 fr font-16 ml30 mt10">返回</a>
<a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`} className="color-grey-6 fr font-16 ml30 mt10">返回</a>
</div>
{/*educontentbox*/}
<div className="stud-class-set pt40 pb40">
@ -171,7 +171,7 @@ class CommitSummary extends Component{
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" >
提交
</Button>
<a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`}>取消</a>
<a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`}>取消</a>
</div>
</Form.Item>
</Form>

@ -596,6 +596,8 @@ class Listofworks extends Component {
}
componentDidMount() {
console.log("Listofworks");
console.log("componentDidMount");
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
// this.Gettitleinformation(homeworkid);
@ -655,6 +657,7 @@ class Listofworks extends Component {
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
} }
}).catch((error) => {
@ -714,6 +717,7 @@ class Listofworks extends Component {
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
}
}
@ -1362,6 +1366,10 @@ class Listofworks extends Component {
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
// console.log("Listofworks.js000")
@ -1371,7 +1379,7 @@ class Listofworks extends Component {
// console.log(course_group_info)
// console.log(JSON.stringify(this.props));
return (
<div className="newMain clearfix ">
<div className=" clearfix " style={{margin: "auto" ,paddingBottom: "235px", minWidth:"1200px"}}>
{visible === true ? <ModulationModal
visible={visible}
Cancel={this.cancelModulationModel}
@ -1445,50 +1453,21 @@ class Listofworks extends Component {
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<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>
<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"}}>
{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.state.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>
</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"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
<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]==="未发布"? "" : <Link
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`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link> : ""}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
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`}*/}
@ -1523,18 +1502,18 @@ class Listofworks extends Component {
</li>:""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : ""
<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> : ""
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
: ""
: ""}
{/*<a className="fr color-blue font-16" href={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/commitsummary`}>提交总结</a>*/}
{this.props.isAdmin() ?
this.state.code_review === false ?
""
: <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a> : ""}
teacherdata && teacherdata.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "": ""}
</div>
</div>
@ -1754,4 +1733,32 @@ class Listofworks extends Component {
}
}
export default Listofworks;
export default Listofworks;
{/*<div className="educontent mb20">*/}
{/* <p className="clearfix mb20 mt10">*/}
{/* <ActionBtn className=" btn colorgrey fl hovercolorblue "*/}
{/* to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>*/}
{/* <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>*/}
{/* <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"}}>*/}
{/*{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.state.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>*/}
{/*</div>*/}

@ -177,13 +177,13 @@ class Listofworksstudentone extends Component {
className:'font-14',
render: (text, record) => (
<span>
<span style={record.submitstate === "延时提交" ? {
"color": '#DD1717',
"text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>
<span style={record.submitstate === "延时提交" ? {
"color": '#DD1717',
"text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>
</span>
),
@ -316,7 +316,8 @@ class Listofworksstudentone extends Component {
}
componentDidMount() {
console.log("Listofworksstudentone");
console.log("componentDidMount");
var homeworkid = this.props.match.params.homeworkid;
this.Getalistofworks(homeworkid);
let query = this.props.location.pathname;
@ -347,7 +348,9 @@ class Listofworksstudentone extends Component {
course_group: "",
}
axios.post(urll, data).then((result) => {
if(result === undefined){
return
}
if (result.status === 200) {
if(this.props.isNotMember()===false) {
this.setState({
@ -364,7 +367,8 @@ class Listofworksstudentone extends Component {
challenges_count: result.data.challenges_count,
view_report: result.data.view_report,
})
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
this.seacthdatas(result.data, result.data.student_works);
@ -421,6 +425,7 @@ class Listofworksstudentone extends Component {
challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
})
this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
@ -785,7 +790,8 @@ class Listofworksstudentone extends Component {
challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
})
this.seacthdata(result.data);
this.props.Getdataback(result,result.data);
this.seacthdata(result.data);
}
}
}).catch((error) => {
@ -837,6 +843,9 @@ class Listofworksstudentone extends Component {
});
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
// console.log(this.state.data);
@ -845,7 +854,7 @@ class Listofworksstudentone extends Component {
return (
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的
<div className="newMain clearfix ">
<div className=" clearfix " style={{margin: "auto" ,paddingBottom: "235px", minWidth:"1200px"}}>
<style>
{`
.startbox{
@ -915,44 +924,18 @@ class Listofworksstudentone extends Component {
}
<div className={"educontent mb20"}>
<div className="educontent mb30">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<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>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb30" style={{width: "1250px"}}>
<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.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<p className="color-grey-9 fr font-16"></p>
</div>
<div className="edu-back-white" style={{width: "1250px"}}>
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</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}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>
<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`}>
查看实训报告
</Link>:""}
</a>:""}
{/*<a className="fr color-blue font-16">查看实训报告</a>*/}
{
teacherdata === undefined ? ""
@ -1096,13 +1079,9 @@ class Listofworksstudentone extends Component {
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
<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`}>
查看实训报告

@ -0,0 +1,143 @@
import React,{ Component } from "react";
import {Checkbox,Input,Table, Pagination,Menu} from "antd";
import {Link,NavLink} from 'react-router-dom';
import { WordsBtn ,ActionBtn} from 'educoder';
import axios from 'axios';
import '../css/members.css';
import "../common/formCommon.css";
import '../css/Courses.css';
import './style.css';
import '../css/busyWork.css'
import '../poll/pollStyle.css'
import Listofworks from "./Listofworks";
import Listofworksstudentone from './Listofworksstudentone'
import Trainingjobsetting from './Trainingjobsetting'
import Workquestionandanswer from './Workquestionandanswer'
import CoursesListType from '../coursesPublic/CoursesListType';
import ShixunStudentWork from "./ShixunStudentWork";
class ShixunHomeworkPage extends Component {
constructor(props) {
super(props);
this.state={
tab:["0"],
jobsettingsdata:undefined,
teacherdata:undefined,
}
}
//切换tab
ChangeTab=(e)=>{
console.log(e);
this.setState({
tab:e
})
}
Getdataback = (jobsettingsdata,teacherdata)=>{
this.setState({
jobsettingsdata:jobsettingsdata,
teacherdata:teacherdata,
})
}
componentDidMount() {
const query =this.props.location.search;
const type = query.split('?tab=');
// let sum = []
// sum.push(type[1])
// console.log("componentDidMountcomponentDidMount");
// console.log(sum);
this.setState({
tab:type,
})
let querys = this.props.location.pathname;
const types = querys.split('/');
this.setState({
shixuntypes: types[3]
})
}
render() {
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="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<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>
<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"}}>
{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>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
</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>)
:
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>
:
<Trainingjobsetting {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></Trainingjobsetting>
}
</div>
</div>
)
}
}
export default ShixunHomeworkPage;
// <div className="edu-back-white mt10" >
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white pl30 pr30">
// <div className="fl task_menu_ul">
// {this.props.isAdmin() === true ?
//
// <Menu mode="horizontal" selectedKeys={tab} onClick={(e)=>this.changeTab(e)}>
// <Menu.Item key="0">作品列表</Menu.Item>
// <Menu.Item key="1">作业回答</Menu.Item>
// <Menu.Item key="2">代码查重</Menu.Item>
// <Menu.Item key="3">设置</Menu.Item>
// </Menu>
// :
// <Menu mode="horizontal" selectedKeys={tab} onClick={(e)=>this.changeTab(e)}>
// <Menu.Item key="0">作品列表</Menu.Item>
// <Menu.Item key="1">作业回答</Menu.Item>
// <Menu.Item key="2">代码查重</Menu.Item>
// </Menu>
// }
//
// </div>
// </div>
{/* </div>*/}
{/*</div>*/}

@ -73,6 +73,8 @@ class ShixunStudentWork extends Component {
}
componentDidMount() {
console.log("ShixunStudentWork");
console.log("componentDidMount");
this.getupdata();
this.getTrainingjobsetting();
}
@ -87,6 +89,8 @@ class ShixunStudentWork extends Component {
jobsettingsdata: result,
})
this.props.Getdataback(result,result.data);
}
})
}
@ -502,6 +506,9 @@ class ShixunStudentWork extends Component {
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
let {
data,
@ -582,7 +589,7 @@ class ShixunStudentWork extends Component {
}
return (
<div className="newMain clearfix ">
<div className=" clearfix " style={{margin: "auto" ,paddingBottom: "235px", minWidth:"1200px"}}>
{this.state.showmodel===true?<ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
@ -619,57 +626,14 @@ class ShixunStudentWork extends Component {
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="educontent mb20">
<p className="clearfix mb20 mt5">
<ActionBtn className=" btn colorgrey fl hovercolorblue mt5"
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/students"}>{data.course_name}</ActionBtn>*/}
<span className="color-grey-9 fl ml3 mr3 mt5">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue mt5"
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/"+this.state.shixuntypes+"/"+this.props.match.params.homeworkid}>实训作业</ActionBtn>*/}
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/"+this.state.shixuntypes+"/"+data.category.category_id}>{data.category.category_name}</ActionBtn>*/}
<span className="color-grey-9 fl ml3 mr3 mt5">&gt;</span>
<ActionBtn className="fl">作业详情</ActionBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>
<CoursesListType
typelist={jobsettingsdata === undefined ? [] : jobsettingsdata.data.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a>
<a className={"color-grey-9 fr font-16 mr20"} href={`/shixuns/${jobsettingsdata===undefined?"":jobsettingsdata.data.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">
{/*<Link*/}
{/* to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/listofworks`}>作品列表(教师)</Link>*/}
{this.props.isAdmin() === true?
<Link to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link>:
<Link to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
}
{/*<Link*/}
{/*to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/Listofworksstudentone`}>作品列表(学生未完成)</Link>*/}
{/*<Link*/}
{/*to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/Listofworksstudenttwo`}>作品列表(学生完成)</Link>*/}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()?<Link className="active"
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link>:""}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
<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;
@ -701,15 +665,11 @@ class ShixunStudentWork extends Component {
</li> : ""}
{this.props.isAdmin()?
data&&data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
<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> : "" : ""}
{/*{this.props.isAdmin()?*/}
{/*jobsettingsdata&&jobsettingsdata.data.code_review===true?*/}
{/*<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>*/}
{/*:"":""}*/}
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "": ""}
</div>
</div>
<style>

@ -117,7 +117,7 @@ class ShixunWorkReport extends Component {
<span className={"color-grey-9"}>{data&&data.category.category_name}</span>
</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list"} className="fl color-grey-9">作业详情</WordsBtn>
<WordsBtn to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list?tab=0"} className="fl color-grey-9">作业详情</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">{data&&data.username}</WordsBtn>
</p>

@ -294,19 +294,19 @@ class ShixunhomeWorkItem extends Component{
{/*/courses/1309/9373/listofworks*/}
{/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/}
{
this.props.isAdmin?<Link to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list"}
this.props.isAdmin?<Link to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0"}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
}
{
this.props.isStudent? <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist`}
this.props.isStudent? <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
}
{
this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</span>
: <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist`}
: <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
}
@ -360,7 +360,7 @@ class ShixunhomeWorkItem extends Component{
{this.props.isAdmin?<div className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"44px","display":"block"}}>
<a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a>
{this.props.isAdminOrCreator()?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings`} > 设置</WordsBtn>
<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
</div>:""}

@ -188,7 +188,7 @@ class ShixunWorkModal extends Component{
// message:"提示",
// description: response.data.message
// });
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work`);
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`);
}else if(response.data.status === -1){
notification.open({
message:"提示",

@ -125,6 +125,8 @@ class Trainingjobsetting extends Component {
}
componentDidMount() {
console.log("Trainingjobsetting");
console.log("componentDidMount");
this.getTrainingjobsetting();
let query = this.props.location.pathname;
const type = query.split('/');
@ -143,46 +145,52 @@ class Trainingjobsetting extends Component {
// console.log(homeworkid)
let url = `/homework_commons/${homeworkid}/settings.json`;
axios.get(url).then((result) => {
console.log(url);
console.log(result);
if (result!=undefined) {
// console.log(result.data.code_review)
this.props.Getdataback(result,result.data);
// console.log(result.data.code_review)
// console.log("设置页")
// console.log(JSON.stringify(result))
let array=[];
let arrays=[];
var rulesdatas=[];
if(result.data.group_settings.length === 0){
array.push({
course_group_id:[],
course_group_name:[],
publish_time:undefined,
end_time:undefined,
publish_flag:"",
end_flag:"",
class_flag:"",
course_search:"",
open:false
})
}else {
for(var i=0;i<result.data.group_settings.length;i++) {
if(result.data.group_settings[i].publish_time === null &&result.data.group_settings[i].end_time === null){
}else {
array.push({
course_group_id: result.data.group_settings[i].group_id,
course_group_name: result.data.group_settings[i].group_name,
publish_time: result.data.group_settings[i].publish_time,
end_time: result.data.group_settings[i].end_time,
publish_flag: "",
end_flag: "",
class_flag: "",
course_search: "",
open: false
})
if(result.data.group_settings !== undefined){
if(result.data.group_settings.length === 0){
array.push({
course_group_id:[],
course_group_name:[],
publish_time:undefined,
end_time:undefined,
publish_flag:"",
end_flag:"",
class_flag:"",
course_search:"",
open:false
})
}else {
for(var i=0;i<result.data.group_settings.length;i++) {
if(result.data.group_settings[i].publish_time === null &&result.data.group_settings[i].end_time === null){
}else {
array.push({
course_group_id: result.data.group_settings[i].group_id,
course_group_name: result.data.group_settings[i].group_name,
publish_time: result.data.group_settings[i].publish_time,
end_time: result.data.group_settings[i].end_time,
publish_flag: "",
end_flag: "",
class_flag: "",
course_search: "",
open: false
})
}
}
}
}
for(var i=0;i<result.data.group_settings.length;i++){
if(result.data.group_settings!== undefined){
for(var i=0;i<result.data.group_settings.length;i++){
arrays.push({
course_group_id:result.data.group_settings[i].group_id,
@ -192,20 +200,22 @@ class Trainingjobsetting extends Component {
course_choosed:0,
})
if(result.data.group_settings[i].group_id instanceof Array ) {
rulesdatas.push({
group_id:result.data.group_settings[i].group_id,
publish_time: moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') ,
end_time: moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'),
})
}else {
rulesdatas.push({
group_id:[result.data.group_settings[i].group_id],
publish_time: moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') ,
end_time: moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'),
})
if(result.data.group_settings[i].group_id instanceof Array ) {
rulesdatas.push({
group_id:result.data.group_settings[i].group_id,
publish_time: moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') ,
end_time: moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'),
})
}else {
rulesdatas.push({
group_id:[result.data.group_settings[i].group_id],
publish_time: moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') ,
end_time: moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'),
})
}
}
}
this.setState({
rules:array,
rulest:arrays,
@ -259,7 +269,7 @@ class Trainingjobsetting extends Component {
if (datas[i].checked === true) {
var object = {
challenge_id: datas[i].challenge_id,
challenge_score: parseInt(datas[i].challenge_score),
challenge_score: datas[i].challenge_score,
};
challenge_scoredata.push(datas[i].challenge_score);
array.push(object)
@ -1048,7 +1058,7 @@ class Trainingjobsetting extends Component {
var challenge_settings = this.state.challenge_settings;
for (var i = 0; i < challenge_settings.length; i++) {
if (i === index) {
challenge_settings[i].challenge_score = parseInt(value);
challenge_settings[i].challenge_score = value;
}
}
@ -1711,6 +1721,9 @@ class Trainingjobsetting extends Component {
}
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
@ -1743,7 +1756,7 @@ class Trainingjobsetting extends Component {
// console.log(this.props.isAdmin())
// console.log(this.state.code_review===false)
return (
<div className="newMain clearfix " ref='targetElementTrainingjobsetting'>
<div className=" clearfix " ref='targetElementTrainingjobsetting' style={{margin: "auto" ,paddingBottom: "235px", minWidth:"1200px"}}>
{this.state.showmodel===true?<ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
@ -1786,43 +1799,12 @@ class Trainingjobsetting extends Component {
modalSave={modalSave}
></Modals>
<div className={"educontent mb20"}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<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}`}>{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 mt5" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>
<CoursesListType
typelist={jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20" href={`/shixuns/${jobsettingsdata===undefined?"":jobsettingsdata.data.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">
{this.props.isAdmin() === true ? <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link> : <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>代码查重</Link> : ""}
<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 {
@ -1836,12 +1818,9 @@ class Trainingjobsetting extends Component {
}
`
}</style>
<Link className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*<Link className="ml30" to={`/courses/${this.state.props.match.params.coursesId}/shixun_homeworks/${this.state.props.match.params.homeworkid}/shixun_work_report`}>*/}
{/*<a className="color-blue">查看实训报告</a>*/}
{/*</Link>*/}
<a className="active"
onClick={(e)=>this.ChangeTab(3)}
>设置</a>
<style>{`
.drop_down_menu li a {
padding: 0px;
@ -1872,13 +1851,13 @@ class Trainingjobsetting extends Component {
</ul>
</li>: ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "": ""}
<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> : "": ""}
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>: "" : ""}
{this.props.isAdmin()?
this.state.code_review===true?<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "":""}
jobsettingsdata&&jobsettingsdata.data.code_review===true?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>: "":""}
</div>
</div>
{/*发布设置*/}

@ -81,6 +81,8 @@ class Workquestionandanswer extends Component {
}
componentDidMount() {
console.log("Workquestionandanswer");
console.log("componentDidMount");
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
this.Gettitleinformation(homeworkid)
@ -108,6 +110,7 @@ class Workquestionandanswer extends Component {
jobsettingsdata: result,
...result.data
})
this.props.Getdataback(result,result.data);
}
}).catch((error) => {
console.log(error)
@ -345,6 +348,9 @@ class Workquestionandanswer extends Component {
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let {
@ -364,7 +370,7 @@ class Workquestionandanswer extends Component {
return (
<div className="newMain clearfix ">
<div className=" clearfix " style={{margin: "auto" ,paddingBottom: "235px", minWidth:"1200px"}}>
{this.state.showmodel === true ? <ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
@ -400,58 +406,22 @@ class Workquestionandanswer extends Component {
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={"/courses/" + this.props.match.params.coursesId + "/students"}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<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}`}>{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"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>
<CoursesListType
typelist={jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.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">
{this.props.isAdmin() === true ? <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link> :
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
// :<Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/noopenlist`}>作品列表(学生完成)</Link>
}
<Link
className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
<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] === "未发布" ? "" :
<Link
<a
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link> : ""}
onClick={(e)=>this.ChangeTab(2)}>
代码查重</a> : ""}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/}
<a
onClick={(e)=>this.ChangeTab(3)}
>设置</a>
<style>{`
.drop_down_menu li a {
padding: 0px;
@ -483,15 +453,19 @@ class Workquestionandanswer extends Component {
</ul>
</li> : ""}
{this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
<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> : "" : ""}
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
: ""
: ""}
{this.props.isAdmin() ?
this.state.code_review === true ?
jobsettingsdata && jobsettingsdata.data.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "" : ""}
: "" : ""}
</div>
</div>

Loading…
Cancel
Save