|
|
@ -633,6 +633,7 @@ class Listofworks extends Component {
|
|
|
|
// 获取作品列表
|
|
|
|
// 获取作品列表
|
|
|
|
Getalistofworks = (homeworkid) => {
|
|
|
|
Getalistofworks = (homeworkid) => {
|
|
|
|
// console.log("获取作品列表");7009
|
|
|
|
// console.log("获取作品列表");7009
|
|
|
|
|
|
|
|
|
|
|
|
let urll = `/homework_commons/${homeworkid}/works_list.json`;
|
|
|
|
let urll = `/homework_commons/${homeworkid}/works_list.json`;
|
|
|
|
// console.log(homeworkid);
|
|
|
|
// console.log(homeworkid);
|
|
|
|
|
|
|
|
|
|
|
@ -651,6 +652,8 @@ class Listofworks extends Component {
|
|
|
|
limit:20,
|
|
|
|
limit:20,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
axios.post(urll, data).then((result) => {
|
|
|
|
axios.post(urll, data).then((result) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.props.isNotMember()===false){
|
|
|
|
if (result !== undefined) {
|
|
|
|
if (result !== undefined) {
|
|
|
|
// console.log(url)
|
|
|
|
// console.log(url)
|
|
|
|
// console.log("作品列表6789077")
|
|
|
|
// console.log("作品列表6789077")
|
|
|
@ -669,7 +672,7 @@ class Listofworks extends Component {
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
|
|
|
|
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
|
|
|
|
}
|
|
|
|
} }
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
console.log(error)
|
|
|
|
console.log(error)
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -687,55 +690,57 @@ class Listofworks extends Component {
|
|
|
|
//debug=t 是老师的意思
|
|
|
|
//debug=t 是老师的意思
|
|
|
|
// console.log(ordervlue)7009
|
|
|
|
// console.log(ordervlue)7009
|
|
|
|
|
|
|
|
|
|
|
|
var homeworkid = this.props.match.params.homeworkid;
|
|
|
|
var homeworkid = this.props.match.params.homeworkid;
|
|
|
|
let urll = `/homework_commons/${homeworkid}/works_list.json?`;
|
|
|
|
let urll = `/homework_commons/${homeworkid}/works_list.json?`;
|
|
|
|
var order = "asc";
|
|
|
|
var order = "asc";
|
|
|
|
if (ordervlue === "update_time") {
|
|
|
|
if (ordervlue === "update_time") {
|
|
|
|
order = "desc";
|
|
|
|
order = "desc";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var checkedValuesines = checkedValuesine;
|
|
|
|
var checkedValuesines = checkedValuesine;
|
|
|
|
var checkedValuesineinfos = checkedValuesineinfo;
|
|
|
|
var checkedValuesineinfos = checkedValuesineinfo;
|
|
|
|
var searchtexts = searchtext
|
|
|
|
var searchtexts = searchtext
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
search: searchtexts,
|
|
|
|
search: searchtexts,
|
|
|
|
order: ordervlue,
|
|
|
|
order: ordervlue,
|
|
|
|
b_order: order,
|
|
|
|
b_order: order,
|
|
|
|
work_status: checkedValuesines,
|
|
|
|
work_status: checkedValuesines,
|
|
|
|
course_group: checkedValuesineinfos,
|
|
|
|
course_group: checkedValuesineinfos,
|
|
|
|
page: page,
|
|
|
|
page: page,
|
|
|
|
limit: limit,
|
|
|
|
limit: limit,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// console.log("Startsorting");
|
|
|
|
// console.log("Startsorting");
|
|
|
|
// console.log(data);
|
|
|
|
// console.log(data);
|
|
|
|
axios.post(urll, data).then((result) => {
|
|
|
|
axios.post(urll, data).then((result) => {
|
|
|
|
// if (result.status === 200) {/]
|
|
|
|
// if (result.status === 200) {/]
|
|
|
|
// console.log(url)
|
|
|
|
// console.log(url)
|
|
|
|
// console.log("作品列表______________________")
|
|
|
|
// console.log("作品列表______________________")
|
|
|
|
// console.log(JSON.stringify(result))
|
|
|
|
// console.log(JSON.stringify(result))
|
|
|
|
if (result !== undefined) {
|
|
|
|
if(this.props.isNotMember()===false){
|
|
|
|
|
|
|
|
if (result !== undefined) {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
teacherdata: result.data,
|
|
|
|
|
|
|
|
task_status: result.data.task_status,
|
|
|
|
|
|
|
|
course_group_info: result.data.course_group_info,
|
|
|
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
|
|
|
jobsettingsdata: result,
|
|
|
|
|
|
|
|
allow_late:result.data.allow_late,
|
|
|
|
|
|
|
|
publish_immediately: result.data.publish_immediately,
|
|
|
|
|
|
|
|
work_efficiency: result.data.work_efficiency,
|
|
|
|
|
|
|
|
end_immediately: result.data.end_immediately,
|
|
|
|
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
teacherdata: result.data,
|
|
|
|
loadingstate: false
|
|
|
|
task_status: result.data.task_status,
|
|
|
|
|
|
|
|
course_group_info: result.data.course_group_info,
|
|
|
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
|
|
|
jobsettingsdata: result,
|
|
|
|
|
|
|
|
allow_late:result.data.allow_late,
|
|
|
|
|
|
|
|
publish_immediately: result.data.publish_immediately,
|
|
|
|
|
|
|
|
work_efficiency: result.data.work_efficiency,
|
|
|
|
|
|
|
|
end_immediately: result.data.end_immediately,
|
|
|
|
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
loadingstate: false
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1359,7 +1364,7 @@ class Listofworks extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
window.open(url, '_blank');
|
|
|
|
window.open("/api"+url, '_blank');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
console.log(error)
|
|
|
|
console.log(error)
|
|
|
@ -1455,7 +1460,7 @@ class Listofworks extends Component {
|
|
|
|
typs={this.state.typs}
|
|
|
|
typs={this.state.typs}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<div className={"educontent mb20"}>
|
|
|
|
<div className={"educontent mb20"}>
|
|
|
|
<div className="educontent mb30">
|
|
|
|
<div className="educontent mb20">
|
|
|
|
<p className="clearfix mb20 mt10">
|
|
|
|
<p className="clearfix mb20 mt10">
|
|
|
|
<ActionBtn className=" btn colorgrey fl hovercolorblue "
|
|
|
|
<ActionBtn className=" btn colorgrey fl hovercolorblue "
|
|
|
|
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
|
|
|
|
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
|
|
|
@ -1467,7 +1472,7 @@ class Listofworks extends Component {
|
|
|
|
<WordsBtn className="fl">作业详情</WordsBtn>
|
|
|
|
<WordsBtn className="fl">作业详情</WordsBtn>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="educontent mb30">
|
|
|
|
<div className="educontent mb20">
|
|
|
|
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
|
|
|
|
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
|
|
|
|
{teacherdata === undefined ? "" : teacherdata.homework_name}
|
|
|
|
{teacherdata === undefined ? "" : teacherdata.homework_name}
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|