diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index f126bc363..1adf3aef9 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -26,12 +26,13 @@ const env = getClientEnvironment(publicUrl); // This is the development configuration. // It is focused on developer experience and fast rebuilds. // The production configuration is different and lives in a separate file. +// 测试用的 module.exports = { // You may want 'eval' instead if you prefer to see the compiled output in DevTools. // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // devtool: "cheap-module-eval-source-map", // 开启调试 - devtool: "source-map", // 开启调试 + // devtool: "source-map", // 开启调试 // These are the "entry points" to our application. // This means they will be the "root" imports that are included in JS bundle. // The first two entry points enable "hot" CSS and auto-refreshes for JS. diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index 7b9795e80..8cab0465f 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -51,9 +51,12 @@ const extractTextPluginOptions = shouldUseRelativeAssetPaths // This is the production configuration. // It compiles slowly and is focused on producing a fast and minimal bundle. // The development configuration is different and lives in a separate file. - +// 上线用的 // console.log('publicPath ', publicPath) module.exports = { + // externals: { + // 'react': 'window.React' + // }, // Don't attempt to continue if there are any errors. bail: true, // We generate sourcemaps in production. This is slow but gives good results. diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 1daa2d5b1..425255048 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -3453,4 +3453,4 @@ a.singlepublishtwo{ /*.ant-notification{*/ /*width: auto !important;*/ /*max-width: 600px !important;*/ -/*}*/ \ No newline at end of file +/*}*/ diff --git a/public/react/src/common/components/attachment/AttachmentList.js b/public/react/src/common/components/attachment/AttachmentList.js index aee5eb68c..32c632aa1 100644 --- a/public/react/src/common/components/attachment/AttachmentList.js +++ b/public/react/src/common/components/attachment/AttachmentList.js @@ -15,17 +15,10 @@ class AttachmentsList extends Component{

- - { - item.is_pdf && item.is_pdf == true ? - 30 }> - {item.title} - - : - 30 }> - {item.title} - - } + + 30 }> + {item.title} + {item.filesize}

) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 01117b4f8..9f278e807 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -7,7 +7,6 @@ import axios from 'axios'; import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; import { CNotificationHOC } from './common/CNotificationHOC' import {ImageLayerOfCommentHOC} from '../page/layers/ImageLayerOfCommentHOC' - import "./css/Courses.css" //引入对应跳转的组件 @@ -264,9 +263,26 @@ const GraduationTasksSubmiteditApp=Loadable({ loader: () => import('./graduation/tasks/GraduationTasksSubmitedit'), loading: Loading, }) - - - +//普通作业题库详情 +const Generaljobbankdetails =Loadable({ + loader: () => import('../../modules/courses/questionbank/Generaljobbankdetails'), + loading: Loading, +}); +//分组作业题库详情 +const GroupjobbankPage =Loadable({ + loader: () => import('../../modules/courses/groupjobbank/GroupjobbankPage'), + loading: Loading, +}); +//毕设选题详情 +const CompletetopicdePage =Loadable({ + loader: () => import('../../modules/courses/comtopicdetails/CompletetopicdePage'), + loading: Loading, +}); +//毕设任务详情 +const Completetaskpage =Loadable({ + loader: () => import('../../modules/courses/completetaskdetails/Completetaskpage'), + loading: Loading, +}); class CoursesIndex extends Component{ constructor(props) { super(props) @@ -445,7 +461,32 @@ class CoursesIndex extends Component{ // console.log(commons) return ( - + {/*毕设任务题库详情*/} + () + } + > + {/*毕设内容题库详情*/} + () + } + > + {/*GroupjobbankPage*/} + {/*分组作业题库详情*/} + () + } + > + {/*Generaljobbankdetails*/} + {/* 普通作业题库详情*/} + () + } + > {/* 资源列表页 */}

+ { item.author && {item.author} } {item.commit_count===undefined?"":{item.commit_count} 已交} {item.uncommit_count===undefined?"":{item.uncommit_count} 未交} { diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js b/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js new file mode 100644 index 000000000..850ed2b89 --- /dev/null +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js @@ -0,0 +1,84 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import './completetaskdetails.css'; +import GroupPackage from "../groupjobbank/GroupPackage"; +import GroupPackage2 from "../groupjobbank/GroupPackage2"; + + +class Groupjobbandetails extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Groupjobbandetails"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +

+
+ +
+ + + + +
+ + +
+ + + ) + } +} + +export default Groupjobbandetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js new file mode 100644 index 000000000..d7cd7a62c --- /dev/null +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js @@ -0,0 +1,138 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; +import axios from 'axios'; +import { + notification +} from "antd"; +import CoursesListType from '../coursesPublic/CoursesListType'; +import Completetaskdetails from './Completetaskdetails'; +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; + +class Completetaskpage extends Component { + //分组作业内容详情 + constructor(props) { + super(props); + // this.answerMdRef = React.createRef(); + this.setState({ + workid:1, + isSpin:false, + datas:[], + }) + } + + + + componentDidMount() { + // console.log("父组件加载框"); + if( this.props.match.params.workid){ + this.setState({ + workid: this.props.match.params.workid, + }) + } + this.getdata(this.props.match.params.workid); + } + // 获取数据的地方 + getdata=(workid)=>{ + var workids= workid; + if(workids){ + + }else{ + workids=this.state.workid; + } + this.setState({ + isSpin:true, + }) + let url = `/homework_banks/${workids}.json`; + // + axios.get(url).then((response) => { + if(response){ + if(response.data){ + this.setState({ + datas:response.data.informs, + }) + }else { + this.setState({ + datas:[], + + }) + + } + }else { + this.setState({ + datas:[], + }) + + } + this.setState({ + isSpin:false, + }) + }).catch((error) => { + console.log(error) + this.setState({ + datas:[], + isSpin:false, + }) + }); + } + + + + bindRef = ref => { this.child = ref } +///////////////教师截止 + + render() { + + const isAdmin = this.props.isAdmin(); + // console.log(119) + + + return ( +
+ + +
+ +
+

+ 题库 + > + 详情 +

+
+
+

+ MySQL数据库编程开发实训(基础篇) +

+ +
+ +
+ +
+ + + +
+
+ ) + } +} + +export default Completetaskpage; + diff --git a/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css b/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css new file mode 100644 index 000000000..fd1b10f51 --- /dev/null +++ b/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css @@ -0,0 +1,58 @@ +.yslquestionbank1{ + padding-top: 30px !important; + padding-right: 30px !important; + padding-left: 30px !important; +} +.yslquesHeigth{ + min-height: 500px !important; + +} +.yslquesmarkdowntext{ + font-size: 16px; + color: #707070; + +} +.yslquesmat26{ + margin-top: 26px; + padding-bottom: 33px !important; +} +.ysltextcolor9999{ + color: #999999; + font-size: 14px; +} +.ysltextcolor66{ + color: #666666; + font-size: 14px; +} +.ysltextcolor05{ + color: #05101A; + font-size: 14px; +} +.ml47text{ + margin-left: 17px; + padding-bottom: 37px; +} +.ysltextcolor99999{ + color: #999999; + font-size: 16px; +} +.yslboomdivs{ + + display: flex; + justify-content:flex-start; +} +.yslboomdivs p{ + width: 282px; +} +.yslboomdivs p span { + text-align: left; +} +.yslboomdivsy{ + color: #999999; + font-size: 14px; + +} +.yslboomdivsys{ + color: #666666; + font-size: 14px; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js new file mode 100644 index 000000000..cde4f5f5e --- /dev/null +++ b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js @@ -0,0 +1,141 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; +import axios from 'axios'; +import { + notification +} from "antd"; +import CoursesListType from '../coursesPublic/CoursesListType'; +import Completetopicdetails from './Completetopicdetails'; +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; + +class CompletetopicdePage extends Component { + //毕设选题内容详情 + constructor(props) { + super(props); + // this.answerMdRef = React.createRef(); + this.setState({ + workid:1, + isSpin:false, + datas:[], + }) + } + + + + + componentDidMount() { + if( this.props.match.params.workid){ + this.setState({ + workid: this.props.match.params.workid, + }) + } + this.getdata(this.props.match.params.workid); + } + //获取数据的地方 + getdata=(workid)=>{ + var workids= workid; + if(workids){ + + }else{ + workids=this.state.workid; + } + this.setState({ + isSpin:true, + }) + let url = `/homework_banks/${workids}.json`; + // + axios.get(url).then((response) => { + if(response){ + if(response.data){ + this.setState({ + datas:response.data.informs, + }) + }else { + this.setState({ + datas:[], + + }) + + } + }else { + this.setState({ + datas:[], + }) + + } + this.setState({ + isSpin:false, + }) + }).catch((error) => { + console.log(error) + this.setState({ + datas:[], + isSpin:false, + }) + }); + } + + /// 确认是否下载 + + + bindRef = ref => { this.child = ref } +///////////////教师截止 + + render() { + + const isAdmin = this.props.isAdmin(); + // console.log(119) + + + return ( +
+ + +
+ +
+

+ 题库 + > + 详情 +

+
+
+

+ MySQL数据库编程开发实训(基础篇) +

+ +
+ +
+ +
+ + + {/*{parseInt(tab) === 1 ? :""}*/} + +
+
+ ) + } +} + +export default CompletetopicdePage; + diff --git a/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js b/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js new file mode 100644 index 000000000..15b4c24cf --- /dev/null +++ b/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js @@ -0,0 +1,115 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import GroupPackage from '../groupjobbank/GroupPackage' +import './completetopicde.css'; + + +class Completetopicdetails extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Generaljobdetails"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
+
+
+ +
+ + +
+
+
+
+

+ 课题类型: + 设计 +

+

+ 课题来源: + 生产/社会实践 +

+

+ 课题性质1: + 设计 +

+

+ 课题性质2: + 设计 +

+
+
+

+ 课题重复情况: + 新需求 +

+

+ 调研或实习地点: + 长沙 +

+

+ 课题单位来源: + 湖南省据C++创始人Stroustrup有限公司 +

+
+
+
+ + + ) + } +} + +export default Completetopicdetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/comtopicdetails/completetopicde.css b/public/react/src/modules/courses/comtopicdetails/completetopicde.css new file mode 100644 index 000000000..fd566ffdc --- /dev/null +++ b/public/react/src/modules/courses/comtopicdetails/completetopicde.css @@ -0,0 +1,58 @@ +.yslquestionbank1{ + padding-top: 30px !important; + padding-right: 30px !important; + padding-left: 30px !important; +} +.yslquesHeigth{ + min-height: 500px !important; + +} +.yslquesmarkdowntext{ + font-size: 16px; + color: #707070; + +} +.yslquesmat26{ + margin-top: 26px; + padding-bottom: 33px !important; +} +.ysltextcolor9999{ + color: #999999; + font-size: 14px; +} +.ysltextcolor66{ + color: #666666; + font-size: 14px; +} +.ysltextcolor05{ + color: #05101A; + font-size: 14px; +} +.ml47text{ + margin-left: 17px; + padding-bottom: 37px; +} +.ysltextcolor99999{ + color: #999999; + font-size: 16px; +} +.yslboomdivs{ + + display: flex; + justify-content:flex-start; +} +.yslboomdivs p{ + width: 282px; +} +.yslboomdivs p span { + text-align: left; +} +.yslboomdivsy{ + color: #999999; + font-size: 14px; + +} +.yslboomdivsys{ + color: #666666; + font-size: 14px; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index dbdd42398..57f567c9e 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -1061,8 +1061,14 @@ samp { .newcoursestitle{ font-size: 12px; color: #989898; - margin-left: 10px; + margin-left: 40px; } +.newcoursestitleysl{ + font-size: 12px; + color: #989898; + margin-left: 51px; +} + .coursenavbox .ant-form-item-label{ margin-left:10px; diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index 5248f4c1a..f61a7852b 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -134,6 +134,7 @@ class ExerciseListItem extends Component{ {/**/}

+ { item.author && {item.author} } {item.exercise_status===1?"":{item.exercise_answer} 已答} {item.exercise_status===1?"":{item.exercise_unanswer} 未答} {item.unreview_count===null||item.exercise_status===1?"":{item.unreview_count} 未评数 } diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index f38ad7435..1fc1905d1 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -553,6 +553,9 @@ class ExerciseReviewAndAnswer extends Component{ height:16px; margin-top:2px; } + .standardAnswer.editormd-html-preview,.answerStyle.editormd-html-preview{ + width:100%!important + } `} {/*

*/} { // 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮 - isAdmin && ((parseInt(item.answer_status) == 1 && item.question_type == 4) || item.question_type == 3) ? + isAdmin && ((parseInt(item.answer_status) != 0 && item.question_type == 4) || item.question_type == 3) ? this.showSetScore(key,item.setScore,item.q_position+"_"+item.question_type)}>调分:"" } { @@ -724,11 +727,17 @@ class ExerciseReviewAndAnswer extends Component{ isAdmin && parseInt(item.answer_status) == 0 && item.question_type == 4 ? 未批:"" } + { + // 客观题:老师||学生(试卷已截止且答案公开)显示正确答案 + item.question_type < 3 && item.standard_answer_show ? + + 正确答案:{ item.standard_answer_show } + :"" + } { //(老师身份且除实训题外) || (学生身份且试卷已经截止)就显示用户当前题目所得分数 ( isAdmin || (isStudent && exercise.exercise_status == 3)) && item.question_type != 5 && item.user_score ? - {item.user_score} : "" } diff --git a/public/react/src/modules/courses/exercise/new/JudgeEditor.js b/public/react/src/modules/courses/exercise/new/JudgeEditor.js index 41bc5bac4..6e6e89793 100644 --- a/public/react/src/modules/courses/exercise/new/JudgeEditor.js +++ b/public/react/src/modules/courses/exercise/new/JudgeEditor.js @@ -195,8 +195,8 @@ class SingleEditor extends Component{
{/* disabled={exerciseIsPublish} */} - - + 正确 + 错误 {/* not work */} {/* this.onOptionClick(0)} disabled={exerciseIsPublish}>对 diff --git a/public/react/src/modules/courses/exercise/question/fillEmpty.js b/public/react/src/modules/courses/exercise/question/fillEmpty.js index 5179432a2..24ff7b641 100644 --- a/public/react/src/modules/courses/exercise/question/fillEmpty.js +++ b/public/react/src/modules/courses/exercise/question/fillEmpty.js @@ -108,7 +108,7 @@ class fillEmpty extends Component{ array.map((item,key)=>{ return(
  • - 答案(填空{key+1}) + 答案(填空{key+1}):
    { user_exercise_status == 1 ? @@ -135,7 +135,7 @@ class fillEmpty extends Component{ { questionType.standard_answer && questionType.standard_answer.map((item,k)=>{ return(
      - 填空{k+1}: + 答案(填空{k+1}):
    • { item.answer_text && item.answer_text.map((i,index)=>{ diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js index b9ec4b75c..16a99aa8f 100644 --- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js +++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js @@ -59,7 +59,7 @@ class Bullsubdirectory extends Component{ } }; changeTopicName = (e) => { - console.log("调用了changeTopicName"); + // console.log("调用了changeTopicName"); let num = e.target.value.length; if(num>60){ diff --git a/public/react/src/modules/courses/gradinforms/Eduinforms.js b/public/react/src/modules/courses/gradinforms/Eduinforms.js index 10beb4507..b23c33fbb 100644 --- a/public/react/src/modules/courses/gradinforms/Eduinforms.js +++ b/public/react/src/modules/courses/gradinforms/Eduinforms.js @@ -107,7 +107,7 @@ class Eduinforms extends Component{ } }; changeTopicName = (e) => { - console.log("调用了changeTopicName"); + // console.log("调用了changeTopicName"); let num = e.target.value.length; if(num>60){ return; diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage.js b/public/react/src/modules/courses/groupjobbank/GroupPackage.js new file mode 100644 index 000000000..8014585d1 --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/GroupPackage.js @@ -0,0 +1,87 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import './questionbanks.css'; + +class GroupPackage extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Groupjobquesanswer"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
      + + + + + + 清除浏览器缓存或换个浏览器操作指南更新版本.zip + + {2} + +
      + ) + } +} + +export default GroupPackage; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js new file mode 100644 index 000000000..6a48a51c8 --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js @@ -0,0 +1,73 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import './questionbanks.css'; + +class GroupPackage extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Groupjobquesanswer"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
      +

      + 分组要求: + 2~ 5(学生提交作品时需要关联同组成员,组内成员作品共享) +

      +

      + 基于项目实施 + (学生必须在本平台创建项目,项目管理员可以提交作品) +

      +
      + ) + } +} + +export default GroupPackage; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js new file mode 100644 index 000000000..772752def --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js @@ -0,0 +1,84 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import './questionbanks.css'; +import GroupPackage from "./GroupPackage"; +import GroupPackage2 from "./GroupPackage2"; + + +class Groupjobbandetails extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Groupjobbandetails"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
      +
      + +
      + + + + +
      + + +
      + + + ) + } +} + +export default Groupjobbandetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js new file mode 100644 index 000000000..27827eb28 --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js @@ -0,0 +1,175 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; +import axios from 'axios'; +import { + notification +} from "antd"; +import CoursesListType from '../coursesPublic/CoursesListType'; +import Groupjobbandetails from './Groupjobbandetails'; +import Groupjobquesanswer from './Groupjobquesanswer'; +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; + +class GroupjobbankPage extends Component { + //分组作业内容详情 + constructor(props) { + super(props); + // this.answerMdRef = React.createRef(); + this.state = { + tab: ["0"], + workid:1, + isSpin:false, + datas:[], + } + + } + + //切换tab + ChangeTab = (e) => { + // console.log(e); + this.setState({ + tab: e + }) + try { + var currenturl = window.location.href; + var newUrl = (currenturl.split("?"))[0]; + window.history.pushState('','',newUrl+'?tab='+e); + }catch (e) { + console.log(e); + console.log("44"); + } + + } + + + componentDidMount() { + // console.log("父组件加载框"); + const query = this.props.location.search; + const type = query.split('?tab='); + // let sum = [] + // sum.push(type[1]) + // console.log("componentDidMountcomponentDidMount"); + // console.log(type); + this.setState({ + tab: type[1], + }) + let querys = this.props.location.pathname; + const types = querys.split('/'); + // console.log(types); + this.setState({ + shixuntypes: types[3] + }) + if( this.props.match.params.workid){ + this.setState({ + workid: this.props.match.params.workid, + }) + } + this.getdata(this.props.match.params.workid); + } + ///获取数据的地方 + getdata=(workid)=>{ + var workids= workid; + if(workids){ + + }else{ + workids=this.state.workid; + } + this.setState({ + isSpin:true, + }) + let url = `/homework_banks/${workids}.json`; + // + axios.get(url).then((response) => { + if(response){ + if(response.data){ + this.setState({ + datas:response.data.informs, + }) + }else { + this.setState({ + datas:[], + + }) + + } + }else { + this.setState({ + datas:[], + }) + + } + this.setState({ + isSpin:false, + }) + }).catch((error) => { + console.log(error) + this.setState({ + datas:[], + isSpin:false, + }) + }); + } + + + bindRef = ref => { this.child = ref } +///////////////教师截止 + + render() { + let {tab} = this.state; + + const isAdmin = this.props.isAdmin(); + // console.log(119) + + + return ( +
      + + +
      + +
      +

      + 题库 + > + 详情 +

      +
      +
      +

      + MySQL数据库编程开发实训(基础篇) +

      + +
      + + + + {parseInt(tab) === 0 ? :""} + {parseInt(tab) === 1 ? :""} + +
      +
      + ) + } +} + +export default GroupjobbankPage; + diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js b/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js new file mode 100644 index 000000000..c6a0f787f --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js @@ -0,0 +1,82 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import GroupPackage from './GroupPackage'; +import GroupPackage2 from './GroupPackage2'; +import './questionbanks.css'; + +class Groupjobquesanswer extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Groupjobquesanswer"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
      +
      + +
      + + + + +
      + + +
      + + ) + } +} + +export default Groupjobquesanswer; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/questionbanks.css b/public/react/src/modules/courses/groupjobbank/questionbanks.css new file mode 100644 index 000000000..aae0c979f --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/questionbanks.css @@ -0,0 +1,41 @@ +.yslquestionbank1{ + padding-top: 30px !important; + padding-right: 30px !important; + padding-left: 30px !important; +} +.yslquesHeigth{ + min-height: 500px !important; + +} +.yslquesmarkdowntext{ + font-size: 16px; + color: #707070; + +} +.yslquesmat26{ + margin-top: 26px; + padding-bottom: 33px !important; +} +.ysltextcolor9999{ + color: #999999; + font-size: 14px; +} +.ysltextcolor66{ + color: #666666; + font-size: 14px; +} +.ysltextcolor05{ + color: #05101A; + font-size: 14px; +} +.ml47text{ + margin-left: 17px; + padding-bottom: 37px; +} +.ysltextcolor99999{ + color: #999999; + font-size: 16px; +} +.yslahover { + color: #999999 ; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 3462438f8..371d4e74e 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -129,7 +129,7 @@ class studentsList extends Component{ } /// 确认是否下载 confirmysl(url){ - axios.get(url + '&export=true').then((response) => { + axios.get(url).then((response) => { if(response === undefined){ return } @@ -506,9 +506,12 @@ class studentsList extends Component{ const { course_group_name, invite_code } = this.state; const courseId = this.props.match.params.coursesId - let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?` + let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩 + let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息 + let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度 + const params = {} - if (course_group_id) { + if (checkBoxValues) { params.group_id = course_group_id } if (searchValue) { @@ -522,6 +525,11 @@ class studentsList extends Component{ paramsString += `${key}=${params[key]}&` } exportUrl += paramsString; + exportUrltwo+=paramsString; + exportUrlthree+=paramsString; + // console.log(paramsString); + // console.log(checkBoxValues); + // console.log(searchValue); return( this.addDir()}>添加分班 } { isAdmin && !isParent && course_group_id != 0 && this.deleteDir()}>删除分班 } { isAdmin && !isParent && course_group_id != 0 && this.renameDir()}>分班重命名 } - { isAdmin && this.confirmysl(exportUrl)} >导出成绩 } + + { isAdmin && +
    • + 导出 + +
    • + } + {/*this.confirmysl(exportUrl)} >导出成绩*/} {/* */} } @@ -576,60 +618,6 @@ class studentsList extends Component{ } onPressEnter={this.onPressEnter} > - {/*
      -

      - 学生列表 - 邀请码:CKPYL -

    • - 导入创建分班 - this.showStuNewBox(1)}>新建分班 - this.delClasses()}>删除分班 - this.showStuNewBox(2)}>分班重命名 - 导出成绩 -
    • -

      -
      - 位学生 -
      - -
      -
      - - - - -
      -
      - 分班: - -
      -
      - 取消 - 确定 -
      -
      -
      -
      */} - - - { total_count > 0 || this.state.isSpin == true ?
      diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index cbcb33fc2..7ff0a9e4c 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -47,9 +47,7 @@ class CoursesNew extends Component { checkboxgroup:undefined, addonAfteronelenone:0, addonAfteronelentwo:0, - checkbofrup:[{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"},{module_type:"group_homework",module_name:"分组作业"} - ,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"},{module_type:"graduation",module_name:"毕业设计"} - ,{module_type:"board",module_name:"讨论"},{module_type:"attachment",module_name:"资源"},{module_type:"course_group",module_name:"分班"}], + bordebool:false, } } componentDidMount() { @@ -364,14 +362,16 @@ class CoursesNew extends Component { search:value }).then((result)=>{ // console.log(result.data) - if (result.data.message===undefined) { + if(result){ + if (result.data.message===undefined) { - this.setState({ - searchlist: result.data.course_lists, - // course:value, + this.setState({ + searchlist: result.data.course_lists, + // course:value, - }) - } + }) + } + } // this.props.form.setFieldsValue({ // course:value // }) @@ -380,8 +380,8 @@ class CoursesNew extends Component { }) } handleSearch=(value)=>{ - - + console.log("handleSearchhandleSearch"); + console.log(value); if(value!=""){ this.props.form.setFieldsValue({ classroom:value, @@ -391,13 +391,40 @@ class CoursesNew extends Component { } }; + handleSearchsysl=(value)=>{ + if(value){ + this.props.form.setFieldsValue({ + classroom:value, + // course:value + }); + } + } - handleChange=(value)=>{ - + handleChange=(e)=>{ this.props.form.setFieldsValue({ - // course:value, - classroom:value + // course:value, + classroom:e.target.value, }) + if(e.target.value){ + if(e.target.value.length>60){ + this.setState({ + bordebool:true, + }) + }else if(e.target.value.length===0){ + this.setState({ + bordebool:true, + }) + }else{ + this.setState({ + bordebool:false, + }) + } + }else{ + this.setState({ + bordebool:true + }) + + } }; handleSearchschool=(value)=>{ @@ -467,7 +494,7 @@ class CoursesNew extends Component { this.applyForAddOrgForm.setVisible(true) } render() { - let {datatime,school,searchlistscholl} = this.state; + let {datatime,school,searchlistscholl,bordebool} = this.state; const {getFieldDecorator} = this.props.form; const propsWithoutForm = Object.assign({}, this.props) delete propsWithoutForm.form @@ -489,6 +516,16 @@ class CoursesNew extends Component { if(addonAftertwo){ addonAfteronelens=String(addonAftertwo).length; } + var addonAfterthree=this.props.form&&this.props.form.getFieldValue('course'); + var addonAfteronelens3=0; + if(addonAfterthree){ + addonAfteronelens3=String(addonAfterthree).length; + } + var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom'); + var addonAfteronelens4=0; + if(addonAfterfour){ + addonAfteronelens4=String(addonAfterfour).length; + } return ( @@ -543,27 +580,23 @@ class CoursesNew extends Component { `} -
      + {/*内容*/} + + {getFieldDecorator('course', { + rules: [{required: true, message: "不能为空"}], + })( + + + + )} - + {/*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*/}

      @@ -600,8 +667,8 @@ class CoursesNew extends Component { 错误示例:数据结构2019春

      -
      -
      +
      +
    @@ -616,14 +683,41 @@ class CoursesNew extends Component { }
    + + {getFieldDecorator('classroom', { rules: [{required: true, message: "不能为空"}], - })()} - + })()} + {/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/} -

    +

    正确示例:数据结构2019春季班级

    @@ -672,11 +766,7 @@ class CoursesNew extends Component { rules:[{ pattern: new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/, "g"), message: '必须是数值' - }, - { - max:5, - message: '不能超过5个字符', - }]} + }]} )( )} @@ -691,14 +781,10 @@ class CoursesNew extends Component { rules:[{ pattern: new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/, "g"), message: '必须是数值' - }, - { - max:5, - message: '不能超过5个字符', - } + } ]} )( - + )}
    { @@ -110,8 +105,8 @@ class Goldsubject extends Component { }; componentDidMount() { - console.log("新建精品课堂的数据"); - console.log(this.props); + // console.log("新建精品课堂的数据"); + // console.log(this.props); let coursesId = this.props.match.params.coursesId; let user_school=this.props.current_user&&this.props.current_user.user_school; @@ -164,8 +159,8 @@ class Goldsubject extends Component { if (response) { // this.goback if(response.data){ - console.log("获取Goldsubject.js"); - console.log(response.data); + // console.log("获取Goldsubject.js"); + // console.log(response.data); if(response.data.status===0){ this.props.form.setFieldsValue({ classroom: response.data.course_name, @@ -206,20 +201,20 @@ class Goldsubject extends Component { } } onChangeTimepublishs = (date, dateString) => { - console.log("结束时间11111111111"); - console.log(dateString); + // console.log("结束时间11111111111"); + // console.log(dateString); if(dateString===""){ this.setState({ datatime: undefined, }) - console.log("结束时间111111111116"); + // console.log("结束时间111111111116"); this.props.form.setFieldsValue({ endtime:undefined, }); }else{ - console.log("结束时间111111111117"); + // console.log("结束时间111111111117"); this.setState({ datatime: dateString, @@ -231,10 +226,10 @@ class Goldsubject extends Component { }; onChangeTimepublishstwo = (date, dateString) => { - console.log("结束时间22222222222"); - console.log(dateString); + // console.log("结束时间22222222222"); + // console.log(dateString); if(dateString===""){ - console.log("结束时间222222222223"); + // console.log("结束时间222222222223"); this.setState({ datatimetwo: undefined, }) @@ -242,7 +237,7 @@ class Goldsubject extends Component { starttime: undefined, }); }else{ - console.log("结束时间222222222224"); + // console.log("结束时间222222222224"); this.setState({ datatimetwo: dateString, @@ -320,13 +315,23 @@ class Goldsubject extends Component { if (!err) { + var classroomysl=values.classroom+""; + + try { + if(classroomysl){ + if(classroomysl.length>60){ + classroomysl=classroomysl.substring(0,60); + } + } + }catch (e) { + } // console.log('Received values of form: ', values); var datasysl={ // subject_id:128, //这是带过来的值 编辑就不要传值了 - name: values.classroom, + name: classroomysl, class_period: values.period, credit: parseFloat(values.credit), start_date:moment(values.starttime).format("YYYY-MM-DD"), @@ -336,12 +341,12 @@ class Goldsubject extends Component { school:values.school }; try { - console.log("327"); - console.log(datasysl); + // console.log("327"); + // console.log(datasysl); // console.log(JSON.stringify(datasysl)); - console.log("88887777"); - console.log(moment(values.starttime).format("YYYY-MM-DD")); - console.log(moment(values.endtime).format("YYYY-MM-DD")); + // console.log("88887777"); + // console.log(moment(values.starttime).format("YYYY-MM-DD")); + // console.log(moment(values.endtime).format("YYYY-MM-DD")); }catch (e) { } @@ -375,15 +380,15 @@ class Goldsubject extends Component { }) } - console.log("错误信息信息信息1"); - console.log(err); - console.log(values.starttime); - console.log(values.endtime); + // console.log("错误信息信息信息1"); + // console.log(err); + // console.log(values.starttime); + // console.log(values.endtime); }); } else { this.props.form.validateFields((err, values) => { - console.log("错误信息信息信息2"); + // console.log("错误信息信息信息2"); console.log(err); if (err) { return; @@ -419,11 +424,11 @@ class Goldsubject extends Component { school:values.school }; try { - console.log("提交的ysldatas数据"); - console.log(ysldatas); + // console.log("提交的ysldatas数据"); + // console.log(ysldatas); // console.log(JSON.stringify(ysldatas)); - console.log(moment(values.starttime).format("YYYY-MM-DD")); - console.log(moment(values.endtime).format("YYYY-MM-DD")); + // console.log(moment(values.starttime).format("YYYY-MM-DD")); + // console.log(moment(values.endtime).format("YYYY-MM-DD")); }catch (e) { } @@ -527,12 +532,33 @@ class Goldsubject extends Component { }; - handleChange=(value)=>{ - + handleChange=(e)=>{ + console.log(e); this.props.form.setFieldsValue({ // course:value, - classroom:value + classroom:e.target.value, }) + if(e.target.value){ + if(e.target.value.length>60){ + this.setState({ + bordebool:true, + }) + }else if(e.target.value.length===0){ + this.setState({ + bordebool:true, + }) + }else{ + this.setState({ + bordebool:false, + }) + } + }else{ + this.setState({ + bordebool:true + }) + + } + }; handleSearchschool=(value)=>{ @@ -602,7 +628,7 @@ class Goldsubject extends Component { this.applyForAddOrgForm.setVisible(true) } render() { - let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state; + let {datatime,datatimetwo,school,bordebool,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state; const {getFieldDecorator} = this.props.form; const propsWithoutForm = Object.assign({}, this.props) delete propsWithoutForm.form @@ -624,8 +650,12 @@ class Goldsubject extends Component { if(addonAftertwo){ addonAfteronelens=String(addonAftertwo).length; } - console.log(addonAfteronelenone); - console.log(addonAfteronelentwo); + var addonAfterthree=this.props.form&&this.props.form.getFieldValue('classroom'); + var addonAfteronelens3=0; + if(addonAfterthree){ + addonAfteronelens3=String(addonAfterthree).length; + } + return ( @@ -687,20 +717,16 @@ class Goldsubject extends Component { .ant-select-dropdown{ // top: 221px !important; // left: 115px !important; - width: 280px !important; height: 160px; } .ant-select-dropdown-menu{ - width: 280px !important; height: 160px; } .construction .ant-input{ - width: 280px !important; margin-left: 0px !important; } .construction { - width: 280px; - margin-left: 10px; + margin-left: 11px; } .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { @@ -753,19 +779,61 @@ class Goldsubject extends Component { }
    - + + {getFieldDecorator('classroom', { - rules: [{required: true, message: "不能为空"}], + rules: [{required: true, message: "不能为空"}], })( - - {options} + )} {/**/} @@ -863,7 +931,6 @@ class Goldsubject extends Component { width={"210px"} value={datatimetwo === undefined ? "" :datatimetwo === null ? "" : moment(datatimetwo, dateFormat)} disabledTime={disabledDateTime} - disabledDate={this.isabledStartDate} dropdownClassName="hideDisable" onChange={this.onChangeTimepublishstwo} /> @@ -887,7 +954,6 @@ class Goldsubject extends Component { width={"210px"} value={datatime === undefined ? "" :datatime === null ? "" : moment(datatime, dateFormat)} disabledTime={disabledDateTime} - disabledDate={this.disabledEndDate} dropdownClassName="hideDisable" onChange={this.onChangeTimepublishs} /> diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js index a01c142a4..aae09b41c 100644 --- a/public/react/src/modules/courses/poll/Poll.js +++ b/public/react/src/modules/courses/poll/Poll.js @@ -103,11 +103,11 @@ class Poll extends Component{ this.InitList(e.key,StudentList_value,page); } // 获取列表数据 - InitList=(type,search,page)=>{ + InitList=(type,search,page,bank_checkValue)=>{ this.setState({ isSpin:true }) - let {pageSize}=this.state + let { pageSize,checkBoxValues }=this.state let coursesId=this.props.match.params.coursesId; let url='/courses/'+coursesId+'/polls.json?limit='+pageSize+'&page='+page if(type!="0"){ @@ -123,7 +123,7 @@ class Poll extends Component{ course_types:result.data.course_types, polls_counts:result.data.polls_counts, isSpin:false, - checkBoxValues:[] + checkBoxValues: bank_checkValue ? bank_checkValue : [] }) } }).catch((error)=>{ @@ -209,12 +209,6 @@ class Poll extends Component{ //判断是否有选中数据 if(this.state.checkBoxValues.length==0){ this.props.showNotification("请先在列表中选择数据"); - // this.setState({ - // modalsType:true, - // modalsTopval:"请先在列表中选择数据", - // modalsBottomval:'', - // loadtype:true - // }) }else{ if(value != "bank"){ this.setState({ @@ -325,15 +319,13 @@ class Poll extends Component{ } // 题库选用成功后,立即发布,刷新页面 useBankSuccess=(checkValue,value)=>{ + debugger; this.setState({ isSpin:true }) let{type,StudentList_value,page}=this.state - this.InitList(type,StudentList_value,page); + this.InitList(type,StudentList_value,page,value); - this.setState({ - checkBoxValues:[] - }) let coursesId=this.props.match.params.coursesId; let url=`/courses/${coursesId}/polls/publish_modal.json`; axios.get(url,{ @@ -351,10 +343,6 @@ class Poll extends Component{ }) } } - this.setState({ - course_groups:list, - checkBoxValues:value - }) this.setState({ modalname:"立即发布", modaltype:response.data.un_publish > 0 ? 1 : 2, @@ -369,6 +357,8 @@ class Poll extends Component{ Savesname:"立即发布", Cancel:this.homeworkhide, Saves:this.homeworkstartend, + course_groups:list, + checkBoxValues:value }) } }).catch((error) => { @@ -425,7 +415,7 @@ class Poll extends Component{ addname:undefined, addnametype:false, addnametab:undefined, - checkBoxValues:[] + // checkBoxValues:[] }) } diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 6f081b952..eda994a9a 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -54,6 +54,7 @@ class PollListItem extends Component{ }

    + { item.author && {item.author} } { item.polls_status !=1 && diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 27194e5e0..ea84586d8 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -77,7 +77,7 @@ class PollNew extends Component { } changeTopicName = (e) => { - console.log("调用了changeTopicName"); + // console.log("调用了changeTopicName"); let num = parseInt(e.target.value.length); if(num>60){ return; diff --git a/public/react/src/modules/courses/questionbank/Generaljobanswer.js b/public/react/src/modules/courses/questionbank/Generaljobanswer.js new file mode 100644 index 000000000..3bfc6cd36 --- /dev/null +++ b/public/react/src/modules/courses/questionbank/Generaljobanswer.js @@ -0,0 +1,79 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import GroupPackage from '../groupjobbank/GroupPackage' +import './questionbank.css'; + +class Generaljobanswer extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Generaljobanswer"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +

    +
    + +
    + + +
    + + +
    + + ) + } +} + +export default Generaljobanswer; \ No newline at end of file diff --git a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js new file mode 100644 index 000000000..29453a7b5 --- /dev/null +++ b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js @@ -0,0 +1,173 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; +import axios from 'axios'; +import { + notification +} from "antd"; +import CoursesListType from '../coursesPublic/CoursesListType'; +import Generaljobdetails from './Generaljobdetails'; +import Generaljobanswer from './Generaljobanswer'; +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; + +class Generaljobbankdetails extends Component { + //普通作业内容详情 + constructor(props) { + super(props); + // this.answerMdRef = React.createRef(); + this.state = { + tab: ["0"], + workid:1, + isSpin:false, + datas:[], + } + + } + + //切换tab + ChangeTab = (e) => { + // console.log(e); + this.setState({ + tab: e + }) + try { + var currenturl = window.location.href; + var newUrl = (currenturl.split("?"))[0]; + window.history.pushState('','',newUrl+'?tab='+e); + }catch (e) { + console.log(e); + console.log("44"); + } + + } + + + componentDidMount() { + // console.log("父组件加载框"); + const query = this.props.location.search; + const type = query.split('?tab='); + // let sum = [] + // sum.push(type[1]) + // console.log("componentDidMountcomponentDidMount"); + // console.log(type); + this.setState({ + tab: type[1], + }); + + + console.log("Generaljobbankdetails"); + console.log(this.props); + if( this.props.match.params.workid){ + this.setState({ + workid: this.props.match.params.workid, + }) + } + this.getdata(this.props.match.params.workid); + } + //获取数据的地方 + getdata=(workid)=>{ + var workids= workid; + if(workids){ + + }else{ + workids=this.state.workid; + } + this.setState({ + isSpin:true, + }) + let url = `/homework_banks/${workids}.json`; + // + axios.get(url).then((response) => { + if(response){ + if(response.data){ + this.setState({ + datas:response.data.informs, + }) + }else { + this.setState({ + datas:[], + + }) + + } + }else { + this.setState({ + datas:[], + }) + + } + this.setState({ + isSpin:false, + }) + }).catch((error) => { + console.log(error) + this.setState({ + datas:[], + isSpin:false, + }) + }); + } + + + bindRef = ref => { this.child = ref } +///////////////教师截止 + + render() { + let {tab} = this.state; + + const isAdmin = this.props.isAdmin(); + // console.log(119) + + + return ( +
    + + +
    + +
    +

    + 题库 + > + 详情 +

    +
    +
    +

    + MySQL数据库编程开发实训(基础篇) +

    + +
    + + + + {parseInt(tab) === 0 ? :""} + {parseInt(tab) === 1 ? :""} + +
    +
    + ) + } +} + +export default Generaljobbankdetails; + diff --git a/public/react/src/modules/courses/questionbank/Generaljobdetails.js b/public/react/src/modules/courses/questionbank/Generaljobdetails.js new file mode 100644 index 000000000..9de444123 --- /dev/null +++ b/public/react/src/modules/courses/questionbank/Generaljobdetails.js @@ -0,0 +1,81 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import GroupPackage from '../groupjobbank/GroupPackage' +import './questionbank.css'; + + +class Generaljobdetails extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Generaljobdetails"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
    +
    + +
    + + +
    + + +
    + + + ) + } +} + +export default Generaljobdetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/questionbank/questionbank.css b/public/react/src/modules/courses/questionbank/questionbank.css new file mode 100644 index 000000000..43dcfa9c6 --- /dev/null +++ b/public/react/src/modules/courses/questionbank/questionbank.css @@ -0,0 +1,26 @@ +.yslquestionbank1{ + padding-top: 30px !important; + padding-right: 30px !important; + padding-left: 30px !important; +} +.yslquesHeigth{ + min-height: 500px !important; + +} +.yslquesmarkdowntext{ + font-size: 16px; + color: #707070; + +} +.yslquesmat26{ + margin-top: 26px; + padding-bottom: 44px !important; +} +.ysltextcolor9999{ + color: #999999; + font-size: 14px; +} +.ysltextcolor99999{ + color: #999999; + font-size: 16px; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 942c06800..9a9f9bd29 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -333,7 +333,7 @@ class ShixunhomeWorkItem extends Component{

    {/* {discussMessage.author.name} */} - + { discussMessage.author && {discussMessage.author} } {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} {discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交} {/*{discussMessage.replies_count} 3 未评*/}