|
|
|
@ -34,7 +34,8 @@ class PublishRightnow extends Component{
|
|
|
|
|
|
|
|
|
|
homeworkstart=()=>{
|
|
|
|
|
const isPublish = this.props.isPublish;
|
|
|
|
|
let showdatatypes=isPublish===true||isPublish===1;
|
|
|
|
|
const isPublishtype = this.props.isPublishtype;
|
|
|
|
|
let showdatatypes=isPublish===true||isPublishtype===1;
|
|
|
|
|
|
|
|
|
|
if (!this.props.checkBoxValues || this.props.checkBoxValues.length == 0) {
|
|
|
|
|
this.props.showNotification(`请先选择要立即${showdatatypes? "发布" : "截止"}的作业`)
|
|
|
|
@ -47,9 +48,10 @@ class PublishRightnow extends Component{
|
|
|
|
|
}
|
|
|
|
|
showDialog = () => {
|
|
|
|
|
const isPublish = this.props.isPublish;
|
|
|
|
|
const isPublishtype = this.props.isPublishtype;
|
|
|
|
|
const dateFormat = 'YYYY-MM-DD HH:mm';
|
|
|
|
|
let showdatatype=isPublish===true&&isPublish!=1;
|
|
|
|
|
let showdatatypes=isPublish===true||isPublish===1;
|
|
|
|
|
let showdatatype=isPublish===false||isPublishtype===undefined;
|
|
|
|
|
let showdatatypes=isPublish===true||isPublishtype===1;
|
|
|
|
|
// getNextHalfHourOfMoment
|
|
|
|
|
const startMoment = (moment());
|
|
|
|
|
this.setState({
|
|
|
|
@ -127,8 +129,8 @@ class PublishRightnow extends Component{
|
|
|
|
|
detail:true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let showdatatypes=isPublish===true||isPublish===1;
|
|
|
|
|
const isPublishtype = this.props.isPublishtype;
|
|
|
|
|
let showdatatypes=isPublish===true||isPublishtype===1;
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
const url = `/courses/${coursesId}/homework_commons/${showdatatypes ? "publish_homework" : "end_homework"}.json`
|
|
|
|
|
axios.post(url, data)
|
|
|
|
@ -152,7 +154,8 @@ class PublishRightnow extends Component{
|
|
|
|
|
// }
|
|
|
|
|
fetchCourseGroups = () => {
|
|
|
|
|
const isPublish = this.props.isPublish;
|
|
|
|
|
let showdatatypes=isPublish===true||isPublish===1;
|
|
|
|
|
const isPublishtype = this.props.isPublishtype;
|
|
|
|
|
let showdatatypes=isPublish===true||isPublishtype===1;
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
// TODO 这里要改成单选作业,接口使用这个 https://www.showdoc.cc/127895880302646?page_id=2035541497546668
|
|
|
|
|
// /homework_commons/:id/publish_groups.json
|
|
|
|
@ -182,7 +185,9 @@ class PublishRightnow extends Component{
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
const isPublish = this.props.isPublish;
|
|
|
|
|
let showdatatypes=isPublish===true||isPublish===1;
|
|
|
|
|
const isPublishtype = this.props.isPublishtype;
|
|
|
|
|
let showdatatypes=isPublish===true||isPublishtype===1;
|
|
|
|
|
|
|
|
|
|
let{
|
|
|
|
|
Topvalright,
|
|
|
|
|
modalname,
|
|
|
|
|