From 3e4123d3ff32e3238febef70f1b2c3ffcb47a648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 2 Sep 2019 09:26:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=B9=E5=BA=94=E9=97=AE=E7=AD=94?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=AF=B9=E5=BA=94=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkDetailIndex.js | 6 +- .../busyWork/CommonWorkListTemplate.js | 268 +++++++++--------- .../courses/busyWork/CommonWorkQuestion.js | 266 ++++++++--------- .../busyWork/common/WorkDetailPageHeader.js | 4 +- .../graduation/topics/GraduateTopicDetail.js | 2 +- .../shixunHomework/ShixunHomeworkPage.js | 2 +- .../courses/studentWork/StudentHomework.js | 2 +- 7 files changed, 275 insertions(+), 275 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js b/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js index bd1cafaa1..0e86cf420 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js @@ -300,9 +300,9 @@ class CommonWorkDetailIndex extends Component{ className={`${isListModule ? 'active' : '' } `} to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表 this.setState({moduleName: '作业问答'})} - className={`${childModuleName == '作业问答' ? 'active' : '' } `} - to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业问答 + onClick={() => this.setState({moduleName: '作业描述'})} + className={`${childModuleName == '作业描述' ? 'active' : '' } `} + to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业描述 {view_answer == true && this.setState({moduleName: '参考答案'})} className={`${childModuleName == '参考答案' ? 'active' : '' } `} diff --git a/public/react/src/modules/courses/busyWork/CommonWorkListTemplate.js b/public/react/src/modules/courses/busyWork/CommonWorkListTemplate.js index 996486dcc..94f6cc05e 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkListTemplate.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkListTemplate.js @@ -1,135 +1,135 @@ -import React,{Component} from "React"; -import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; -import {Link} from 'react-router-dom'; -import locale from 'antd/lib/date-picker/locale/zh_CN'; -import { WordsBtn } from 'educoder'; -import axios from 'axios'; -import Modals from '../../modals/Modals'; -import CoursesListType from '../coursesPublic/CoursesListType'; -import HomeworkModal from "../coursesPublic/HomeworkModal"; -import moment from 'moment'; -import '../css/Courses.css' -const { Option} = Select; -const CheckboxGroup = Checkbox.Group; -const confirm = Modal.confirm; -let GraduationTasksnewtype=true; -const $ = window.$; -const Search = Input.Search; -const RadioGroup = Radio.Group; - -function scrollTo(className) { - $("html").animate({ scrollTop: $(`${className}`).offset().top - 400 }) -} - - -function range(start, end) { - const result = []; - for (let i = start; i < end; i++) { - result.push(i); - } - return result; -} -function disabledDateTime() { - return { - // disabledHours: () => range(0, 24).splice(4, 20), - disabledMinutes: () => range(1, 30).concat(range(31, 60)), - // disabledSeconds: () => [55, 56], - }; -} -function handleDateString (dateString) { - if (!dateString) return dateString; - const ar = dateString.split(':') - if (ar[1] != '00' && ar[1] != '30') { - return [ar[0], '00'].join(':') - } - return dateString -} -// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting -class CommonWorkSetting extends Component{ - - constructor(props){ - super(props) - this.state={ - course_name:"", - homework_name:"", - - } - } - - - render(){ - const { getFieldDecorator } = this.props.form; - const dateFormat = 'YYYY-MM-DD HH:mm'; - - let {course_name, homework_name - } =this.state; - - let courseId=this.props.match.params.coursesId; - let category_id=this.props.match.params.category_id; - let task_Id=this.props.match.params.task_Id; - const radioStyle = { - display: 'block', - height: '30px', - lineHeight: '30px', - }; - - - return( - - {
- -
-
- -

- {course_name} - > - 毕设任务 - > - 任务详情 -

- -
-

- {homework_name} -

- - 返回 -
- -
-
- 作品列表 - 作业问答 - 参考答案 - 设置 - - { this.end()} }>立即截止 - { this.publish()} }>立即发布 - - 编辑作业 - -
-
- - -
-
-
} - - -
- - ) - } -} - -const CommonWorkSettingForm = Form.create({ name: 'commonworkSettingForm' })(CommonWorkSetting); +import React,{Component} from "React"; +import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; +import {Link} from 'react-router-dom'; +import locale from 'antd/lib/date-picker/locale/zh_CN'; +import { WordsBtn } from 'educoder'; +import axios from 'axios'; +import Modals from '../../modals/Modals'; +import CoursesListType from '../coursesPublic/CoursesListType'; +import HomeworkModal from "../coursesPublic/HomeworkModal"; +import moment from 'moment'; +import '../css/Courses.css' +const { Option} = Select; +const CheckboxGroup = Checkbox.Group; +const confirm = Modal.confirm; +let GraduationTasksnewtype=true; +const $ = window.$; +const Search = Input.Search; +const RadioGroup = Radio.Group; + +function scrollTo(className) { + $("html").animate({ scrollTop: $(`${className}`).offset().top - 400 }) +} + + +function range(start, end) { + const result = []; + for (let i = start; i < end; i++) { + result.push(i); + } + return result; +} +function disabledDateTime() { + return { + // disabledHours: () => range(0, 24).splice(4, 20), + disabledMinutes: () => range(1, 30).concat(range(31, 60)), + // disabledSeconds: () => [55, 56], + }; +} +function handleDateString (dateString) { + if (!dateString) return dateString; + const ar = dateString.split(':') + if (ar[1] != '00' && ar[1] != '30') { + return [ar[0], '00'].join(':') + } + return dateString +} +// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting +class CommonWorkSetting extends Component{ + + constructor(props){ + super(props) + this.state={ + course_name:"", + homework_name:"", + + } + } + + + render(){ + const { getFieldDecorator } = this.props.form; + const dateFormat = 'YYYY-MM-DD HH:mm'; + + let {course_name, homework_name + } =this.state; + + let courseId=this.props.match.params.coursesId; + let category_id=this.props.match.params.category_id; + let task_Id=this.props.match.params.task_Id; + const radioStyle = { + display: 'block', + height: '30px', + lineHeight: '30px', + }; + + + return( + + {
+ +
+
+ +

+ {course_name} + > + 毕设任务 + > + 任务详情 +

+ +
+

+ {homework_name} +

+ + 返回 +
+ +
+
+ 作品列表 + 作业描述 + 参考答案 + 设置 + + { this.end()} }>立即截止 + { this.publish()} }>立即发布 + + 编辑作业 + +
+
+ + +
+
+
} + + +
+ + ) + } +} + +const CommonWorkSettingForm = Form.create({ name: 'commonworkSettingForm' })(CommonWorkSetting); export default CommonWorkSettingForm; \ No newline at end of file diff --git a/public/react/src/modules/courses/busyWork/CommonWorkQuestion.js b/public/react/src/modules/courses/busyWork/CommonWorkQuestion.js index d2ce6b8e4..b14f7b209 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkQuestion.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkQuestion.js @@ -1,134 +1,134 @@ -import React,{Component} from "React"; -import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; -import {Link} from 'react-router-dom'; -import locale from 'antd/lib/date-picker/locale/zh_CN'; -import { WordsBtn, MarkdownToHtml, on, off } from 'educoder'; -import axios from 'axios'; -import Modals from '../../modals/Modals'; -import CoursesListType from '../coursesPublic/CoursesListType'; -import HomeworkModal from "../coursesPublic/HomeworkModal"; -import CheckAllGroup from '../common/button/CheckAllGroup' -import moment from 'moment'; -import CheckCodeModal from '../coursesPublic/modal/CheckCodeModal' -import '../css/Courses.css' -import WorkDetailPageHeader from './common/WorkDetailPageHeader' -import CommonReply from '../common/comments/CommonReply.js' -import TabRightComponents from './common/TabRightComponents' -const { Option} = Select; -const CheckboxGroup = Checkbox.Group; -const confirm = Modal.confirm; -let GraduationTasksnewtype=true; -const $ = window.$; -const Search = Input.Search; -const RadioGroup = Radio.Group; - -class CommonWorkQuestion extends Component{ - - constructor(props){ - super(props) - - this.state={ - course_name:"", - homework_name:"", - search: '' - } - } - fetchData = () => { - let workId=this.props.match.params.workId; - const url = `/homework_commons/${workId}.json` - - axios.get(url).then((result)=> { - if (result.data.course_id) { - - this.setState({ - ...result.data - }, () => { - }) - this.props.initWorkDetailCommonState && this.props.initWorkDetailCommonState( Object.assign({...result.data}, { - moduleName: '作业问答' - })) - } - - }).catch((error)=>{ - console.log(error) - }) - } - componentDidMount() { - this.fetchData() - try { - this.props.triggerRef(this); - }catch (e) { - - } - on('commonwork_fetch_all', this.fetchAllListener) - } - componentWillUnmount() { - off('commonwork_fetch_all', this.fetchAllListener) - } - fetchAllListener = () => { - this.fetchData() - } - - - render(){ - const dateFormat = 'YYYY-MM-DD HH:mm'; - - let {course_name, homework_name, search, page, loadingstate, homework_status, description - , homework_id, homework_user_id, attachments, group_info = {} - } =this.state; - - let courseId=this.props.match.params.coursesId; - let category_id=this.props.match.params.category_id; - let task_Id=this.props.match.params.task_Id; - const isGroup = this.props.isGroup() - /** - - 导出成绩 - - */ - return( - - - {/* 内容区 */} -
- - - { attachments && attachments.map((item) => { - return (
- - - - {item.title} - {item.filesize} -
) - }) } - - {isGroup &&
-
-
分组要求: {group_info.min_num} ~ {group_info.max_num}
-
{group_info.base_on_project ? '基于项目实施' : '不基于项目'}:
-
-
-
(学生提交作品时需要关联同组成员,组内成员作品共享)
-
({group_info.base_on_project ? '学生必须在本平台创建项目,项目管理员可以提交作品' : '无需再平台创建项目,任意小组成员均可以提交作品'})
- {/*
(各小组必须在educoder平台创建项目)
*/} -
-
} - -
- - { homework_id && } -
- - ) - } -} - +import React,{Component} from "React"; +import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; +import {Link} from 'react-router-dom'; +import locale from 'antd/lib/date-picker/locale/zh_CN'; +import { WordsBtn, MarkdownToHtml, on, off } from 'educoder'; +import axios from 'axios'; +import Modals from '../../modals/Modals'; +import CoursesListType from '../coursesPublic/CoursesListType'; +import HomeworkModal from "../coursesPublic/HomeworkModal"; +import CheckAllGroup from '../common/button/CheckAllGroup' +import moment from 'moment'; +import CheckCodeModal from '../coursesPublic/modal/CheckCodeModal' +import '../css/Courses.css' +import WorkDetailPageHeader from './common/WorkDetailPageHeader' +import CommonReply from '../common/comments/CommonReply.js' +import TabRightComponents from './common/TabRightComponents' +const { Option} = Select; +const CheckboxGroup = Checkbox.Group; +const confirm = Modal.confirm; +let GraduationTasksnewtype=true; +const $ = window.$; +const Search = Input.Search; +const RadioGroup = Radio.Group; + +class CommonWorkQuestion extends Component{ + + constructor(props){ + super(props) + + this.state={ + course_name:"", + homework_name:"", + search: '' + } + } + fetchData = () => { + let workId=this.props.match.params.workId; + const url = `/homework_commons/${workId}.json` + + axios.get(url).then((result)=> { + if (result.data.course_id) { + + this.setState({ + ...result.data + }, () => { + }) + this.props.initWorkDetailCommonState && this.props.initWorkDetailCommonState( Object.assign({...result.data}, { + moduleName: '作业描述' + })) + } + + }).catch((error)=>{ + console.log(error) + }) + } + componentDidMount() { + this.fetchData() + try { + this.props.triggerRef(this); + }catch (e) { + + } + on('commonwork_fetch_all', this.fetchAllListener) + } + componentWillUnmount() { + off('commonwork_fetch_all', this.fetchAllListener) + } + fetchAllListener = () => { + this.fetchData() + } + + + render(){ + const dateFormat = 'YYYY-MM-DD HH:mm'; + + let {course_name, homework_name, search, page, loadingstate, homework_status, description + , homework_id, homework_user_id, attachments, group_info = {} + } =this.state; + + let courseId=this.props.match.params.coursesId; + let category_id=this.props.match.params.category_id; + let task_Id=this.props.match.params.task_Id; + const isGroup = this.props.isGroup() + /** + + 导出成绩 + + */ + return( + + + {/* 内容区 */} +
+ + + { attachments && attachments.map((item) => { + return (
+ + + + {item.title} + {item.filesize} +
) + }) } + + {isGroup &&
+
+
分组要求: {group_info.min_num} ~ {group_info.max_num}
+
{group_info.base_on_project ? '基于项目实施' : '不基于项目'}:
+
+
+
(学生提交作品时需要关联同组成员,组内成员作品共享)
+
({group_info.base_on_project ? '学生必须在本平台创建项目,项目管理员可以提交作品' : '无需再平台创建项目,任意小组成员均可以提交作品'})
+ {/*
(各小组必须在educoder平台创建项目)
*/} +
+
} + +
+ + { homework_id && } +
+ + ) + } +} + export default CommonWorkQuestion; \ No newline at end of file diff --git a/public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js b/public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js index 488513c48..c9d99696a 100644 --- a/public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js +++ b/public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js @@ -139,8 +139,8 @@ class WorkDetailPageHeader extends Component{ className={`${childModuleName == '作品列表' ? 'active' : '' } `} to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表 作业问答 + className={`${childModuleName == '作业描述' ? 'active' : '' } `} + to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业描述 {view_answer == true && 参考答案} diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js index b518c44f3..65b093d2b 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js @@ -121,7 +121,7 @@ class GraduateTopicDetail extends Component{
选题列表 - 选题问答 + 选题描述
{/* null: 未选题 0:待确认 1:已同意 2:已拒绝 */} diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index dddd39989..4f403205d 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -162,7 +162,7 @@ class ShixunHomeworkPage extends Component {
this.ChangeTab(0)}>作品列表 - this.ChangeTab(1)}>作业问答 + this.ChangeTab(1)}>作业描述 {this.props.isAdmin() ? this.state.code_review === true || jobsettingsdatapage === undefined ? [""] : jobsettingsdatapage.data.homework_status[0] === "未发布" ? "" :
作业列表 - 作业问答 + 作业描述 配置 立即发布 导出成绩 From 72b438a280b232948492e9de469356bf5aac94a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 2 Sep 2019 09:28:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AF=B9=E5=BA=94=E9=97=AE=E7=AD=94?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=AF=B9=E5=BA=94=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/tasks/GraduationTaskssetting.js | 2 +- .../courses/graduation/tasks/GraduationTaskssettinglist.js | 4 ++-- .../graduation/tasks/GraduationTaskssettingquestions.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index e0b327016..17317d6b2 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -1088,7 +1088,7 @@ class GraduationTaskssettingapp extends Component{
任务列表 - 任务问答 + 毕设描述 设置 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 1b25a5717..7e60b995c 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1117,7 +1117,7 @@ class GraduationTaskssettinglist extends Component{ {/*导出成绩*/} {/*导出作品附件*/} 任务列表 - 任务问答 + 毕设描述 设置 @@ -1415,7 +1415,7 @@ class GraduationTaskssettinglist extends Component{
任务列表 - 任务问答 + 毕设描述 设置 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index b8296f9ef..c40c9aa54 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -330,7 +330,7 @@ class GraduationTasksquestions extends Component{
任务列表 - 任务问答 + 毕设描述 设置