diff --git a/public/images/course/guide/1-1.png b/public/images/course/guide/1-1.png new file mode 100644 index 000000000..c59467c5d Binary files /dev/null and b/public/images/course/guide/1-1.png differ diff --git a/public/images/course/guide/1-2.png b/public/images/course/guide/1-2.png new file mode 100644 index 000000000..1a4f26f38 Binary files /dev/null and b/public/images/course/guide/1-2.png differ diff --git a/public/images/course/guide/1-3.png b/public/images/course/guide/1-3.png new file mode 100644 index 000000000..f54250747 Binary files /dev/null and b/public/images/course/guide/1-3.png differ diff --git a/public/images/course/guide/1-4.png b/public/images/course/guide/1-4.png new file mode 100644 index 000000000..6ecd3bfb7 Binary files /dev/null and b/public/images/course/guide/1-4.png differ diff --git a/public/images/course/guide/1-5.png b/public/images/course/guide/1-5.png new file mode 100644 index 000000000..c4205496d Binary files /dev/null and b/public/images/course/guide/1-5.png differ diff --git a/public/images/course/guide/1-6.png b/public/images/course/guide/1-6.png new file mode 100644 index 000000000..5d5f76f7f Binary files /dev/null and b/public/images/course/guide/1-6.png differ diff --git a/public/images/course/guide/1-7.png b/public/images/course/guide/1-7.png new file mode 100644 index 000000000..65cadf0c7 Binary files /dev/null and b/public/images/course/guide/1-7.png differ diff --git a/public/react/src/modules/comment/Comments.js b/public/react/src/modules/comment/Comments.js index 42fea091c..20f48cd92 100644 --- a/public/react/src/modules/comment/Comments.js +++ b/public/react/src/modules/comment/Comments.js @@ -484,7 +484,7 @@ class Comments extends Component { const goldRewardInputErrorObj = goldRewardInputError ? {'error': 'error'} : {} return ( -
+
{ usingAntdModal ? { + this.setState({ + inputValue: e.target.value + }) + } + open = () => { + this.setState({ visible: true, inputValue: '' }) + } + onSave = () => { + let coursesId = this.props.match.params.coursesId; + const url = `/courses/${coursesId}/boards.json` + let { inputValue } = this.state; + + axios.post(url,{ + name: inputValue + }).then((response)=>{ + if (response.data.status == 0) { + this.onCancel() + this.props.showNotification('添加成功') + this.props.addSuccess && this.props.addSuccess() + } + }).catch((error)=>{ + console.log(error) + }) + } + onCancel = () => { + this.setState({ visible: false, inputValue: '' }) + } + render(){ + let { inputValue, visible } = this.state; + const { title } = this.props; + return( + +
+
{this.props.label}:
+ +
+ + {/* {this.state.NavmodalValuetype===true? + {this.state.NavmodalValues} + :""} */} + + {/* this.state.NavmodalValuetype===true?"clearfix mt20 edu-txt-center": */} +
+ 取消 + 确定 +
+
+ ) + } +} +export default AddDirModal; \ No newline at end of file diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index cf530aba5..97d9436a6 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -3,13 +3,13 @@ import React,{ Component } from "react"; import { Form, Input, InputNumber, Switch, Radio, Slider, Button, Upload, Icon, Rate, Checkbox, message, - Row, Col, Select, Modal + Row, Col, Select, Modal, Divider } from 'antd'; import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; import axios from 'axios' import './board.css' import "../common/formCommon.css" - +import AddDirModal from './AddDirModal' import { RouteHOC } from './common.js' import CBreadcrumb from '../common/CBreadcrumb' import {getUploadActionUrl, bytesToSize, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll} from 'educoder'; @@ -29,14 +29,14 @@ class BoardsNew extends Component{ boards: [] } } - componentDidMount = () => { - - const topicId = this.props.match.params.topicId - + addSuccess = () => { + this.fetchBoards() + } + fetchBoards = () => { + const isEdit = this.isEdit const boardId = this.props.match.params.boardId - const boardsUrl = `/courses/board_list.json?board_id=${boardId}` - const isEdit = !!topicId + const boardsUrl = `/courses/board_list.json?board_id=${boardId}` axios.get(boardsUrl, { }) .then((response) => { if (response.data.status == 0) { @@ -57,8 +57,17 @@ class BoardsNew extends Component{ .catch(function (error) { console.log(error); }); - + } + componentDidMount = () => { + + const topicId = this.props.match.params.topicId + const isEdit = !!topicId this.isEdit = isEdit + + const boardId = this.props.match.params.boardId + + this.fetchBoards() + if (isEdit) { const url = `/messages/${topicId}.json` axios.get(url, { @@ -260,6 +269,12 @@ class BoardsNew extends Component{ return(
+ {/* bor-bottom-greyE */}
{ window.location.href = "/courses/" + this.props.match.params.coursesId + "/settings"; } - render() { - let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon} = this.state; + let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide} = this.state; return (
- + { + is_guide && + } + { coursedata === undefined || coursedata.status===401?
:
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesGuide.js b/public/react/src/modules/courses/coursesDetail/CoursesGuide.js new file mode 100644 index 000000000..b47998d9d --- /dev/null +++ b/public/react/src/modules/courses/coursesDetail/CoursesGuide.js @@ -0,0 +1,44 @@ +import React, {Component} from 'react'; +import '../css/Courses.css'; +import {setImagesUrl} from 'educoder'; + + +class CoursesGuide extends Component { + constructor(props) { + super(props) + this.state={ + step:1 + } + } + render(){ + let {step} = this.state; + return( +
+ +
+ { + step ==1 && +
+

+

+

+ + +

+

+ + + +

+
+ } +
+
+ ) + } +} +export default CoursesGuide; \ 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 eca0c53d5..f79800f28 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -1520,3 +1520,23 @@ input.ant-input-number-input:focus { border-bottom: 1px solid transparent !important; } + +/* 指引 */ +.guidePanel{ + position: fixed; + top:0px; + left: 0px; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.7); + z-index: 10000; +} +.guideFirstRight{ + position: absolute; + right: -90px; +} +.guideFirstLeft{ + position: absolute; + left: -95px; + top:120px; +} diff --git a/public/react/src/modules/courses/exercise/new/SingleEditor.js b/public/react/src/modules/courses/exercise/new/SingleEditor.js index a09cc866c..02efe2443 100644 --- a/public/react/src/modules/courses/exercise/new/SingleEditor.js +++ b/public/react/src/modules/courses/exercise/new/SingleEditor.js @@ -98,7 +98,7 @@ class SingleEditor extends Component{ } } if(!answerArray || answerArray.length == 0) { - this.props.showNotification('请先点击本选择题的正确选项'); return; + this.props.showNotification('请先点击选择本选择题的正确选项'); return; } if(!question_title) { this.props.showNotification('请先输入题目题干'); return; diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index b2a28110d..419f26315 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -224,11 +224,11 @@ class GraduateTaskItem extends Component{ {/* {discussMessage.author.name} */} - {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} - {discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交} + {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} + {discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交} {/*{discussMessage.replies_count} 3 未评*/} - {discussMessage.status_time} + {discussMessage.status_time} {/* { discussMessage.replies_count != 0 && {discussMessage.replies_count} 回复 } diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 15afd4bee..19bb74d44 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -33,6 +33,7 @@ function buildColumns(that) { const { course_groups } = that.state const columns = [{ title: '序号', + width: 28, // dataIndex: 'name', key: 'index', render: (content, item, index) => { @@ -40,12 +41,13 @@ function buildColumns(that) { } },{ title: '用户ID', + width: 82, dataIndex: 'login', key: 'login' }, { title: '姓名', dataIndex: 'name', - width: 160, + width: 140, key: 'name', render: (name, record) => { return {name} @@ -57,7 +59,7 @@ function buildColumns(that) { }] that.state.course_groups && that.state.course_groups.length && columns.push({ title: 管理权限, - width: 230, + // width: 230, key: 'course_groups', dataIndex: 'course_groups', // onClick={() => that.joinCourseGroup(item.id)} @@ -113,6 +115,7 @@ function buildColumns(that) { if (hasGraduationModule) { columns.push({ title: '答辩组', + width: 74, key: 'graduation_group', dataIndex: 'graduation_group', render: text => ( @@ -126,6 +129,7 @@ function buildColumns(that) { columns.push({ title: '操作', key: 'action', + width: 150, align:'center', render: (text, record) => { if (record.application_id) { diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index e1811ed8a..6fd650cea 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -148,13 +148,13 @@ class MemoDetailMDEditor extends Component { margin-right: 0px !important; } .commentInput { - border-bottom: 1px solid #EEEEEE; } .commentInput .editormd{ width:100%!important; } `} -