Merge branches 'dev_aliyun' and 'topic_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into topic_bank

dev_aliyun_beta
杨树明 5 years ago
commit 85fa6b8c9e

@ -300,9 +300,9 @@ class CommonWorkDetailIndex extends Component{
className={`${isListModule ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link>
<Link
onClick={() => this.setState({moduleName: '作业问答'})}
className={`${childModuleName == '作业问答' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业问答</Link>
onClick={() => this.setState({moduleName: '作业描述'})}
className={`${childModuleName == '作业描述' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业描述</Link>
{view_answer == true && <Link
onClick={() => this.setState({moduleName: '参考答案'})}
className={`${childModuleName == '参考答案' ? 'active' : '' } `}

@ -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(
<React.Fragment>
{ <div>
<div className="newMain clearfix">
<div className={"educontent mb20"}>
<p className="clearfix mt10">
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId} className="color-grey-6">{course_name}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span>任务详情</span>
</p>
<div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">
<Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link>
</p>
<CoursesListType
typelist={["已开启补交"]}
typesylename={"mt22"}
/>
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
</div>
<div className="stud-class-set bor-bottom-greyE">
<div className="mt10 clearfix edu-back-white poll_list pl20">
<Link
className="active"
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>作品列表</Link>
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>作业问答</Link>
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>参考答案</Link>
<Link
style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link>
<a className={"fr color-blue font-16"} onClick={() => { this.end()} }>立即截止</a>
<a className={"fr color-blue font-16"} onClick={() => { this.publish()} }>立即发布</a>
<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation/graduation_tasks/"+task_Id+"/edit"}>编辑作业</a>
</div>
</div>
</div>
</div>
</div>}
</React.Fragment>
)
}
}
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(
<React.Fragment>
{ <div>
<div className="newMain clearfix">
<div className={"educontent mb20"}>
<p className="clearfix mt10">
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId} className="color-grey-6">{course_name}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span>任务详情</span>
</p>
<div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">
<Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link>
</p>
<CoursesListType
typelist={["已开启补交"]}
typesylename={"mt22"}
/>
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
</div>
<div className="stud-class-set bor-bottom-greyE">
<div className="mt10 clearfix edu-back-white poll_list pl20">
<Link
className="active"
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>作品列表</Link>
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>作业描述</Link>
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>参考答案</Link>
<Link
style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link>
<a className={"fr color-blue font-16"} onClick={() => { this.end()} }>立即截止</a>
<a className={"fr color-blue font-16"} onClick={() => { this.publish()} }>立即发布</a>
<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation/graduation_tasks/"+task_Id+"/edit"}>编辑作业</a>
</div>
</div>
</div>
</div>
</div>}
</React.Fragment>
)
}
}
const CommonWorkSettingForm = Form.create({ name: 'commonworkSettingForm' })(CommonWorkSetting);
export default CommonWorkSettingForm;

@ -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()
/**
<React.Fragment>
<a className={"fr color-blue font-16"} href={exportResultUrl}>导出成绩</a>
</React.Fragment>
*/
return(
<React.Fragment>
{/* 内容区 */}
<div className="padding40 memoContent new_li">
<MarkdownToHtml content={description} selector="work_content" className="mb10"></MarkdownToHtml>
{ attachments && attachments.map((item) => {
return ( <div className="color-grey">
<a className="color-grey">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<a href={item.url} className="mr12" length="58">{item.title}</a>
<span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span>
</div> )
}) }
{isGroup && <div className="df mt10">
<div style={{flex: '0 0 160px'}}>
<div>分组要求 {group_info.min_num} ~ {group_info.max_num}</div>
<div>{group_info.base_on_project ? '基于项目实施' : '不基于项目'}</div>
</div>
<div style={{color: '#9B9B9B'}}>
<div>学生提交作品时需要关联同组成员组内成员作品共享</div>
<div>{group_info.base_on_project ? '学生必须在本平台创建项目,项目管理员可以提交作品' : '无需再平台创建项目,任意小组成员均可以提交作品'}</div>
{/* <div>各小组必须在educoder平台创建项目</div> */}
</div>
</div>}
</div>
{ homework_id && <CommonReply
memo={{
id: homework_id,
}}
course_id={courseId} {...this.props}
apiRouteName={'homework_commons'}
jour_type={'HomeworkCommon'}
></CommonReply> }
</React.Fragment>
)
}
}
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()
/**
<React.Fragment>
<a className={"fr color-blue font-16"} href={exportResultUrl}>导出成绩</a>
</React.Fragment>
*/
return(
<React.Fragment>
{/* 内容区 */}
<div className="padding40 memoContent new_li">
<MarkdownToHtml content={description} selector="work_content" className="mb10"></MarkdownToHtml>
{ attachments && attachments.map((item) => {
return ( <div className="color-grey">
<a className="color-grey">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<a href={item.url} className="mr12" length="58">{item.title}</a>
<span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span>
</div> )
}) }
{isGroup && <div className="df mt10">
<div style={{flex: '0 0 160px'}}>
<div>分组要求 {group_info.min_num} ~ {group_info.max_num}</div>
<div>{group_info.base_on_project ? '基于项目实施' : '不基于项目'}</div>
</div>
<div style={{color: '#9B9B9B'}}>
<div>学生提交作品时需要关联同组成员组内成员作品共享</div>
<div>{group_info.base_on_project ? '学生必须在本平台创建项目,项目管理员可以提交作品' : '无需再平台创建项目,任意小组成员均可以提交作品'}</div>
{/* <div>各小组必须在educoder平台创建项目</div> */}
</div>
</div>}
</div>
{ homework_id && <CommonReply
memo={{
id: homework_id,
}}
course_id={courseId} {...this.props}
apiRouteName={'homework_commons'}
jour_type={'HomeworkCommon'}
></CommonReply> }
</React.Fragment>
)
}
}
export default CommonWorkQuestion;

@ -139,8 +139,8 @@ class WorkDetailPageHeader extends Component{
className={`${childModuleName == '作品列表' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link>
<Link
className={`${childModuleName == '作业问答' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业问答</Link>
className={`${childModuleName == '作业描述' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业描述</Link>
{view_answer == true && <Link
className={`${childModuleName == '参考答案' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/answer`}>参考答案</Link>}

@ -1088,7 +1088,7 @@ class GraduationTaskssettingapp extends Component{
<div className="mt10 clearfix edu-back-white poll_list pl20" id={"publishtimeend"}>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
<Link className="active"
style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>

@ -1117,7 +1117,7 @@ class GraduationTaskssettinglist extends Component{
{/*<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>*/}
{/*<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className={"fr color-blue font-16"}>导出作品附件</a>*/}
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
<Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
@ -1415,7 +1415,7 @@ class GraduationTaskssettinglist extends Component{
<div className="mt10 clearfix edu-back-white poll_list pl20">
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
<Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link>

@ -330,7 +330,7 @@ class GraduationTasksquestions extends Component{
<div className="mt10 clearfix edu-back-white poll_list pl20">
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
<Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>

@ -121,7 +121,7 @@ class GraduateTopicDetail extends Component{
<div className="fl mt6 task_menu_ul ml30">
<Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.onChangeStatus}>
<Menu.Item key="1">选题列表</Menu.Item>
<Menu.Item key="2">选题问答</Menu.Item>
<Menu.Item key="2">选题描述</Menu.Item>
</Menu>
</div>
{/* null: 未选题 0待确认 1已同意 2已拒绝 */}

@ -162,7 +162,7 @@ class ShixunHomeworkPage extends Component {
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a className={parseInt(tab) === 0 ? "active" : ""} onClick={(e) => this.ChangeTab(0)}>作品列表</a>
<a className={parseInt(tab) === 1 ? "active" : ""} onClick={(e) => this.ChangeTab(1)}>作业问答</a>
<a className={parseInt(tab) === 1 ? "active" : ""} onClick={(e) => this.ChangeTab(1)}>作业描述</a>
{this.props.isAdmin() ?
this.state.code_review === true || jobsettingsdatapage === undefined ? [""] : jobsettingsdatapage.data.homework_status[0] === "未发布" ? "" :
<a

@ -60,7 +60,7 @@ class StudentHomework extends Component{
<div className="stud-class-set bor-bottom-greyE">
<div className="mt10 clearfix edu-back-white poll_list pl20">
<a className="active">作业列表</a>
<a>作业问答</a>
<a>作业描述</a>
<a>配置</a>
<a className={"fr color-blue font-16"}>立即发布</a>
<a className={"fr color-blue font-16"}>导出成绩</a>

Loading…
Cancel
Save