diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
index 8e68a7398..cbfdaf72b 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
@@ -4,6 +4,7 @@ import { WordsBtn,on, off, trigger } from 'educoder';
import {BrowserRouter as Router,Route,Switch,Link} from 'react-router-dom';
import axios from'axios';
import HomeworkModal from "../coursesPublic/HomeworkModal";
+import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal";
import ShixunModal from "../coursesPublic/ShixunModal";
import PathModal from "../coursesPublic/PathModal";
import NewShixunModel from '../coursesPublic/NewShixunModel';
@@ -227,10 +228,11 @@ class ShixunHomework extends Component{
addnametab:undefined,
typs:undefined,
starttimes:undefined,
+ OneSelftype:false
})
+ this.cancelmodel()
+ this.homeworkupdatalist(Coursename,page,order);
this.props.updataleftNavfun()
- this.homeworkupdatalist(Coursename,page,order);
- this.cancelmodel()
}
@@ -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=()=>{
this.setState({
Modalstype:false,
@@ -316,10 +360,12 @@ class ShixunHomework extends Component{
})
}
- this.props.showNotification(result.data.message)
+
+ this.homeworkupdatalist(Coursename,page,order);
+ this.cancelmodel()
+ this.props.showNotification(result.data.message)
this.props.updataleftNavfun()
- this.homeworkupdatalist(Coursename,page,order);
- this.cancelmodel()
+
}
}).catch((error)=>{
console.log(error);
@@ -414,11 +460,11 @@ class ShixunHomework extends Component{
Loadtype:false,
course_groups:[]
})
-
+ this.homeworkupdatalist(Coursename,page,order);
+ this.cancelmodel()
this.props.showNotification(response.data.message)
this.props.updataleftNavfun()
- this.homeworkupdatalist(Coursename,page,order);
- this.cancelmodel()
+
}
})
.catch(function (error) {
@@ -722,8 +768,8 @@ class ShixunHomework extends Component{
checkedtype:false,
antIcon:false
})
+ this.homeworkupdatalist(Coursename,page,order);
this.props.showNotification(response.data.message)
- this.homeworkupdatalist(Coursename,page,order);
this.props.updataleftNavfun()
}else{
this.setState({
@@ -782,6 +828,7 @@ class ShixunHomework extends Component{
this.setState({
Modalstype:false,
+ OneSelftype:false,
Loadtype:false,
visible:false,
Modalstopval:"",
@@ -834,9 +881,10 @@ class ShixunHomework extends Component{
Loadtype:false,
checkBoxValues:[]
})
+ this.homeworkupdatalist(Coursename,page,order);
this.props.showNotification(response.data.message)
- this.homeworkupdatalist(Coursename,page,order);
+
}
})
.catch(function (error) {
@@ -886,9 +934,10 @@ class ShixunHomework extends Component{
checkBoxValues:[],
checkAllValue:false
})
+ this.homeworkupdatalist(Coursename,page,order);
this.props.showNotification('已完成')
this.props.updataleftNavfun()
- this.homeworkupdatalist(Coursename,page,order);
+
}
})
}
@@ -1022,7 +1071,7 @@ class ShixunHomework extends Component{
loadtype={this.state.Loadtype}
antIcon={this.state.antIcon}
/>:""}
- {/*立即发布*/}
+ {/*批量立即发布*/}
{visible===true?
this.getcourse_groupslist(id)}
/>:""}
-
+ {/*{单个立即发布}*/}
+ {/*this.getcourse_groupslist(id)}*/}
+ {/*/>*/}
{shixunmodal===true||shixunpath===true?
+
+
+
+
+
+
+
![]({getImageUrl(`images/`+data&&data.image_url)}/)
+
+
+ 为了更好的为您服务,请关联一个EduCoder账号
+
+
+
+
+
+
+
+
+
+ 新用户
+
+
+
+ 欢迎来到EduCoder,新用户登录EduCoder可以到“账号管理-安全设置”中绑定手机/邮箱,以后可以用绑定的手机/邮箱,设置的密码登录EduCoder了。
+ 立即体验表示您已经同意我们的 服务协议条款
+
+
+
+
+
+
+
+
+
+ 老用户
+
+
+
+ 已有EduCoder账号,可以输入您的账号和密码,将您的微信账号与EduCoder账号进行绑定。
+
+
+
+
+
+
+ {this.state.logintypes==="username"?请填写账号:this.state.logintypes==="password"?请填写密码:""}
+
+
+
+
+
+
+
+
+
© 2019 EduCoder
湘ICP备17009477号Trustie & IntelliDE inside.
+
+
+
+
+ )
+ }
+
+}
+
+export default Otherlogin;
diff --git a/public/react/src/modules/login/Otherloginstart.js b/public/react/src/modules/login/Otherloginstart.js
new file mode 100644
index 000000000..9b38ea2b9
--- /dev/null
+++ b/public/react/src/modules/login/Otherloginstart.js
@@ -0,0 +1,52 @@
+import React, { Component } from 'react';
+
+import { BrowserRouter as Router, Route, Link } from "react-router-dom";
+
+import { Spin } from 'antd';
+import axios from 'axios';
+class Otherloginstart extends Component {
+
+ componentDidMount() {
+ let query=this.props.location.search;
+ const type = query.split('?code=');
+ const types = type[1].split('&state=');
+ let codeurl = `/auth/wechat/callback.json`
+ axios.get(codeurl,{params:{
+ code:types[0]
+ }}).then((result)=> {
+ if(result){
+ if(result.data.status===0){
+ if(result.data.new_user===true){
+ window.location.href="/otherlogin"
+ }else{
+ // this.getinfo()
+ window.location.href="/"
+ }
+ }
+ }
+ }).catch((error)=>{
+
+ })
+
+ }
+
+ render() {
+ // Loading
+ return (
+