From 02faf37431c85ed6a3921becce944fbae9309720 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 24 Jun 2019 09:05:31 +0800
Subject: [PATCH 01/15] check admin
---
.../modules/courses/members/studentsList.js | 34 +++++++++++++------
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js
index e75baa3fe..ba29dfccb 100644
--- a/public/react/src/modules/courses/members/studentsList.js
+++ b/public/react/src/modules/courses/members/studentsList.js
@@ -1,5 +1,5 @@
import React,{ Component } from "react";
-import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin} from "antd";
+import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin, Tooltip} from "antd";
import ClipboardJS from 'clipboard'
import '../css/Courses.css'
import '../css/members.css'
@@ -31,14 +31,6 @@ const dataSource = [{
const buildColumns = (that) => {
const columns=[{
- title: '',
- dataIndex: 'check',
- key: 'check',
- render: (text, item) => {
- return
- },
- width:"5%"
- },{
title: '序号',
dataIndex: 'id',
key: 'id',
@@ -71,6 +63,19 @@ const buildColumns = (that) => {
width:"50%",
className:"color-grey-6"
}];
+ const isAdmin = that.props.isAdmin()
+ if (isAdmin) {
+ columns.unshift({
+ title: '',
+ dataIndex: 'check',
+ key: 'check',
+ render: (text, item) => {
+ return
+ },
+ width:"5%"
+ })
+ }
+
return columns;
}
@@ -445,7 +450,14 @@ class studentsList extends Component{
{invite_code}
-
+
+ 成员可以通过邀请码主动加入课堂
+ 点击立刻复制邀请码
+ }>
+
+
+
+
}
@@ -528,7 +540,7 @@ class studentsList extends Component{
total_count > 0 ?
-
已选 {checkBoxValues.length} 个
+ {isAdmin &&
已选 {checkBoxValues.length} 个}
{isAdmin &&
删除}
{isAdmin &&
From 10dc135c6da588001eccff3c9719d1bf40d75bc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 24 Jun 2019 09:06:55 +0800
Subject: [PATCH 02/15] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/coursesDetail/CoursesBanner.js | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index 4e3f6a42d..311bf7ed6 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -344,16 +344,16 @@ class CoursesBanner extends Component {
render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state;
- try {
- if(this.props.current_user!==undefined){
- this.setState({
- user_phone_binded :this.props.current_user.user_phone_binded,
- })
- }
- }catch (e) {
- console.log("CoursesBanner 354")
- console.log(e)
- }
+ // try {
+ // if(this.props.current_user!==undefined){
+ // this.setState({
+ // user_phone_binded :this.props.current_user.user_phone_binded,
+ // })
+ // }
+ // }catch (e) {
+ // console.log("CoursesBanner 354")
+ // console.log(e)
+ // }
return (
From e3b07c7f01232f27e270ab48c83ffeca1d120255 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 24 Jun 2019 09:07:24 +0800
Subject: [PATCH 03/15] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/coursesDetail/CoursesBanner.js | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index 311bf7ed6..4e3f6a42d 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -344,16 +344,16 @@ class CoursesBanner extends Component {
render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state;
- // try {
- // if(this.props.current_user!==undefined){
- // this.setState({
- // user_phone_binded :this.props.current_user.user_phone_binded,
- // })
- // }
- // }catch (e) {
- // console.log("CoursesBanner 354")
- // console.log(e)
- // }
+ try {
+ if(this.props.current_user!==undefined){
+ this.setState({
+ user_phone_binded :this.props.current_user.user_phone_binded,
+ })
+ }
+ }catch (e) {
+ console.log("CoursesBanner 354")
+ console.log(e)
+ }
return (
From ffbcbc0349c08ecf071de18971ec02e9a3e12d27 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 24 Jun 2019 09:17:13 +0800
Subject: [PATCH 04/15] check
---
.../modules/courses/members/teacherList.js | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js
index ac9d22119..748345c87 100644
--- a/public/react/src/modules/courses/members/teacherList.js
+++ b/public/react/src/modules/courses/members/teacherList.js
@@ -32,13 +32,6 @@ function buildColumns(that) {
const isAdminOrTeacher = that.props.isAdminOrTeacher()
const { course_groups } = that.state
const columns = [{
- title: '',
- dataIndex: 'course_member_id',
- key: 'course_member_id',
- render: (content, item, index) => {
- return
- }
- },{
title: '序号',
// dataIndex: 'name',
key: 'index',
@@ -152,6 +145,16 @@ function buildColumns(that) {
},
})
}
+ if(isAdmin) {
+ columns.unshift({
+ title: '',
+ dataIndex: 'course_member_id',
+ key: 'course_member_id',
+ render: (content, item, index) => {
+ return
+ }
+ })
+ }
return columns
}
@@ -540,7 +543,7 @@ class studentsList extends Component{
`}
-
已选 {checkBoxValues.length} 个
+ { isAdmin &&
已选 {checkBoxValues.length} 个 }
{
{ this.hasGraduationModule() && isAdminOrTeacher &&
加入答辩组
From 88cebdbb0ca3289c2a0cdb72ee2f89aa27d5af03 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 24 Jun 2019 09:21:38 +0800
Subject: [PATCH 05/15] hasGraduationModule
---
.../react/src/modules/courses/members/teacherList.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js
index 748345c87..a3ff2d745 100644
--- a/public/react/src/modules/courses/members/teacherList.js
+++ b/public/react/src/modules/courses/members/teacherList.js
@@ -105,7 +105,8 @@ function buildColumns(that) {
}
,
});
- if (that.hasGraduationModule()) {
+ const hasGraduationModule = that.hasGraduationModule()
+ if (hasGraduationModule {
columns.push({
title: '答辩组',
key: 'graduation_group',
@@ -145,7 +146,7 @@ function buildColumns(that) {
},
})
}
- if(isAdmin) {
+ if(isAdmin && hasGraduationModule) {
columns.unshift({
title: '',
dataIndex: 'course_member_id',
@@ -498,6 +499,7 @@ class studentsList extends Component{
})
}
const isAdminOrTeacher = this.props.isAdminOrTeacher()
+ const hasGraduationModule = this.hasGraduationModule()
return(
@@ -543,9 +545,9 @@ class studentsList extends Component{
`}
- { isAdmin &&
已选 {checkBoxValues.length} 个 }
+ { isAdmin && hasGraduationModule &&
已选 {checkBoxValues.length} 个 }
{
- { this.hasGraduationModule() && isAdminOrTeacher &&
+ { hasGraduationModule && isAdminOrTeacher &&
加入答辩组
) }
- >
-
- {renderScore(teaching_asistant_score) }
- }
-
- ),
- }])
+ {
+ {record.ta_comment_count}名助教进行了评分
+ {that.state.ta_mode == 1 ? '平均分': '复审分'}:{teaching_asistant_score}分
+ ) }
+ >
+
+ {renderScore(teaching_asistant_score) }
+ }
+
+ ),
+ })
+ }
+
+
if (that.state.anonymous_comment) {
/**
@@ -242,36 +257,37 @@ function buildColumns(that, student_works) {
),
})
}
-
- columns.push({
- width: 72,
- title: '最终成绩',
- key: 'work_score',
- dataIndex: 'work_score',
- render: (work_score, record) => {
- return (
-
-
- {`${record.user_name}(${record.user_login})`}
- { record.ultimate_score ?
- 最终调整成绩:{record.work_score}分
:
+ if (!niPingAndIsStudent) {
+ columns.push({
+ width: 72,
+ title: '最终成绩',
+ key: 'work_score',
+ dataIndex: 'work_score',
+ render: (work_score, record) => {
+ return (
+
+
- { record.final_score && 作业评分:{record.final_score}分
}
- { record.late_penalty >= 0 && 迟交扣分:{record.late_penalty}分
}
- { record.absence_penalty >= 0 && 缺评扣分:{record.absence_penalty}分
}
- { record.appeal_penalty >= 0 && 违规匿评扣分:{record.appeal_penalty}分
}
- 最终成绩:{record.work_score}分
- }
- )
- }>
- { renderScore(work_score) }
-
-
- )
- },
- })
+
{`${record.user_name}(${record.user_login})`}
+ { record.ultimate_score ?
+
最终调整成绩:{record.work_score}分
:
+
+ { record.final_score &&
作业评分:{record.final_score}分
}
+ { record.late_penalty >= 0 &&
迟交扣分:{record.late_penalty}分
}
+ { record.absence_penalty >= 0 &&
缺评扣分:{record.absence_penalty}分
}
+ { record.appeal_penalty >= 0 &&
违规匿评扣分:{record.appeal_penalty}分
}
+
最终成绩:{record.work_score}分
+
}
+
)
+ }>
+ { renderScore(work_score) }
+
+
+ )
+ },
+ })
+ }
if (isAdminOrStudent || that.props.work_public == true) {
columns.push({
width: 92,
From 556ce2635e4bdd0148e17d9034f6923e7ee69e2f Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 24 Jun 2019 11:04:10 +0800
Subject: [PATCH 13/15] haveProjects
---
public/react/src/modules/courses/busyWork/ConnectProject.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/busyWork/ConnectProject.js b/public/react/src/modules/courses/busyWork/ConnectProject.js
index 9c5db1bbc..4e359651b 100644
--- a/public/react/src/modules/courses/busyWork/ConnectProject.js
+++ b/public/react/src/modules/courses/busyWork/ConnectProject.js
@@ -109,7 +109,7 @@ class ConnectProject extends Component{
}
render(){
- let {project_flag, projects, loading, hasMore }=this.state;
+ let {project_flag, projects, loading, hasMore, haveProjects }=this.state;
return(
Date: Mon, 24 Jun 2019 11:19:47 +0800
Subject: [PATCH 14/15] cancel_appeal
---
public/react/src/AppConfig.js | 2 +-
.../courses/busyWork/CommonWorkItem.js | 2 +-
.../modules/courses/busyWork/commonWork.js | 2 +-
.../courses/common/comments/CCommentItem.js | 20 +++++++++++++++----
.../courses/coursesDetail/CoursesBanner.js | 2 +-
5 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 05a4463cd..6c4a20fa9 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net"
proxy = "https://testeduplus2.educoder.net"
- // proxy="http://47.96.87.25:48080"
+ proxy="http://47.96.87.25:48080"
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
// 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js
index 0a8f990a0..7f5bea2da 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js
@@ -127,7 +127,7 @@ class CommonWorkItem extends Component{
}
{
- mainList && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{
+ mainList && mainList.homeworks && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{
let canNotLink = !isAdminOrStudent && item.private_icon == true
return(
diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js
index a23318097..b0b80d147 100644
--- a/public/react/src/modules/courses/busyWork/commonWork.js
+++ b/public/react/src/modules/courses/busyWork/commonWork.js
@@ -430,7 +430,7 @@ class commonWork extends Component{
{
- mainList && mainList.homeworks.length==0 &&
+ mainList && mainList.homeworks && mainList.homeworks.length==0 &&
}
{
diff --git a/public/react/src/modules/courses/common/comments/CCommentItem.js b/public/react/src/modules/courses/common/comments/CCommentItem.js
index d02c76f5d..45ebb364b 100644
--- a/public/react/src/modules/courses/common/comments/CCommentItem.js
+++ b/public/react/src/modules/courses/common/comments/CCommentItem.js
@@ -46,9 +46,9 @@ class CCommentItem extends Component{
let { item, commentIndex }=this.props;
const url = `/student_works/${studentWorkId}/cancel_appeal.json`
- axios.post(url, { data: {
+ axios.post(url, {
score_id: item.id
- }})
+ })
.then((response) => {
if (response.data.status == 0) {
this.showNotification('撤销成功')
@@ -262,9 +262,21 @@ class CCommentItem extends Component{
return(
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index 74a1cd6f2..eb208b5bf 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -358,7 +358,7 @@ class CoursesBanner extends Component {
{
coursedata===undefined || coursedata.status===401 || coursedata.status===407?"":
-
+
{coursedata.name}
From cb970e2223b62f28f222d03cd8616d85546c4214 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 24 Jun 2019 11:34:47 +0800
Subject: [PATCH 15/15] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/AppConfig.js | 2 +-
.../tasks/GraduationTasksSubmitnew.js | 46 ++++++++++++++++---
.../react/src/modules/login/EducoderLogin.js | 4 +-
public/react/src/modules/tpm/NewHeader.js | 36 ++++++---------
public/react/src/modules/tpm/TPMIndexHOC.js | 9 +---
5 files changed, 57 insertions(+), 40 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 05a4463cd..6c4a20fa9 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net"
proxy = "https://testeduplus2.educoder.net"
- // proxy="http://47.96.87.25:48080"
+ proxy="http://47.96.87.25:48080"
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
// 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js
index 7421170d6..b68458e3f 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js
@@ -83,7 +83,7 @@ class GraduationTasksSubmitnew extends Component{
}
handleSubmit=(e) => {
-
+ console.log("86");
let {fileList,selectmemberslist,workslist}=this.state;
if(fileList.length === 0){
@@ -91,7 +91,7 @@ class GraduationTasksSubmitnew extends Component{
Modalstype:true,
Modalstopval:'请上传附件!',
Loadtype:true,
- ModalCancel:this.cancelAttachment
+ ModalSave:this.cancelAttachment,
})
@@ -119,7 +119,7 @@ class GraduationTasksSubmitnew extends Component{
listid.push(list.response.id)
}
- e.preventDefault();
+ // e.preventDefault();
if( GraduationTasksnewtype===true){
this.props.form.validateFields((err, values) => {
if (!err) {
@@ -408,7 +408,27 @@ class GraduationTasksSubmitnew extends Component{
selectmemberslist:selects
})
}
+ onSearchKeywordKeyUp = (e) => {
+ if (e.keyCode === 13) {
+ }
+ }
+ onSearckeyd=(e)=>{
+ if(e.keyCode){
+
+ let {search} = this.state;
+ this.searchList(search,1,10)
+ }
+ }
+ onSearchKeywordKeyUps= (e)=>{
+ if(e.keyCode=== 13){
+ }
+ }
+ onKeywordSearchKeyDown = (e) => {
+ if(e.keyCode == 13) {
+ return false;
+ }
+ }
gocannel=()=>{
window.history.go(-1)
}
@@ -483,7 +503,8 @@ render(){
返回
-