diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css
index 3e6945e0d..65633839a 100644
--- a/public/react/src/modules/courses/css/Courses.css
+++ b/public/react/src/modules/courses/css/Courses.css
@@ -616,12 +616,12 @@ a.white-btn.use_scope-btn:hover{
border-radius: 10px;
}
.Navmodal .ant-modal-content .ant-modal-header{
- border-radius: 10px 10px 0 0;
+ /*border-radius: 10px 10px 0 0;*/
}
.ant-modal-content{
-webkit-box-shadow: 0 4px 12px transparent !important;
box-shadow: 0 4px 12px transparent !important;
- border-radius: 10px !important;
+ /*border-radius: 10px !important;*/
}
.Navmodal .ant-modal-body{
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js
index 342fef706..e7b85b19d 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworks.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js
@@ -753,7 +753,7 @@ class Listofworks extends Component {
let {page, limit} = this.state;
let datalist = [];
let columns = this.state.columns;
- // var columns2=[];
+ var columns2=[];
if (teacherdata !== undefined) {
for (var i = 0; i < student_works.length; i++) {
var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
@@ -799,7 +799,7 @@ class Listofworks extends Component {
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
- columns.push(item);
+ columns2.push(item);
}
}
@@ -817,7 +817,7 @@ class Listofworks extends Component {
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
- columns.push(item);
+ columns2.push(item);
}
}
@@ -831,7 +831,7 @@ class Listofworks extends Component {
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
- columns.push(item);
+ columns2.push(item);
}
}
}
@@ -847,7 +847,7 @@ class Listofworks extends Component {
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
- columns.push(item);
+ columns2.push(item);
}
}
@@ -863,11 +863,11 @@ class Listofworks extends Component {
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
- columns.push(item);
+ columns2.push(item);
}
}
}
- columns=this.state.columnss;
+ columns2=this.state.columnss;
}
}
@@ -877,7 +877,7 @@ class Listofworks extends Component {
this.setState({
data: datalist,
teacherlist: teacherlist,
- columns: columns,
+ columns: columns2,
loadingstate: false,
})
}
@@ -1327,6 +1327,47 @@ class Listofworks extends Component {
});
}
+
+ // 导出实习报告批量
+ internshipreport = ()=>{
+ console.log("internshipreport");
+ let url = "/zip/shixun_report";
+ let homeworkid = this.props.match.params.homeworkid;
+ axios.get((url),{
+ params: {
+ homework_common_id: homeworkid,
+ work_status: this.state.course_groupyslstwo,
+ course_group: this.state.checkedValuesineinfo,
+ search: this.state.searchtext,
+ }
+ }).then((response) => {
+ console.log("1342");
+ console.log(response);
+
+ }).catch((error) => {
+ console.log(error)
+ });
+ }
+
+ // 课堂学生成绩的导出下载
+ Classstudentachievement=()=>{
+ console.log("Classstudentachievement");
+ const course_id = this.props.match.params.coursesId;
+ let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx";
+ axios.get((url),{
+ params: {
+ group_id: this.state.checkedValuesineinfo,
+ search: this.state.searchtext,
+ }
+ }).then((response) => {
+ console.log("1306");
+ console.log(response);
+
+ }).catch((error) => {
+ console.log(error)
+ });
+ }
+
render() {
// console.log("Listofworks.js000")
@@ -1475,8 +1516,8 @@ class Listofworks extends Component {
{this.props.isAdmin()?
导出
:""}
{this.props.isAdmin() ?
diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
index a392dce33..c342227c6 100644
--- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
+++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
@@ -1,26 +1,26 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
-import {WordsBtn,ActionBtn,markdownToHTML} from 'educoder';
+import {WordsBtn, ActionBtn, markdownToHTML} from 'educoder';
import GraduateTopicReply from '../graduation/topics/GraduateTopicReply'
import MemoDetailMDEditortwo from '../../forums/MemoDetailMDEditortwo'
import {
- Form,
- Select,
- Input,
- Button,
- Checkbox,
- Upload,
- Icon,
- message,
- Modal,
- Table,
- Divider,
- InputNumber,
- Tag,
- DatePicker,
- Radio,
- Tooltip,
- notification
+ Form,
+ Select,
+ Input,
+ Button,
+ Checkbox,
+ Upload,
+ Icon,
+ message,
+ Modal,
+ Table,
+ Divider,
+ InputNumber,
+ Tag,
+ DatePicker,
+ Radio,
+ Tooltip,
+ notification
} from "antd";
import {Link, Switch, Route, Redirect} from 'react-router-dom';
import moment from 'moment'
@@ -44,373 +44,414 @@ const TextArea = Input.TextArea
//作业问答页面
class Workquestionandanswer extends Component {
- //unifiedsetting 统一设置
- //allowreplenishment 允许补交
- //completionefficiencyscore 完成效率评分占比
- //level级别
- //proportion 比例
- constructor(props) {
- super(props);
- // this.props.form.setFieldsValue({
- // radiogroup:1,
- //
- // });
- this.state ={
- // namestring:"JFinal是基于Java语言的极速web开发框架,其核心设计目标是开发迅速、代码量少、学习简单、功能强大、轻量级、易扩展、`Restful`。在拥有Java语言所有优势的同时再拥有`ruby`、`python`等动态语言的开发效率。\r\n\r\n在本实训中,我们将基于JFinal框架搭建一个在线商城。我们会学习到如何合理设计`Model`来进行数据表映射和数据操作、如何设计`Controller`对请求进行合理的处理…… 通过本实训,您不仅能收获到具体框架和技术的使用经验,也能对项目架构设计等知识有所了解或巩固。\r\n\r\n\r\n\t
\r\n
\r\n\r\n本实训聚焦一个在线商城项目的核心业务逻辑实现。你将在这一过程中收获Java Web项目设计的基本思想,也能得到编程能力的一次跃升。",
- props: props,
- starttimetype: false,
- endtimetype: false,
- latetimetype: false,
- allowlate: 1,
- latepenaltytype: false,
- unifiedsetting: false,
- allowreplenishment: undefined,
- completionefficiencyscore: false,
- proportion: undefined,
- level: undefined,
- ealuation: false,
- latededuction: undefined,
- latedeductiontwo: undefined,
- Showupdateinstructions:false,
- database: false,
- datasheet: false,
- databasetwo: undefined,
- datasheettwo: undefined,
- publicwork: undefined,
- memo: {id: "94", user_id: 1},
- polls_descriptiontest: "作业说明...",
- jobdescriptiondisplay:"none",
- score_open:false,
- code_review:false
- }
- }
-
- componentDidMount() {
- var homeworkid = this.props.match.params.homeworkid;
- // console.log(homeworkid)
- this.Gettitleinformation(homeworkid)
- let query = this.props.location.pathname;
- const type = query.split('/');
- this.setState({
- shixuntypes:type[3]
- })
- }
-
- isupdatas=()=>{
- var homeworkid = this.props.match.params.homeworkid;
- this.Gettitleinformation(homeworkid)
- }
- //获取题目信息
- Gettitleinformation = (homeworkid) => {
- // console.log("获取题目信息");
- let url = `/homework_commons/${homeworkid}.json`;
- axios.get(url).then((result) => {
- if (result.status === 200) {
- // console.log(url)
- // console.log("设置页")
- // console.log(JSON.stringify(result))
- this.setState({
- jobsettingsdata:result,
- ...result.data
- })
- }
- }).catch((error) => {
- console.log(error)
- })
- }
- jobdescriptiondisplaybj =()=>{
- this.setState({
- Showupdateinstructions:true,
- })
- }
-
- //统一设置
- onChange = (e) => {
- this.setState({
- unifiedsetting: e.target.checked,
- })
- // console.log(e.target.checked);
- }
-
- //立即发布
- homeworkstart = () => {
- let homeworkid=this.props.match.params.homeworkid;
- let url="/homework_commons/"+homeworkid+"/publish_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,
- visible: true,
- Topval:"学生将立即收到作业",
- // Botvalleft:"暂不发布",
- Botval:`本操作只对"未发布"的分班有效`,
- starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
- endtime: "截止时间:" + endtime,
- Cancelname: "暂不发布",
- Savesname: "立即发布",
- Cancel: this.homeworkhide,
- Saves: this.homeworkstartend,
- course_groups: response.data.course_groups,
- starttimes:starttime,
- typs:"start",
- })
- }
- }).catch((error) => {
- console.log(error)
- });
-
- }
- //立即截止
- homeworkends = () => {
- let homeworkid=this.props.match.params.homeworkid;
- let url="/homework_commons/"+homeworkid+"/end_groups.json";
-
- axios.get(url).then((response) => {
-
- if (response.status === 200) {
- this.setState({})
- this.setState({
- modalname: "立即截止",
- modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
- visible: true,
- Topval:"学生将不能再提交作业",
- // Botvalleft:"暂不截止",
- Botval:`本操作只对"提交中"的分班有效`,
- Cancelname: "暂不截止",
- Savesname: "立即截止",
- Cancel: this.homeworkhide,
- Saves: this.coursetaskend,
- starttime: undefined,
- endtime: undefined,
- course_groups: response.data.course_groups,
- typs:"end",
- })
- }
- }).catch((error) => {
- console.log(error)
- });
-
-
- }
+ //unifiedsetting 统一设置
+ //allowreplenishment 允许补交
+ //completionefficiencyscore 完成效率评分占比
+ //level级别
+ //proportion 比例
+ constructor(props) {
+ super(props);
+ // this.props.form.setFieldsValue({
+ // radiogroup:1,
+ //
+ // });
+ this.state = {
+ // namestring:"JFinal是基于Java语言的极速web开发框架,其核心设计目标是开发迅速、代码量少、学习简单、功能强大、轻量级、易扩展、`Restful`。在拥有Java语言所有优势的同时再拥有`ruby`、`python`等动态语言的开发效率。\r\n\r\n在本实训中,我们将基于JFinal框架搭建一个在线商城。我们会学习到如何合理设计`Model`来进行数据表映射和数据操作、如何设计`Controller`对请求进行合理的处理…… 通过本实训,您不仅能收获到具体框架和技术的使用经验,也能对项目架构设计等知识有所了解或巩固。\r\n\r\n\r\n\t
\r\n
\r\n\r\n本实训聚焦一个在线商城项目的核心业务逻辑实现。你将在这一过程中收获Java Web项目设计的基本思想,也能得到编程能力的一次跃升。",
+ props: props,
+ starttimetype: false,
+ endtimetype: false,
+ latetimetype: false,
+ allowlate: 1,
+ latepenaltytype: false,
+ unifiedsetting: false,
+ allowreplenishment: undefined,
+ completionefficiencyscore: false,
+ proportion: undefined,
+ level: undefined,
+ ealuation: false,
+ latededuction: undefined,
+ latedeductiontwo: undefined,
+ Showupdateinstructions: false,
+ database: false,
+ datasheet: false,
+ databasetwo: undefined,
+ datasheettwo: undefined,
+ publicwork: undefined,
+ memo: {id: "94", user_id: 1},
+ polls_descriptiontest: "作业说明...",
+ jobdescriptiondisplay: "none",
+ score_open: false,
+ code_review: false
+ }
+ }
+
+ componentDidMount() {
+ var homeworkid = this.props.match.params.homeworkid;
+ // console.log(homeworkid)
+ this.Gettitleinformation(homeworkid)
+ let query = this.props.location.pathname;
+ const type = query.split('/');
+ this.setState({
+ shixuntypes: type[3]
+ })
+ }
+
+ isupdatas = () => {
+ var homeworkid = this.props.match.params.homeworkid;
+ this.Gettitleinformation(homeworkid)
+ }
+ //获取题目信息
+ Gettitleinformation = (homeworkid) => {
+ // console.log("获取题目信息");
+ let url = `/homework_commons/${homeworkid}.json`;
+ axios.get(url).then((result) => {
+ if (result.status === 200) {
+ // console.log(url)
+ // console.log("设置页")
+ // console.log(JSON.stringify(result))
+ this.setState({
+ jobsettingsdata: result,
+ ...result.data
+ })
+ }
+ }).catch((error) => {
+ console.log(error)
+ })
+ }
+ jobdescriptiondisplaybj = () => {
+ this.setState({
+ Showupdateinstructions: true,
+ })
+ }
+
+ //统一设置
+ onChange = (e) => {
+ this.setState({
+ unifiedsetting: e.target.checked,
+ })
+ // console.log(e.target.checked);
+ }
+
+ //立即发布
+ homeworkstart = () => {
+ let homeworkid = this.props.match.params.homeworkid;
+ let url = "/homework_commons/" + homeworkid + "/publish_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,
+ visible: true,
+ Topval: "学生将立即收到作业",
+ // Botvalleft:"暂不发布",
+ Botval: `本操作只对"未发布"的分班有效`,
+ starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
+ endtime: "截止时间:" + endtime,
+ Cancelname: "暂不发布",
+ Savesname: "立即发布",
+ Cancel: this.homeworkhide,
+ Saves: this.homeworkstartend,
+ course_groups: response.data.course_groups,
+ starttimes: starttime,
+ typs: "start",
+ })
+ }
+ }).catch((error) => {
+ console.log(error)
+ });
+
+ }
+ //立即截止
+ homeworkends = () => {
+ let homeworkid = this.props.match.params.homeworkid;
+ let url = "/homework_commons/" + homeworkid + "/end_groups.json";
+
+ axios.get(url).then((response) => {
+
+ if (response.status === 200) {
+ this.setState({})
+ this.setState({
+ modalname: "立即截止",
+ modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
+ visible: true,
+ Topval: "学生将不能再提交作业",
+ // Botvalleft:"暂不截止",
+ Botval: `本操作只对"提交中"的分班有效`,
+ Cancelname: "暂不截止",
+ Savesname: "立即截止",
+ Cancel: this.homeworkhide,
+ Saves: this.coursetaskend,
+ starttime: undefined,
+ endtime: undefined,
+ course_groups: response.data.course_groups,
+ typs: "end",
+ })
+ }
+ }).catch((error) => {
+ console.log(error)
+ });
+
+
+ }
// 立即发布
- homeworkstartend = (ds,endtime) => {
- var homeworkid = this.props.match.params.homeworkid;
- let {course_groupslist} = this.state;
-
- let coursesId = this.props.match.params.coursesId;
- let url = "/courses/" + coursesId + "/homework_commons/publish_homework.json";
- axios.post(url, {
- homework_ids: [homeworkid],
- group_ids: course_groupslist,
- end_time:endtime,
- }).then((result) => {
- if (result.status === 200) {
- if (result.data.status === 0) {
- notification.open({
- message:"提示",
- description:result.data.message
- });
- this.homeworkhide();
- }
-
- }
- }).catch((error) => {
- console.log(error);
- })
- }
-
- //立即截止确定按钮
- coursetaskend = () => {
- var homeworkid = this.props.match.params.homeworkid;
- let {course_groupslist} = this.state;
-
-
- const cid = this.props.match.params.coursesId;
- let url = "/courses/" + cid + "/homework_commons/end_homework.json";
- axios.post(url, {
- group_ids: course_groupslist,
- homework_ids: [homeworkid],
- })
- .then((response) => {
- if (response.data.status == 0) {
- notification.open({
- message:"提示",
- description:response.data.message
- });
- this.homeworkhide()
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- ReleaseNotes=(explanations)=>{
- var homeworkid = this.props.match.params.homeworkid;
- let url=`/homework_commons/${homeworkid}/update_explanation.json`;
- axios.post((url), {
- explanation: explanations
- })
- .then((result)=>{
- if(result){
- this.props.showNotification(`${result.data.message}`);
- this.setState({
- Showupdateinstructions:false
- })
- var homeworkid = this.props.match.params.homeworkid;
- // console.log(homeworkid)
- this.Gettitleinformation(homeworkid)
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
-
- NOReleaseNotes=()=>{
- this.setState({
- Showupdateinstructions:false,
- })
- }
- workshowmodel=()=>{
- this.setState({
- showmodel:true
- })
- }
-
- hideshowmodel=()=>{
- this.setState({
- showmodel:false
- })
- }
-
- homeworkhide=()=>{
- this.isupdatas()
+ homeworkstartend = (ds, endtime) => {
+ var homeworkid = this.props.match.params.homeworkid;
+ let {course_groupslist} = this.state;
+
+ let coursesId = this.props.match.params.coursesId;
+ let url = "/courses/" + coursesId + "/homework_commons/publish_homework.json";
+ axios.post(url, {
+ homework_ids: [homeworkid],
+ group_ids: course_groupslist,
+ end_time: endtime,
+ }).then((result) => {
+ if (result.status === 200) {
+ if (result.data.status === 0) {
+ notification.open({
+ message: "提示",
+ description: result.data.message
+ });
+ this.homeworkhide();
+ }
+
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ }
+
+ //立即截止确定按钮
+ coursetaskend = () => {
+ var homeworkid = this.props.match.params.homeworkid;
+ let {course_groupslist} = this.state;
+
+
+ const cid = this.props.match.params.coursesId;
+ let url = "/courses/" + cid + "/homework_commons/end_homework.json";
+ axios.post(url, {
+ group_ids: course_groupslist,
+ homework_ids: [homeworkid],
+ })
+ .then((response) => {
+ if (response.data.status == 0) {
+ notification.open({
+ message: "提示",
+ description: response.data.message
+ });
+ this.homeworkhide()
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ ReleaseNotes = (explanations) => {
+ var homeworkid = this.props.match.params.homeworkid;
+ let url = `/homework_commons/${homeworkid}/update_explanation.json`;
+ axios.post((url), {
+ explanation: explanations
+ })
+ .then((result) => {
+ if (result) {
+ this.props.showNotification(`${result.data.message}`);
+ this.setState({
+ Showupdateinstructions: false
+ })
+ var homeworkid = this.props.match.params.homeworkid;
+ // console.log(homeworkid)
+ this.Gettitleinformation(homeworkid)
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ }
+
+ NOReleaseNotes = () => {
+ this.setState({
+ Showupdateinstructions: false,
+ })
+ }
+ workshowmodel = () => {
+ this.setState({
+ showmodel: true
+ })
+ }
+
+ hideshowmodel = () => {
this.setState({
- modalname:undefined,
- modaltype:undefined,
- visible:false,
- Topval:undefined,
- Topvalright:undefined,
- Botvalleft:undefined,
- Botval:undefined,
- starttime:undefined,
- endtime:undefined,
- Cancelname:undefined,
- Savesname:undefined,
- Cancel:undefined,
- Saves:undefined,
- StudentList_value:undefined,
- addname:undefined,
- addnametype:false,
- addnametab:undefined,
- typs:undefined,
- starttimes:undefined,
+ showmodel: false
})
}
- getcourse_groupslist=(id)=>{
+
+ homeworkhide = () => {
+ this.isupdatas()
this.setState({
- course_groupslist:id
+ modalname: undefined,
+ modaltype: undefined,
+ visible: false,
+ Topval: undefined,
+ Topvalright: undefined,
+ Botvalleft: undefined,
+ Botval: undefined,
+ starttime: undefined,
+ endtime: undefined,
+ Cancelname: undefined,
+ Savesname: undefined,
+ Cancel: undefined,
+ Saves: undefined,
+ StudentList_value: undefined,
+ addname: undefined,
+ addnametype: false,
+ addnametab: undefined,
+ typs: undefined,
+ starttimes: undefined,
})
}
+ getcourse_groupslist = (id) => {
+ this.setState({
+ course_groupslist: id
+ })
+ }
+
+
+ // 导出实习报告批量
+ internshipreport = () => {
+ console.log("internshipreport");
+ var homeworkid = this.props.match.params.homeworkid;
+ let url = "/zip/shixun_report";
+ axios.get((url),{
+ params: {
+ homework_common_id: homeworkid,
+ }
+ }).then((response) => {
+ console.log("326");
+ console.log(response);
+
+ }).catch((error) => {
+ console.log(error)
+ });
+ }
+
+ // 课堂学生成绩的导出下载
+ Classstudentachievement = () => {
+ console.log("Classstudentachievement");
+ const course_id = this.props.match.params.coursesId;
+ let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
+ axios.get(url).then((response) => {
+ console.log("339");
+ console.log(response);
+
+ }).catch((error) => {
+ console.log(error)
+ });
+ }
+
render() {
- const dateFormat = 'YYYY-MM-DD HH:mm:ss';
- let {starttimetype, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata,score_open,Showupdateinstructions
- , homework_id} = this.state;
- const radioStyle = {
- display: 'block',
- height: '30px',
- lineHeight: '30px',
- };
- const formItemLayout = {
- labelCol: {span: 6},
- wrapperCol: {span: 14},
- };
- let coursesId = this.props.match.params.coursesId;
-
-
- return (
-
- {this.state.showmodel===true?
this.hideshowmodel()}
- updatas={()=>this.isupdatas()}
- />:""}
- {/*立即发布*/}
- this.getcourse_groupslist(id)}
- starttimes={this.state.starttimes}
- typs={this.state.typs}
- />
-
-
-
- {jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}
- >
- {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}
- >
- 作业详情
-
-
-
-
- {jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
-
-
-
返回
-
实训详情
-
-
-
-
-
-
- {this.props.isAdmin() === true?
作品列表:
-
作品列表
- // :
作品列表(学生完成)
- }
-
-
作业问答
- {this.props.isAdmin()?
- this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"":
- 代码查重:""}
-
-
设置
- {/*
导出成绩 */}
-
- {this.props.isAdmin() ?
- 导出
-
- : ""}
- {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
-
立即截止 :"" : ""}
- {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
-
立即发布 :"": ""}
-
-
- {this.props.isAdmin()?
- this.state.code_review===true?
-
代码查重
- :"":""}
-
-
-
-
- {jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "无" :
+ {this.props.isAdmin() ?
+
+ 导出
+
+ : ""}
+ {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?
+
立即截止 : "" : ""}
+ {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?
+
立即发布 : "" : ""}
+
+
+ {this.props.isAdmin() ?
+ this.state.code_review === true ?
+
代码查重
+ : "" : ""}
+
+
+
+
+ {jobsettingsdata === undefined || jobsettingsdata.data.description === null ? "无" :
+
{/* /!*{jobsettingsdata.data.description}*!/*/}
- {/*
*/}
+ {/*
*/}
- {/* */}
- {/*
*/}
- {/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/}
- {/* */}
- {/* /!*}*!/*/}
- {/*
*/}
-
- {/*
*/}
+ {/* */}
+ {/*
*/}
+ {/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/}
+ {/* */}
+ {/* /!*}*!/*/}
+ {/*
*/}
+
+ {/*
*/}
- }
-
-
-
作业说明:
- {
- this.props.isAdmin()&&this.props.isAdmin()===true ?
-
- (Showupdateinstructions&& Showupdateinstructions === true?"":
-
this.jobdescriptiondisplaybj()} >
- ):""
- }
-
-
-
-
-
- { Showupdateinstructions&& Showupdateinstructions === true?
-
-
-
- :
-
- {jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" :
- jobsettingsdata.data.explanation=== undefined?"无" :jobsettingsdata.data.explanation=== null?"无":
-
- }
-
-
- }
+
}
+
+
+
作业说明:
+ {
+ this.props.isAdmin() && this.props.isAdmin() === true ?
+
+ (Showupdateinstructions && Showupdateinstructions === true ? "" :
+
this.jobdescriptiondisplaybj()}>
+ ) : ""
+ }
+
+
+
+
+
+ {Showupdateinstructions && Showupdateinstructions === true ?
+
+
+
+ :
+
+ {jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" :
+ jobsettingsdata.data.explanation === undefined ? "无" : jobsettingsdata.data.explanation === null ? "无" :
+
+ }
+
+
+ }
-
-{/* */}
- {/* */}
- {/* */}
- {/*
*/}
- {/*{ Showupdateinstructions&& Showupdateinstructions === true?*/}
- {/* */}
- {/* */}
- {/*
*/}
- {/* :""*/}
- {/*}*/}
- { homework_id &&
- }
-
-
-
-
-
-
- )
- }
+
+ {/* */}
+ {/* */}
+ {/* */}
+ {/*
*/}
+ {/*{ Showupdateinstructions&& Showupdateinstructions === true?*/}
+ {/* */}
+ {/* */}
+ {/*
*/}
+ {/* :""*/}
+ {/*}*/}
+ {homework_id &&
+ }
+
+
+
+
+
+
+ )
+ }
}
export default Workquestionandanswer;
\ No newline at end of file
diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js
index 9c817543c..0cac533d1 100644
--- a/public/react/src/modules/paths/PathDetail/DetailCards.js
+++ b/public/react/src/modules/paths/PathDetail/DetailCards.js
@@ -1,500 +1,579 @@
-import React, { Component } from 'react';
-import {getImageUrl} from 'educoder';
-import {Tooltip} from 'antd';
-import '../../paths/ShixunPaths.css';
-import DetailCardsEditAndAdd from './DetailCardsEditAndAdd';
-import DetailCardsEditAndEdit from './DetailCardsEditAndEdit';
-import { BrowserRouter as Router, Route, Link } from "react-router-dom";
-import axios from 'axios';
-import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
-import Modals from '../../modals/Modals';
-
-const $ = window.$
-//
-// //a little function to help us with reordering the result
-// const reorder = (list, startIndex, endIndex) => {
-// let newlist=list;
-// const result = Array.from(newlist.shixuns_list);
-// const [removed] = result.splice(startIndex, 1);
-// result.splice(endIndex, 0, removed);
-// newlist.shixuns_list=result;
-// return newlist;
-// };
-//
-
-
-
-class DetailCards extends Component{
- constructor(props){
- super(props)
- this.state={
- pathCardsList:undefined,
- dropid:undefined,
- dropidtype:false,
- idsum:undefined,
- pathCardsedittype:false,
- pathlistedit:undefined,
- pathid:undefined,
- Modalstype:false,
- Modalstopval:'',
- Modalsbottomval:'',
- cardsModalsave:this.cardsModalsave,
- cardsModalcancel:this.cardsModalcancel,
- delecttype:false,
- editdelectid:undefined,
- editbuttomtype:false,
- editbuttomtypeadd:false,
- showparagraph:false,
- showparagraphkey:"",
- showparagraphindex:""
- }
-
-
- // this.onDragEnd = this.onDragEnd.bind(this);
- }
-
- getPathCardsList(){
- let pathid=this.props.match.params.pathId;
- let url=`/stages.json?subject_id=`+pathid;
- axios.get(url).then((result)=>{
- if(result.status===200){
- this.setState({
- pathCardsList:result.data.stages,
- })
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
-
-
- for_paragraph = (index) =>{
- $("#detail_for_paragraph_"+index).slideToggle(500);
- }
-
- componentDidMount(){
- let pathid=this.props.match.params.pathId;
- this.setState({
- pathid:pathid
- })
- this.getPathCardsList();
-
- }
-
- // onDragStart = () => {
- // /*...*/
- // };
- // onDragUpdate = () => {
- // /*...*/
- // }
- //
- // onDragEnd (result) {
- //
- // let{pathCardsList}=this.state;
- // // dropped outside the list
- // let newpathCardsList=pathCardsList;
- // if(!result.destination) {
- // return;
- // }
- // var sum=result.source.droppableId.replace('ids','')
- // sum=parseInt(sum)
- //
- // const items = reorder(
- // newpathCardsList[sum],
- // result.source.index,
- // result.destination.index
- // );
- // newpathCardsList[sum]=items
- // this.setState({
- // pathCardsList:newpathCardsList
- // })
- // }
-
- pathCardsedit=(key,pathid)=>{
-
- let url=`/stages/`+pathid+`/edit.json`;
- axios.get(url).then((result)=>{
- if(result.status===200){
- this.setState({
- idsum:key,
- pathCardsedittype:true,
- pathlistedit:result.data,
- editbuttomtype:true,
- editbuttomtypeadd:true
- })
- }
- }).catch((error)=>{
- console.log(error);
- })
-
- }
-
- updatapathCardsedit=()=>{
- this.setState({
- idsum:undefined,
- pathCardsedittype:false,
- editbuttomtype:false,
- editbuttomtypeadd:false
- })
- this.getPathCardsList();
- this.props.updatadetailInfoLists();
- }
-
- delectpathCardsedit=(id)=>{
-
- this.setState({
- Modalstype:true,
- Modalstopval:'是否删除该章节?',
- Modalsbottomval:'',
- editdelectid:id,
- delecttype:true,
- })
-
- }
-
- delectpathCardseditfun=()=>{
- let {delecttype,editdelectid}=this.state;
- let id=editdelectid;
- if(delecttype===true){
- let url ='/stages/'+id+'.json'
- axios.delete(url).then((response) => {
- if(response.data.status===1){
- // window.location.href = "/paths/" + response.data.subject_id
- this.setState({
- idsum:undefined,
- pathCardsedittype:false,
- Modalstype:false,
- Modalstopval:'',
- Modalsbottomval:'',
- cardsModalsave:this.cardsModalsave,
- delecttype:false,
- editdelectid:undefined
- })
- this.getPathCardsList();
- }
- }).catch((error) => {
- console.log(error)
- })
- }
-
- }
-
- // 关卡的上移下移操作
- operations = (url) => {
- let newurl = url+".json"
- axios.get(newurl).then((response) => {
- if(response.data.status===1){
- this.getPathCardsList();
- }
- }).catch((error) => {
- console.log(error);
- })
-
- }
- startgameid=(id)=>{
- let url = "/shixuns/" + id + "/shixun_exec.json";
- axios.get(url).then((response) => {
- if (response.data.status === -2) {
- this.setState({
- Modalstype:true,
- Modalstopval:response.data.message,
- })
- } else if (response.data.status === -1) {
- }else if(response.data.status===-3){
- this.setState({
- Modalstype:true,
- Modalstopval:response.data.message,
- })
- } else {
- window.location.href = "/tasks/" + response.data.game_identifier;
- // let path="/tasks/"+response.data.game_identifier;
- // this.props.history.push(path);
- }
- }).catch((error) => {
-
- });
- }
-
- cardsModalcancel=()=>{
- this.setState({
- Modalstype:false,
- Modalstopval:'',
- Modalsbottomval:'',
- editdelectid:undefined
- })
- }
- cardsModalsave=()=>{
- this.setState({
- Modalstype:false,
- Modalstopval:'',
- Modalsbottomval:'',
- editdelectid:undefined
- })
- }
-
- editeditbuttomtypecanle=()=>{
- this.setState({
- editbuttomtype:true,
- editbuttomtypeadd:false
- })
- }
-
- showparagraph=(key,index)=>{
- this.setState({
- showparagraph:true,
- showparagraphkey:key,
- showparagraphindex:index
- })
- }
-
- hideparagraph=()=>{
- this.setState({
- showparagraph:false
- })
- }
- render(){
- let { pathCardsList,
- dropid,
- dropidtype,
- idsum,
- pathCardsedittype,
- pathlistedit,
- pathid,
- Modalstype,
- Modalstopval,
- Modalsbottomval,
- cardsModalsave,
- cardsModalcancel,
- delecttype,
- editdelectid,
- editbuttomtype,
- editbuttomtypeadd,
- showparagraph,
- showparagraphkey,
- showparagraphindex
- }=this.state;
-
- return(
-
-
-
-
- {
- pathCardsList && pathCardsList.map((item,key)=>{
-
- return(
-
-
-
-
-
-
- {item.stage_name}
- {
- idsum===key&&pathCardsedittype===true?'':
-
- this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?
-
-
- { editbuttomtype===true?'':
- this.pathCardsedit(key, item.stage_id)}>
-
-
- }
-
- {
- pathCardsList.length=== key+1?"":this.operations(item.down_path)}>
-
-
-
-
- }
-
-
- {key===0?"":
- this.operations(item.up_path)}>
-
-
-
- }
-
- :""
-
-
- }
-
- {
- idsum === key && pathCardsedittype === true ?
- this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?
- this.delectpathCardsedit(item.stage_id)}>
-
-
-
- :""
- : ''
- }
-
-
-
- {
- idsum===key&&pathCardsedittype===true?'':
-
-
{item.stage_description}
-
-
-
- {
- item.shixuns_list && item.shixuns_list.map((line,index)=>{
- return(
-
this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}>
-
-
-
-
- {
- line.complete_status === 1 ?
- :
- }
-
-
- {key+1} -{index+1} {line.shixun_name}
-
-
-
- {
- line.shixun_status==="暂未公开"?
-
暂未公开
- :
-
- {
- showparagraphkey===key&&showparagraphindex===index?:""
- }
-
-
- }
-
)
- })
- }
-
-
- }
-
-
-
-
-
-
- )
- })
- }
-
-
-
- { editbuttomtypeadd===true?'':
-
- }
-
-
- )
- }
-}
-export default DetailCards;
-
-
-
-
-
-
-// {
-// idsum===key&&pathCardsedittype===true?'':
-//
-//
{item.stage_description}
-//
-//
-//
-//
-// {(provided, snapshot) => (
-//
-//
-//
-// {
-// item.shixuns_list && item.shixuns_list.map((line,index)=>{
-// return(
-//
-// {(provided, snapshot) => (
-//
-//
-//
-//
-//
-// {
-// line.complete_status === 1 ?
-// :
-// }
-//
-//
-//
-//
-// {key+1} -{index+1} {line.shixun_name}
-//
-//
-//
-// {
-// line.shixun_status==="暂未公开"?
-//
暂未公开
-// :
-//
-// 查看详情
-// 开始实战
-//
-// }
-// {provided.placeholder}
-//
-// )}
-//
-// )
-// })
-// }
-//
-// )}
-//
-//
-//
+import React, { Component } from 'react';
+import {getImageUrl} from 'educoder';
+import {Tooltip,Modal,Icon,Spin,message} from 'antd';
+import '../../paths/ShixunPaths.css';
+import DetailCardsEditAndAdd from './DetailCardsEditAndAdd';
+import DetailCardsEditAndEdit from './DetailCardsEditAndEdit';
+import { BrowserRouter as Router, Route, Link } from "react-router-dom";
+import axios from 'axios';
+import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
+import Modals from '../../modals/Modals';
+
+const $ = window.$
+//
+// //a little function to help us with reordering the result
+// const reorder = (list, startIndex, endIndex) => {
+// let newlist=list;
+// const result = Array.from(newlist.shixuns_list);
+// const [removed] = result.splice(startIndex, 1);
+// result.splice(endIndex, 0, removed);
+// newlist.shixuns_list=result;
+// return newlist;
+// };
+//
+
+
+
+class DetailCards extends Component{
+ constructor(props){
+ super(props)
+ this.state={
+ pathCardsList:undefined,
+ dropid:undefined,
+ dropidtype:false,
+ idsum:undefined,
+ pathCardsedittype:false,
+ pathlistedit:undefined,
+ pathid:undefined,
+ Modalstype:false,
+ Modalstopval:'',
+ Modalsbottomval:'',
+ cardsModalsave:this.cardsModalsave,
+ cardsModalcancel:this.cardsModalcancel,
+ delecttype:false,
+ editdelectid:undefined,
+ editbuttomtype:false,
+ editbuttomtypeadd:false,
+ showparagraph:false,
+ showparagraphkey:"",
+ showparagraphindex:"",
+ isSpin:false
+ }
+
+
+ // this.onDragEnd = this.onDragEnd.bind(this);
+ }
+
+ getPathCardsList(){
+ let pathid=this.props.match.params.pathId;
+ let url=`/stages.json?subject_id=`+pathid;
+ axios.get(url).then((result)=>{
+ if(result.status===200){
+ this.setState({
+ pathCardsList:result.data.stages,
+ })
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+
+ for_paragraph = (index) =>{
+ $("#detail_for_paragraph_"+index).slideToggle(500);
+ }
+
+ componentDidMount(){
+ let pathid=this.props.match.params.pathId;
+ this.setState({
+ pathid:pathid
+ })
+ this.getPathCardsList();
+
+ }
+
+ // onDragStart = () => {
+ // /*...*/
+ // };
+ // onDragUpdate = () => {
+ // /*...*/
+ // }
+ //
+ // onDragEnd (result) {
+ //
+ // let{pathCardsList}=this.state;
+ // // dropped outside the list
+ // let newpathCardsList=pathCardsList;
+ // if(!result.destination) {
+ // return;
+ // }
+ // var sum=result.source.droppableId.replace('ids','')
+ // sum=parseInt(sum)
+ //
+ // const items = reorder(
+ // newpathCardsList[sum],
+ // result.source.index,
+ // result.destination.index
+ // );
+ // newpathCardsList[sum]=items
+ // this.setState({
+ // pathCardsList:newpathCardsList
+ // })
+ // }
+
+ pathCardsedit=(key,pathid)=>{
+
+ let url=`/stages/`+pathid+`/edit.json`;
+ axios.get(url).then((result)=>{
+ if(result.status===200){
+ this.setState({
+ idsum:key,
+ pathCardsedittype:true,
+ pathlistedit:result.data,
+ editbuttomtype:true,
+ editbuttomtypeadd:true
+ })
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+
+ }
+
+ updatapathCardsedit=()=>{
+ this.setState({
+ idsum:undefined,
+ pathCardsedittype:false,
+ editbuttomtype:false,
+ editbuttomtypeadd:false
+ })
+ this.getPathCardsList();
+ this.props.updatadetailInfoLists();
+ }
+
+ delectpathCardsedit=(id)=>{
+
+ this.setState({
+ Modalstype:true,
+ Modalstopval:'是否删除该章节?',
+ Modalsbottomval:'',
+ editdelectid:id,
+ delecttype:true,
+ })
+
+ }
+
+ delectpathCardseditfun=()=>{
+ let {delecttype,editdelectid}=this.state;
+ let id=editdelectid;
+ if(delecttype===true){
+ let url ='/stages/'+id+'.json'
+ axios.delete(url).then((response) => {
+ if(response.data.status===1){
+ // window.location.href = "/paths/" + response.data.subject_id
+ this.setState({
+ idsum:undefined,
+ pathCardsedittype:false,
+ Modalstype:false,
+ Modalstopval:'',
+ Modalsbottomval:'',
+ cardsModalsave:this.cardsModalsave,
+ delecttype:false,
+ editdelectid:undefined
+ })
+ this.getPathCardsList();
+ }
+ }).catch((error) => {
+ console.log(error)
+ })
+ }
+
+ }
+
+ // 关卡的上移下移操作
+ operations = (url) => {
+ let newurl = url+".json"
+ axios.get(newurl).then((response) => {
+ if(response.data.status===1){
+ this.getPathCardsList();
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+
+ }
+ startgameid=(id)=>{
+
+ let url = "/shixuns/" + id + "/shixun_exec.json";
+ axios.get(url).then((response) => {
+
+ if (response.data.status === -2) {
+ this.setState({
+
+ shixunsreplace:true,
+ hidestartshixunsreplacevalue:response.data.message+".json"
+ })
+ } else if (response.data.status === -1) {
+ console.log(response)
+ }else if(response.data.status===-3){
+ this.setState({
+ shixunsmessage:response.data.message,
+ startshixunCombattype:true,
+ })
+ } else {
+ window.location.href = "/tasks/" + response.data.game_identifier;
+ // window.location.href = path
+ // let path="/tasks/"+response.data.game_identifier;
+ // this.props.history.push(path);
+ }
+ }).catch((error) => {
+
+ });
+
+
+ }
+
+ hidestartshixunsreplace=(url)=>{
+ this.setState({
+ isSpin:true,
+ })
+ axios.get(url).then((response) => {
+ debugger
+ if(response.status===200){
+ // let path="/shixuns/"+response.data.shixun_identifier+"/challenges";
+ // this.props.history.push(path);
+ message.success('重置成功,正在进入实训!');
+ this.startgameid(response.data.shixun_identifier);
+ this.setState({
+ shixunsreplace:false,
+ isSpin:false,
+ startbtn:false,
+ })
+
+ // message.success('重置成功,正在进入实训!');
+ // this.startshixunCombat();
+ }}
+ ).catch((error) => {
+
+ });
+
+ }
+
+ cardsModalcancel=()=>{
+ this.setState({
+ Modalstype:false,
+ Modalstopval:'',
+ Modalsbottomval:'',
+ editdelectid:undefined
+ })
+ }
+ cardsModalsave=()=>{
+ this.setState({
+ Modalstype:false,
+ Modalstopval:'',
+ Modalsbottomval:'',
+ editdelectid:undefined
+ })
+ }
+
+ editeditbuttomtypecanle=()=>{
+ this.setState({
+ editbuttomtype:true,
+ editbuttomtypeadd:false
+ })
+ }
+
+ showparagraph=(key,index)=>{
+ this.setState({
+ showparagraph:true,
+ showparagraphkey:key,
+ showparagraphindex:index
+ })
+ }
+
+ hideparagraph=()=>{
+ this.setState({
+ showparagraph:false
+ })
+ }
+
+ hidestartshixunCombattype=()=>{
+ this.setState({
+ startshixunCombattype:false
+ })
+ }
+ render(){
+ let { pathCardsList,
+ dropid,
+ dropidtype,
+ idsum,
+ pathCardsedittype,
+ pathlistedit,
+ pathid,
+ Modalstype,
+ Modalstopval,
+ Modalsbottomval,
+ cardsModalsave,
+ cardsModalcancel,
+ delecttype,
+ hidestartshixunsreplacevalue,
+ editbuttomtype,
+ editbuttomtypeadd,
+ showparagraph,
+ showparagraphkey,
+ showparagraphindex
+ }=this.state;
+ const antIcon = ;
+ return(
+
+
+
+
+
+
本实训的开启时间:{this.state.shixunsmessage} 开启时间之前不能挑战
+
+
+ {/**/}
+ {/*知道了 */}
+ {/*
*/}
+
+
+
+
+
+
+
+
+
+ {
+ pathCardsList && pathCardsList.map((item,key)=>{
+
+ return(
+
+
+
+
+
+
+ {item.stage_name}
+ {
+ idsum===key&&pathCardsedittype===true?'':
+
+ this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?
+
+
+ { editbuttomtype===true?'':
+ this.pathCardsedit(key, item.stage_id)}>
+
+
+ }
+
+ {
+ pathCardsList.length=== key+1?"":this.operations(item.down_path)}>
+
+
+
+
+ }
+
+
+ {key===0?"":
+ this.operations(item.up_path)}>
+
+
+
+ }
+
+ :""
+
+
+ }
+
+ {
+ idsum === key && pathCardsedittype === true ?
+ this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?
+ this.delectpathCardsedit(item.stage_id)}>
+
+
+
+ :""
+ : ''
+ }
+
+
+
+ {
+ idsum===key&&pathCardsedittype===true?'':
+
+
{item.stage_description}
+
+
+
+ {
+ item.shixuns_list && item.shixuns_list.map((line,index)=>{
+ return(
+
this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}>
+
+
+
+
+ {
+ line.complete_status === 1 ?
+ :
+ }
+
+
+ {key+1} -{index+1} {line.shixun_name}
+
+
+
+ {
+ line.shixun_status==="暂未公开"?
+
暂未公开
+ :
+
+ {
+ showparagraphkey===key&&showparagraphindex===index?:""
+ }
+
+
+ }
+
)
+ })
+ }
+
+
+ }
+
+
+
+
+
+
+ )
+ })
+ }
+
+
+
+ { editbuttomtypeadd===true?'':
+
+ }
+
+
+ )
+ }
+}
+export default DetailCards;
+
+
+
+
+
+
+// {
+// idsum===key&&pathCardsedittype===true?'':
+//
+//
{item.stage_description}
+//
+//
+//
+//
+// {(provided, snapshot) => (
+//
+//
+//
+// {
+// item.shixuns_list && item.shixuns_list.map((line,index)=>{
+// return(
+//
+// {(provided, snapshot) => (
+//
+//
+//
+//
+//
+// {
+// line.complete_status === 1 ?
+// :
+// }
+//
+//
+//
+//
+// {key+1} -{index+1} {line.shixun_name}
+//
+//
+//
+// {
+// line.shixun_status==="暂未公开"?
+//
暂未公开
+// :
+//
+// 查看详情
+// 开始实战
+//
+// }
+// {provided.placeholder}
+//
+// )}
+//
+// )
+// })
+// }
+//
+// )}
+//
+//
+//
// }
\ No newline at end of file
diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
index fd3097c3f..cb8433e58 100644
--- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js
+++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
@@ -928,6 +928,7 @@ class Newshixuns extends Component {
* 语言: