|
|
@ -4,6 +4,7 @@ import { WordsBtn,on, off, trigger } from 'educoder';
|
|
|
|
import {BrowserRouter as Router,Route,Switch,Link} from 'react-router-dom';
|
|
|
|
import {BrowserRouter as Router,Route,Switch,Link} from 'react-router-dom';
|
|
|
|
import axios from'axios';
|
|
|
|
import axios from'axios';
|
|
|
|
import HomeworkModal from "../coursesPublic/HomeworkModal";
|
|
|
|
import HomeworkModal from "../coursesPublic/HomeworkModal";
|
|
|
|
|
|
|
|
import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal";
|
|
|
|
import ShixunModal from "../coursesPublic/ShixunModal";
|
|
|
|
import ShixunModal from "../coursesPublic/ShixunModal";
|
|
|
|
import PathModal from "../coursesPublic/PathModal";
|
|
|
|
import PathModal from "../coursesPublic/PathModal";
|
|
|
|
import NewShixunModel from '../coursesPublic/NewShixunModel';
|
|
|
|
import NewShixunModel from '../coursesPublic/NewShixunModel';
|
|
|
@ -227,10 +228,11 @@ class ShixunHomework extends Component{
|
|
|
|
addnametab:undefined,
|
|
|
|
addnametab:undefined,
|
|
|
|
typs:undefined,
|
|
|
|
typs:undefined,
|
|
|
|
starttimes:undefined,
|
|
|
|
starttimes:undefined,
|
|
|
|
|
|
|
|
OneSelftype:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
|
|
|
|
this.cancelmodel()
|
|
|
|
this.cancelmodel()
|
|
|
|
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -272,6 +274,48 @@ class ShixunHomework extends Component{
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//立即发布
|
|
|
|
|
|
|
|
homeworkOneSelfstart=()=>{
|
|
|
|
|
|
|
|
let selectnum= this.testonSelect();
|
|
|
|
|
|
|
|
if(selectnum===true){
|
|
|
|
|
|
|
|
this.noSelect();
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
|
|
|
let url="/courses/"+coursesId+"/all_course_groups.json";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(response.status===200){
|
|
|
|
|
|
|
|
let starttime= this.props.getNowFormatDates(1);
|
|
|
|
|
|
|
|
let endtime=this.props.getNowFormatDates(2);
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalname:"立即发布",
|
|
|
|
|
|
|
|
modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1,
|
|
|
|
|
|
|
|
OneSelftype:true,
|
|
|
|
|
|
|
|
typs:"start",
|
|
|
|
|
|
|
|
Topval:"学生将立即收到作业",
|
|
|
|
|
|
|
|
// Botvalleft:"暂不发布",
|
|
|
|
|
|
|
|
Botval:`本操作只对"未发布"的分班有效`,
|
|
|
|
|
|
|
|
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
|
|
|
starttimes:starttime,
|
|
|
|
|
|
|
|
endtime:"截止时间:"+endtime,
|
|
|
|
|
|
|
|
Cancelname:"暂不发布",
|
|
|
|
|
|
|
|
Savesname:"立即发布",
|
|
|
|
|
|
|
|
Cancel:this.homeworkhide,
|
|
|
|
|
|
|
|
Saves:this.homeworkstartend,
|
|
|
|
|
|
|
|
course_groups:response.data.course_groups,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cancelmodels=()=>{
|
|
|
|
cancelmodels=()=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
Modalstype:false,
|
|
|
|
Modalstype:false,
|
|
|
@ -316,10 +360,12 @@ class ShixunHomework extends Component{
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.props.showNotification(result.data.message)
|
|
|
|
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
this.cancelmodel()
|
|
|
|
this.cancelmodel()
|
|
|
|
|
|
|
|
this.props.showNotification(result.data.message)
|
|
|
|
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error)=>{
|
|
|
|
}).catch((error)=>{
|
|
|
|
console.log(error);
|
|
|
|
console.log(error);
|
|
|
@ -414,11 +460,11 @@ class ShixunHomework extends Component{
|
|
|
|
Loadtype:false,
|
|
|
|
Loadtype:false,
|
|
|
|
course_groups:[]
|
|
|
|
course_groups:[]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
this.cancelmodel()
|
|
|
|
this.cancelmodel()
|
|
|
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(function (error) {
|
|
|
|
.catch(function (error) {
|
|
|
@ -722,8 +768,8 @@ class ShixunHomework extends Component{
|
|
|
|
checkedtype:false,
|
|
|
|
checkedtype:false,
|
|
|
|
antIcon:false
|
|
|
|
antIcon:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -782,6 +828,7 @@ class ShixunHomework extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
Modalstype:false,
|
|
|
|
Modalstype:false,
|
|
|
|
|
|
|
|
OneSelftype:false,
|
|
|
|
Loadtype:false,
|
|
|
|
Loadtype:false,
|
|
|
|
visible:false,
|
|
|
|
visible:false,
|
|
|
|
Modalstopval:"",
|
|
|
|
Modalstopval:"",
|
|
|
@ -834,9 +881,10 @@ class ShixunHomework extends Component{
|
|
|
|
Loadtype:false,
|
|
|
|
Loadtype:false,
|
|
|
|
checkBoxValues:[]
|
|
|
|
checkBoxValues:[]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
|
|
|
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(function (error) {
|
|
|
|
.catch(function (error) {
|
|
|
@ -886,9 +934,10 @@ class ShixunHomework extends Component{
|
|
|
|
checkBoxValues:[],
|
|
|
|
checkBoxValues:[],
|
|
|
|
checkAllValue:false
|
|
|
|
checkAllValue:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
this.props.showNotification('已完成')
|
|
|
|
this.props.showNotification('已完成')
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
this.homeworkupdatalist(Coursename,page,order);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1022,7 +1071,7 @@ class ShixunHomework extends Component{
|
|
|
|
loadtype={this.state.Loadtype}
|
|
|
|
loadtype={this.state.Loadtype}
|
|
|
|
antIcon={this.state.antIcon}
|
|
|
|
antIcon={this.state.antIcon}
|
|
|
|
/>:""}
|
|
|
|
/>:""}
|
|
|
|
{/*立即发布*/}
|
|
|
|
{/*批量立即发布*/}
|
|
|
|
{visible===true?<HomeworkModal
|
|
|
|
{visible===true?<HomeworkModal
|
|
|
|
datas={datas}
|
|
|
|
datas={datas}
|
|
|
|
category_id={this.props.match.params.category_id}
|
|
|
|
category_id={this.props.match.params.category_id}
|
|
|
@ -1045,7 +1094,28 @@ class ShixunHomework extends Component{
|
|
|
|
getcourse_groupslist={(id)=>this.getcourse_groupslist(id)}
|
|
|
|
getcourse_groupslist={(id)=>this.getcourse_groupslist(id)}
|
|
|
|
/>:""}
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*{单个立即发布}*/}
|
|
|
|
|
|
|
|
{/*<OneSelfOrderModal*/}
|
|
|
|
|
|
|
|
{/*OneSelftype={this.state.OneSelftype}*/}
|
|
|
|
|
|
|
|
{/*datas={datas}*/}
|
|
|
|
|
|
|
|
{/*category_id={this.props.match.params.category_id}*/}
|
|
|
|
|
|
|
|
{/*modaltype={modaltype}*/}
|
|
|
|
|
|
|
|
{/*modalname={modalname}*/}
|
|
|
|
|
|
|
|
{/*Topval={Topval}*/}
|
|
|
|
|
|
|
|
{/*Topvalright={Topvalright}*/}
|
|
|
|
|
|
|
|
{/*Botvalleft={Botvalleft}*/}
|
|
|
|
|
|
|
|
{/*Botval={Botval}*/}
|
|
|
|
|
|
|
|
{/*starttime={starttime}*/}
|
|
|
|
|
|
|
|
{/*starttimes={this.state.starttimes}*/}
|
|
|
|
|
|
|
|
{/*typs={this.state.typs}*/}
|
|
|
|
|
|
|
|
{/*endtime={endtime}*/}
|
|
|
|
|
|
|
|
{/*Cancelname={Cancelname}*/}
|
|
|
|
|
|
|
|
{/*Savesname={Savesname}*/}
|
|
|
|
|
|
|
|
{/*Cancel={Cancel}*/}
|
|
|
|
|
|
|
|
{/*Saves={Saves}*/}
|
|
|
|
|
|
|
|
{/*course_groups={course_groups}*/}
|
|
|
|
|
|
|
|
{/*getcourse_groupslist={(id)=>this.getcourse_groupslist(id)}*/}
|
|
|
|
|
|
|
|
{/*/>*/}
|
|
|
|
{shixunmodal===true||shixunpath===true?<style>
|
|
|
|
{shixunmodal===true||shixunpath===true?<style>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
`
|
|
|
|
`
|
|
|
@ -1128,6 +1198,8 @@ class ShixunHomework extends Component{
|
|
|
|
<Checkbox className="fl" style={{marginTop:'0px'}} checked={checkedtype} onClick={this.funselect}>已选 {checkBoxValues&&checkBoxValues.length} 个 (不支持跨页勾选)</Checkbox>
|
|
|
|
<Checkbox className="fl" style={{marginTop:'0px'}} checked={checkedtype} onClick={this.funselect}>已选 {checkBoxValues&&checkBoxValues.length} 个 (不支持跨页勾选)</Checkbox>
|
|
|
|
<div className="studentList_operation_ul">
|
|
|
|
<div className="studentList_operation_ul">
|
|
|
|
<li className="li_line"><a className="color-grey-9" onClick={this.onDelete}>删除</a></li>
|
|
|
|
<li className="li_line"><a className="color-grey-9" onClick={this.onDelete}>删除</a></li>
|
|
|
|
|
|
|
|
{/*{checkBoxValues&&checkBoxValues.length>1?<li className="li_line"><a className="color-grey-9" onClick={this.homeworkstart}>立即发布</a></li>*/}
|
|
|
|
|
|
|
|
{/*:<li className="li_line"><a className="color-grey-9" onClick={this.homeworkOneSelfstart}>单个立即发布</a></li>}*/}
|
|
|
|
<li className="li_line"><a className="color-grey-9" onClick={this.homeworkstart}>立即发布</a></li>
|
|
|
|
<li className="li_line"><a className="color-grey-9" onClick={this.homeworkstart}>立即发布</a></li>
|
|
|
|
{/*onClick={this.homeworkstart}*/}
|
|
|
|
{/*onClick={this.homeworkstart}*/}
|
|
|
|
<li className="li_line"><a className="color-grey-9" onClick={this.homeworkends}>立即截止</a></li>
|
|
|
|
<li className="li_line"><a className="color-grey-9" onClick={this.homeworkends}>立即截止</a></li>
|
|
|
|