diff --git a/public/images/edu_user/EWM.jpg b/public/images/educoder/EWM.jpg
similarity index 100%
rename from public/images/edu_user/EWM.jpg
rename to public/images/educoder/EWM.jpg
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js
index 773fa52fe..b1a1d5553 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkList.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js
@@ -40,11 +40,15 @@ function getScoreTip(score, dom) {
}
function buildColumns(that, student_works) {
let gotWorkGroup = false;
+ let gotProjectInfo = false;
if (student_works) {
student_works.forEach(item => {
if (item.work_group) {
gotWorkGroup = true
}
+ if (item.project_info && item.project_info.name) {
+ gotProjectInfo = true;
+ }
})
}
let courseId= that.props.match.params.coursesId;
@@ -136,6 +140,22 @@ function buildColumns(that, student_works) {
),
})
}
+ if (gotProjectInfo) {
+ columns.push({
+ width: 72,
+ title: '关联项目',
+ dataIndex: 'project_info',
+ key: 'project_info',
+
+ render: (project_info, record) => (
+
+ {project_info && project_info.name && {project_info.name}}
+
+ ),
+ })
+ }
columns = columns.concat([{
width: 88,
title: '提交状态',
@@ -176,7 +196,7 @@ function buildColumns(that, student_works) {
}])
if (!niPingAndIsStudent) {
columns.push({
- width: 72,
+ width: 70,
title: '教师评分',
key: 'teacher_score',
dataIndex: 'teacher_score',
@@ -192,7 +212,7 @@ function buildColumns(that, student_works) {
})
columns.push({
- width: 72,
+ width: 70,
title: '助教评分',
key: 'teaching_asistant_score',
dataIndex: 'teaching_asistant_score',
@@ -251,7 +271,7 @@ function buildColumns(that, student_works) {
if (that.state.anonymous_appeal) {
columns.push({
- width: 72,
+ width: 70,
title: '匿评申诉',
key: 'appeal_all_count',
dataIndex: 'appeal_all_count',
@@ -271,7 +291,7 @@ function buildColumns(that, student_works) {
}
if (!niPingAndIsStudent) {
columns.push({
- width: 72,
+ width: 70,
title: '最终成绩',
key: 'work_score',
dataIndex: 'work_score',
diff --git a/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js
index c41f888ca..146511712 100644
--- a/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js
+++ b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js
@@ -205,6 +205,7 @@ class CommonWorkAppraiseReply extends Component{
const isAdmin = this.props.isAdmin()
const isNiPing = homework_status && homework_status.indexOf('匿评中') != -1
+ const isGroup = this.props.isGroup()
/**
isAdmin || 评阅入口:超级管理员、老师和助教显示; -》 改成admin也不显示
匿评人:匿评期间显示
@@ -276,6 +277,7 @@ class CommonWorkAppraiseReply extends Component{
showModulationtype={this.showModulationtype}
addSuccess={this.addSuccess} ref={this.editorRef} totalCount={comment_scores.length}
onReply={this.onReply} placeholder={"请在此输入对本作品的评语,最大限制2000个字符"}
+ showSameScore={isGroup}
> }
{/* ${!!comment_scores.length ? 'bor-bottom-greyE' : ''} */}
diff --git a/public/react/src/modules/courses/common/comments/CCommentItem.js b/public/react/src/modules/courses/common/comments/CCommentItem.js
index e4286e456..183ef6ea5 100644
--- a/public/react/src/modules/courses/common/comments/CCommentItem.js
+++ b/public/react/src/modules/courses/common/comments/CCommentItem.js
@@ -329,7 +329,7 @@ class CCommentItem extends Component{
{attachments && attachments.map((attaItem, key)=>{
return(
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index 3389951f5..cc3646b9d 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -458,7 +458,7 @@ class CoursesBanner extends Component {
{
`
.teachersbox{
- margin-right:28px !important;
+ margin-right:22px !important;
}
`
}
diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js
index 5baf4e0c6..26d4499aa 100644
--- a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js
+++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js
@@ -1,5 +1,5 @@
import React,{ Component } from "react";
-import { Modal,Checkbox,Upload,Button,Icon,message} from "antd";
+import { Modal,Checkbox,Upload,Button,Icon,message,notification} from "antd";
import { WordsBtn,getUrl, getUploadActionUrl} from 'educoder';
import axios from 'axios';
import Modals from '../../modals/Modals';
@@ -110,6 +110,7 @@ class AccessoryModal extends Component{
this.props.Cancel()
}
Saves=()=>{
+
let id=this.props.categoryid;
let {fileList,description} =this.state;
@@ -131,10 +132,12 @@ class AccessoryModal extends Component{
description:description,
attachment_ids:newfileList
}).then((result)=>{
- console.log(result)
- if(result !== undefined){
- this.props.setupdate()
- this.props.showNotification('提交成功')
+
+ if(result.data.status===0){
+ debugger
+ this.props.Cancel()
+ this.props.setupdate()
+
// this.setState({
// Modalstype:true,
// Modalstopval:result.data.message,
@@ -142,9 +145,16 @@ class AccessoryModal extends Component{
// loadtype:true
// })
this.ModalCancelModalCancel()
+
+ notification.open({
+ message: '提示',
+ description:
+ '提交成功'
+ });
if(this.props.seeworks!=undefined){
this.props.history.push(this.props.seeworks);
}
+
}
}).catch((error)=>{
@@ -170,10 +180,12 @@ class AccessoryModal extends Component{
description:description,
attachment_ids:newfileList
}).then((result)=>{
- console.log(result)
+
if(result.data.status===0){
+ debugger
+ this.props.Cancel()
this.props.setupdate()
- this.props.showNotification('提交成功')
+
// this.setState({
// Modalstype:true,
// Modalstopval:result.data.message,
@@ -182,9 +194,15 @@ class AccessoryModal extends Component{
// })
this.ModalCancelModalCancel()
+ notification.open({
+ message: '提示',
+ description:
+ '提交成功'
+ });
if(this.props.seeworks!=undefined){
this.props.history.push(this.props.seeworks);
}
+
}
}).catch((error)=>{
diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js
index 0cd48c245..14b1f71e1 100644
--- a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js
+++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js
@@ -1,262 +1,263 @@
-import React,{ Component } from "react";
-import { Modal,Checkbox,Upload,Button,Icon,message} from "antd";
-import { WordsBtn, getUploadActionUrl} from 'educoder';
-import axios from 'axios';
-import Modals from '../../modals/Modals';
-const CheckboxGroup = Checkbox.Group;
-
-class AccessoryModal2 extends Component{
- constructor(props){
- super(props);
- this.state={
- group_ids:[],
- fileList:[],
- Modalstype:false,
- Modalstopval:"",
- ModalCancel:"",
- ModalSave:"",
- loadtype:false
- }
- }
-
-
- componentDidMount() {
-
- }
-
- //勾选实训
- shixunhomeworkedit=(list)=>{
-
- this.setState({
- group_ids:list
- })
-
- }
- // 附件相关 START
- handleChange = (info) => {
- let fileList = info.fileList;
- console.log(fileList)
- // for(var list of fileList ){
- // console.log(fileList)
- // }
- this.setState({ fileList });
- }
-
- onAttachmentRemove = (file) => {
- // confirm({
- // title: '确定要删除这个附件吗?',
- // okText: '确定',
- // cancelText: '取消',
- // // content: 'Some descriptions',
- // onOk: () => {
- // this.deleteAttachment(file)
- // },
- // onCancel() {
- // console.log('Cancel');
- // },
- // });
- // return false;
-
- // this.setState({
- // Modalstype:true,
- // Modalstopval:'确定要删除这个附件吗?',
- // ModalSave: ()=>this.deleteAttachment(file),
- // ModalCancel:this.cancelAttachment
- // })
- // return false;
-
- this.deleteAttachment(file);
- }
-
-
-
-
- deleteAttachment = (file) => {
- const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
- axios.delete(url, {
- })
- .then((response) => {
- if (response.data) {
- const { status } = response.data;
- if (status == 0) {
- console.log('--- success')
-
- this.setState((state) => {
- const index = state.fileList.indexOf(file);
- const newFileList = state.fileList.slice();
- newFileList.splice(index, 1);
- return {
- fileList: newFileList,
- };
- });
- }
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
-
- ModalCancelModalCancel=()=>{
- this.setState({
- Modalstype:false,
- Modalstopval:"",
- ModalSave:this.ModalCancelModalCancel,
- loadtype:false
- })
- this.props.Cancel()
- }
- componentDidUpdate = (prevProps) => {
- if (JSON.stringify(prevProps.fileList) != JSON.stringify(this.props.fileList)) {
- this.setState({
- fileList: this.props.fileList
- })
- }
- if (prevProps.description != this.props.description) {
- this.setState({
- description: this.props.description
- })
- }
- }
- Saves=()=>{
- let {fileList,description} =this.state;
- let newfileList=[];
- for(var list of fileList){
- newfileList.push(list.response.id)
- }
- this.props.Saves && this.props.Saves(newfileList, description)
- return;
- let id=this.props.categoryid;
-
- console.log(newfileList)
- let url="/graduation_works/"+id+"/revise_attachment.json"
- axios.post(url,{
- description:description,
- attachment_ids:newfileList
- }).then((result)=>{
- console.log(result)
- if(result.data.status===0){
- this.props.setupdate()
- this.setState({
- Modalstype:true,
- Modalstopval:result.data.message,
- ModalSave:this.ModalCancelModalCancel,
- loadtype:true
- })
-
- }
- }).catch((error)=>{
-
- })
- }
-
- settextarea=(e)=>{
- this.setState({
- description:e.target.value
- })
- }
-
- render(){
- let {description,fileList,
- Modalstype,
- Modalstopval,
- ModalCancel,
- ModalSave,
- loadtype,
- }=this.state;
- let {course_groups}=this.props;
- const uploadProps = {
- width: 600,
- // https://github.com/ant-design/ant-design/issues/15505
- // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
- // showUploadList: false,
- action: getUploadActionUrl(),
- onChange: this.handleChange,
- onRemove: this.onAttachmentRemove,
- beforeUpload: (file) => {
- console.log('beforeUpload', file.name);
- const isLt150M = file.size / 1024 / 1024 < 150;
- if (!isLt150M) {
- message.error('文件大小必须小于150MB!');
- }
- return isLt150M;
- },
- };
-
-
- return(
-
- {/*提示*/}
-
-
-
-
-
-
-
-
-
-
-
-
-
- (单个文件最大150M)
-
-
-
-
-
-
-
-
-
-
- )
- }
-}
+import React,{ Component } from "react";
+import { Modal,Checkbox,Upload,Button,Icon,message} from "antd";
+import { WordsBtn, getUploadActionUrl} from 'educoder';
+import axios from 'axios';
+import Modals from '../../modals/Modals';
+const CheckboxGroup = Checkbox.Group;
+
+class AccessoryModal2 extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ group_ids:[],
+ fileList:[],
+ Modalstype:false,
+ Modalstopval:"",
+ ModalCancel:"",
+ ModalSave:"",
+ loadtype:false
+ }
+ }
+
+
+ componentDidMount() {
+
+ }
+
+ //勾选实训
+ shixunhomeworkedit=(list)=>{
+
+ this.setState({
+ group_ids:list
+ })
+
+ }
+ // 附件相关 START
+ handleChange = (info) => {
+ let fileList = info.fileList;
+ console.log(fileList)
+ // for(var list of fileList ){
+ // console.log(fileList)
+ // }
+ this.setState({ fileList });
+ }
+
+ onAttachmentRemove = (file) => {
+ // confirm({
+ // title: '确定要删除这个附件吗?',
+ // okText: '确定',
+ // cancelText: '取消',
+ // // content: 'Some descriptions',
+ // onOk: () => {
+ // this.deleteAttachment(file)
+ // },
+ // onCancel() {
+ // console.log('Cancel');
+ // },
+ // });
+ // return false;
+
+ // this.setState({
+ // Modalstype:true,
+ // Modalstopval:'确定要删除这个附件吗?',
+ // ModalSave: ()=>this.deleteAttachment(file),
+ // ModalCancel:this.cancelAttachment
+ // })
+ // return false;
+
+ this.deleteAttachment(file);
+ }
+
+
+
+
+ deleteAttachment = (file) => {
+ const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
+ axios.delete(url, {
+ })
+ .then((response) => {
+ if (response.data) {
+ const { status } = response.data;
+ if (status == 0) {
+ console.log('--- success')
+
+ this.setState((state) => {
+ const index = state.fileList.indexOf(file);
+ const newFileList = state.fileList.slice();
+ newFileList.splice(index, 1);
+ return {
+ fileList: newFileList,
+ };
+ });
+ }
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+
+ ModalCancelModalCancel=()=>{
+ this.setState({
+ Modalstype:false,
+ Modalstopval:"",
+ ModalSave:this.ModalCancelModalCancel,
+ loadtype:false
+ })
+ this.props.Cancel()
+ }
+ componentDidUpdate = (prevProps) => {
+ if (JSON.stringify(prevProps.fileList) != JSON.stringify(this.props.fileList)) {
+ this.setState({
+ fileList: this.props.fileList
+ })
+ }
+ if (prevProps.description != this.props.description) {
+ this.setState({
+ description: this.props.description
+ })
+ }
+ }
+ Saves=()=>{
+ debugger
+ let {fileList,description} =this.state;
+ let newfileList=[];
+ for(var list of fileList){
+ newfileList.push(list.response.id)
+ }
+ this.props.Saves && this.props.Saves(newfileList, description)
+ return;
+ let id=this.props.categoryid;
+
+ console.log(newfileList)
+ let url="/graduation_works/"+id+"/revise_attachment.json"
+ axios.post(url,{
+ description:description,
+ attachment_ids:newfileList
+ }).then((result)=>{
+ console.log(result)
+ if(result.data.status===0){
+ this.props.setupdate()
+ this.setState({
+ Modalstype:true,
+ Modalstopval:result.data.message,
+ ModalSave:this.ModalCancelModalCancel,
+ loadtype:true
+ })
+
+ }
+ }).catch((error)=>{
+
+ })
+ }
+
+ settextarea=(e)=>{
+ this.setState({
+ description:e.target.value
+ })
+ }
+
+ render(){
+ let {description,fileList,
+ Modalstype,
+ Modalstopval,
+ ModalCancel,
+ ModalSave,
+ loadtype,
+ }=this.state;
+ let {course_groups}=this.props;
+ const uploadProps = {
+ width: 600,
+ // https://github.com/ant-design/ant-design/issues/15505
+ // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
+ // showUploadList: false,
+ action: getUploadActionUrl(),
+ onChange: this.handleChange,
+ onRemove: this.onAttachmentRemove,
+ beforeUpload: (file) => {
+ console.log('beforeUpload', file.name);
+ const isLt150M = file.size / 1024 / 1024 < 150;
+ if (!isLt150M) {
+ message.error('文件大小必须小于150MB!');
+ }
+ return isLt150M;
+ },
+ };
+
+
+ return(
+
+ {/*提示*/}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (单个文件最大150M)
+
+
+
+
+
+
+
+
+
+
+ )
+ }
+}
export default AccessoryModal2;
\ No newline at end of file
diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js
index 70df3f577..afa0669d4 100644
--- a/public/react/src/modules/courses/exercise/ExerciseListItem.js
+++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js
@@ -193,9 +193,9 @@ class ExerciseListItem extends Component{
{
IsStudent &&
}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
index 1fe0e5c9b..2cbf0fe33 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
@@ -178,6 +178,7 @@ class GraduateTaskItem extends Component{
funlist={this.props.funlist}
/>:""}
{this.state.visibles===true?