Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

# Conflicts:
#	public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
competitions
杨树明 5 years ago
commit 00870fa426

@ -46,10 +46,16 @@ class HomeworkModal extends Component{
}
if(this.props.starttimes!=undefined&&this.props.starttimes!=""){
if(this.props.starttimesend!=undefined&&this.props.starttimesend!=""){
this.setState({
endtime:this.props.starttimesend,
})
}else {
this.setState({
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
})
}
this.setState({
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
})
}
}
componentDidUpdate=(prevProps)=>{
@ -69,9 +75,16 @@ class HomeworkModal extends Component{
if(prevProps.starttimes!=this.props.starttimes){
if(this.props.starttimes!=undefined&&this.props.starttimes!=""){
this.setState({
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
})
if(this.props.starttimesend!=undefined&&this.props.starttimesend!=""){
this.setState({
endtime:this.props.starttimesend,
})
}else{
this.setState({
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
})
}
}
}
}

@ -61,9 +61,9 @@ class ShixunHomeworkPage extends Component {
}
Getdataback = (jobsettingsdata, teacherdata) => {
// console.log("56");
// console.log(jobsettingsdata);
// console.log(teacherdata);
console.log("ShixunHomeworkPage56");
console.log(jobsettingsdata);
console.log(teacherdata);
this.setState({
jobsettingsdatapage: jobsettingsdata.data.message===undefined?jobsettingsdata:undefined,

@ -74,6 +74,7 @@ class ShixunStudentWork extends Component {
DownloadType:false,
DownloadMessageval:undefined,
lunxun:true,
starttimesend:undefined,
}
}
@ -415,6 +416,7 @@ class ShixunStudentWork extends Component {
axios.get(url).then((response) => {
if(response.status===200){
const dataformat = 'YYYY-MM-DD HH:mm';
let starttime= this.props.getNowFormatDates(1);
let endtime=this.props.getNowFormatDates(2);
this.setState({
@ -432,6 +434,7 @@ class ShixunStudentWork extends Component {
Saves:this.homeworkstartend,
course_groups:response.data.course_groups,
starttimes:starttime,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
typs:"start",
})
}
@ -754,6 +757,7 @@ class ShixunStudentWork extends Component {
course_groups={this.state.course_groups}
getcourse_groupslist={(id)=>this.getcourse_groupslist(id)}
starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs}
/>
<div className={"educontent "}>

@ -120,7 +120,7 @@ class Trainingjobsetting extends Component {
showmodel:false,
code_review:false,
testscripttiptype:false,
starttimesend:undefined,
end_timebool:false,
late_timesbool:false,
work_efficiencys:false,
@ -1525,6 +1525,7 @@ class Trainingjobsetting extends Component {
axios.get(url).then((response) => {
if (response.status === 200) {
const dataformat = 'YYYY-MM-DD HH:mm';
let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2);
this.setState({
@ -1536,7 +1537,8 @@ class Trainingjobsetting extends Component {
Botval:`本操作只对"未发布"的分班有效`,
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime,
typs:"start",
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
typs:"start",
endtime: "截止时间:" + endtime,
Cancelname: "暂不发布",
Savesname: "立即发布",
@ -1668,6 +1670,7 @@ class Trainingjobsetting extends Component {
addnametab: undefined,
typs:undefined,
starttimes:undefined,
starttimesend:undefined,
})
}
cancelBox=()=>{
@ -2120,7 +2123,8 @@ class Trainingjobsetting extends Component {
course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes}
typs={this.state.typs}
starttimesend={this.state.starttimesend}
typs={this.state.typs}
/>
<Modals
modalsType={modalsType}

@ -77,7 +77,8 @@ class Workquestionandanswer extends Component {
polls_descriptiontest: "作业说明...",
jobdescriptiondisplay: "none",
score_open: false,
code_review: false
code_review: false,
starttimesend:undefined,
}
}
@ -156,6 +157,7 @@ class Workquestionandanswer extends Component {
axios.get(url).then((response) => {
if (response.status === 200) {
const dataformat = 'YYYY-MM-DD HH:mm';
let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2);
this.setState({
@ -173,6 +175,7 @@ class Workquestionandanswer extends Component {
Saves: this.homeworkstartend,
course_groups: response.data.course_groups,
starttimes: starttime,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
typs: "start",
})
}
@ -441,6 +444,7 @@ class Workquestionandanswer extends Component {
course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs}
/>
<div className={"educontent "}>

@ -21,6 +21,7 @@ var newContainer={
bottom: "0px",
minHeight: "100%",
}
//兴趣页面
class EducoderInteresse extends Component {
constructor(props) {
super(props);

@ -10,7 +10,8 @@ class SendTopics extends Component{
search:null,
Radiolist:undefined,
showcheck:false,
smallisSpin:false
smallisSpin:false,
yslbanksMenu:undefined
}
}
@ -18,8 +19,13 @@ class SendTopics extends Component{
componentDidMount(){
let{search}=this.state;
this.onupdatalist(search)
// console.log("SendTopicssssssssssss");
// console.log(this.props);
let{search}=this.state;
this.onupdatalist(search)
this.setState({
yslbanksMenu:this.props.banksMenu,
})
}
onupdatalist=(search)=>{
@ -49,6 +55,8 @@ class SendTopics extends Component{
onChange=(e)=>{
console.log("SendTopics");
console.log(e);
this.setState({
Radiolist:e.target.value
})
@ -78,9 +86,60 @@ class SendTopics extends Component{
smallisSpin:false
})
if(result.data.status===0){
this.props.showNotification(result.data.message)
this.props.topicscancelmodel()
this.props.updataslist()
this.props.showNotification(result.data.message);
this.props.topicscancelmodel();
// result.data.task_ids;
try {
this.props.updataslist()
}catch (e) {
}
debugger
if(this.props.mysendall===true){
//详情页面跳过来的
try {
var rurls="";
if(this.state.yslbanksMenu.category==="normal"){
//普通作业
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.task_ids}/setting`;
}else if(this.state.yslbanksMenu.category==="group"){
//分组作业
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.task_ids}/setting`;
}else if(this.state.yslbanksMenu.category==="exercise"){
// 试卷
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.task_ids}/student_exercise_list?tab=3`;
}else if(this.state.yslbanksMenu.category==="poll") {
//问卷
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.task_ids}/detail?tab=3`
}
window.open(rurls,'_blank');
}catch (e) {
}
}else{
//外部多个列表页跳过来的
debugger
try {
var rurls="";
if(this.props.category==="normal"){
//普通作业
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.category_id}`;
}else if(this.props.category==="group"){
//分组作业
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.category_id}`;
}else if(this.props.category==="exercise"){
// 试卷
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.category_id}`;
}else if(this.props.category==="poll") {
//问卷
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.category_id}`
}
window.open(rurls,'_blank');
}catch (e) {
console.log(e);
}
}
}else{
this.props.showNotification(result.data.message)
}

@ -361,6 +361,7 @@ class InfosTopics extends Component{
<SendTopics
{...this.state}
{...this.props}
mysendall={false}
visible={visible}
updataslist={()=>this.updataslist()}
topicscancelmodel={()=>this.topicscancelmodel()}

@ -25,7 +25,10 @@ class BanksMenu extends Component{
})
}
componentDidMount() {
debugger
// var thestring=this.props;
// var yslarr=thestring.split("/");
// console.log(yslarr);
try {
const query = this.props.location.search;
const type = query.split('?tab=');
@ -80,9 +83,9 @@ class BanksMenu extends Component{
}
topicssavedelete=(id,type)=>{
console.log("删除了");
console.log(id);
console.log(type);
// console.log("删除了");
// console.log(id);
// console.log(type);
const url = `/question_banks/multi_delete.json`;
axios.delete(url, { data: {
object_id: [id],
@ -148,6 +151,7 @@ class BanksMenu extends Component{
<SendTopics
{...this.state}
{...this.props}
mysendall={true}
visible={visible}
category={banksMenu&&banksMenu.category}
checkBoxValues={[banksMenu&&banksMenu.id]}
@ -160,8 +164,9 @@ class BanksMenu extends Component{
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
{
banksMenu.menuArray && banksMenu.menuArray.map((item,key)=>{
console.log("BanksMenu");
console.log(item);
// console.log("BanksMenussss");
// console.log(this.props);
// console.log(this.props.content);
return(
<Menu.Item key={key}><Link to={`${item.to}`}>{item.content}</Link></Menu.Item>
)

Loading…
Cancel
Save