From 1a8d0378aaef0c6d2a0633eba73badb81859bd98 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 11 Oct 2019 15:03:00 +0800
Subject: [PATCH 01/16] no message
---
.../src/modules/courses/ListPageIndex.js | 8 +-
.../courses/members/CourseGroupList.js | 189 ++++++++++++++++++
2 files changed, 196 insertions(+), 1 deletion(-)
create mode 100644 public/react/src/modules/courses/members/CourseGroupList.js
diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js
index 730a1bdce..8c5652838 100644
--- a/public/react/src/modules/courses/ListPageIndex.js
+++ b/public/react/src/modules/courses/ListPageIndex.js
@@ -33,6 +33,12 @@ const StudentsList= Loadable({
loader: () => import('./members/studentsList'),
loading: Loading,
});
+//分班列表
+const CourseGroupList= Loadable({
+ loader: () => import('./members/CourseGroupList'),
+ loading: Loading,
+});
+
const Eduinforms= Loadable({
loader: () => import('./gradinforms/Eduinforms.js'),
loading: Loading,
@@ -234,7 +240,7 @@ class ListPageIndex extends Component{
>
()
+ (props) => ()
}
>
diff --git a/public/react/src/modules/courses/members/CourseGroupList.js b/public/react/src/modules/courses/members/CourseGroupList.js
new file mode 100644
index 000000000..26a1abda3
--- /dev/null
+++ b/public/react/src/modules/courses/members/CourseGroupList.js
@@ -0,0 +1,189 @@
+// 分班列表 加入分班
+
+import React, { useState, useEffect } from 'react'
+
+import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin, Tooltip , Divider, Popconfirm } from "antd";
+import ClipboardJS from 'clipboard'
+import axios from 'axios'
+import _ from 'lodash'
+
+import '../css/Courses.css'
+import '../css/members.css'
+
+import CourseLayoutcomponent from '../common/CourseLayoutComponent'
+import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
+import ColorCountText from '../common/titleSearch/ColorCountText'
+
+import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections } from 'educoder'
+import Modals from "../../modals/Modals";
+import NoneData from "../coursesPublic/NoneData"
+import DownloadMessageysl from "../../modals/DownloadMessageysl";
+import CreateGroupByImportModal from './modal/CreateGroupByImportModal'
+import ChangeRolePop from './ChangeRolePop'
+/**
+ 角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
+*/
+function CourseGroupList(props) {
+ const [checkBoxRoles, setCheckBoxRoles] = useState()
+
+ const courseId = props.match.params.coursesId
+
+ useEffect(() => {
+ fetchAll()
+ }, [])
+ function fetchAll() {
+ const url = `/courses/${courseId}/course_groups.json`
+ }
+ const onConfirm = async () => {
+ }
+
+ function createGroupImportSuccess() {
+
+ }
+ function addDir() {
+
+ }
+ function deleteDir() {
+
+ }
+ function onPressEnter() {
+
+ }
+ function onInputSearchChange() {
+
+ }
+ function onInputSearchChange() {
+
+ }
+ function Downloadcal() {
+
+ }
+ const confirmysl = (url) => {
+ axios.get(url + 'export=true').then((response) => {
+ if(response === undefined){
+ return
+ }
+ if(response.data.status&&response.data.status===-1){
+
+ }else if(response.data.status&&response.data.status===-2){
+ if(response.data.message === "100"){
+ // 已超出文件导出的上限数量(100 ),建议:
+
+ this.setState({
+ DownloadType:true,
+ DownloadMessageval:100
+ })
+ }else {
+ //因附件资料超过500M
+ this.setState({
+ DownloadType:true,
+ DownloadMessageval:500
+ })
+ }
+ }else {
+ props.slowDownload(url)
+ }
+ }).catch((error) => {
+ console.log(error)
+ });
+ }
+
+ const isAdmin = true;
+ const isSuperAdmin = true;
+ const isParent = true;
+ const searchValue = '';
+ const isCourseEnd= '';
+ const course_group_id= '';
+
+ const DownloadMessageval= '';
+ const DownloadType= '';
+ const total_count = 9
+
+ let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩
+ let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息
+ let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度
+ return (
+
+
+ = 10}
+ searchPlaceholder={ '请输入姓名、学号进行搜索' }
+ firstRowRight={
+
+ { // pageType !== TYPE_STUDENTS &&
+ isSuperAdmin &&
+ {/* ref="createGroupByImportModal" */}
+
+ {/* this.refs['createGroupByImportModal'].setVisible(true) */}
+ {}}>导入创建分班
+ }
+ {
+ // pageType !== TYPE_STUDENTS &&
+ !isCourseEnd && isAdmin && isParent && addDir()}>添加分班 }
+ {
+ isAdmin && !isParent && course_group_id != 0 && deleteDir()}>删除分班 }
+ {/* {
+ isAdmin && !isParent && course_group_id != 0 && this.renameDir()}>分班重命名 } */}
+
+ { isAdmin &&
+
+ 导出
+
+
+ }
+
+ }
+ secondRowLeft={
+ total_count ? : ''
+ }
+ onPressEnter={onPressEnter}
+ >
+
+ )
+}
+export default CourseGroupList
\ No newline at end of file
From e4ec0cc0a278ff8e79374119e0a259dd799be420 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 11 Oct 2019 15:25:17 +0800
Subject: [PATCH 02/16] list
---
.../courses/members/CourseGroupList.js | 43 +++++++++++--------
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/public/react/src/modules/courses/members/CourseGroupList.js b/public/react/src/modules/courses/members/CourseGroupList.js
index 26a1abda3..15bc12bd8 100644
--- a/public/react/src/modules/courses/members/CourseGroupList.js
+++ b/public/react/src/modules/courses/members/CourseGroupList.js
@@ -24,15 +24,27 @@ import ChangeRolePop from './ChangeRolePop'
角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
*/
function CourseGroupList(props) {
- const [checkBoxRoles, setCheckBoxRoles] = useState()
+ const [serachValue, setSerachValue] = useState('')
+
+ const [DownloadType, setDownloadType] = useState()
+ const [DownloadMessageval, setDownloadMessageval] = useState()
+
+ const [listRes, setListRes] = useState({})
const courseId = props.match.params.coursesId
useEffect(() => {
fetchAll()
}, [])
- function fetchAll() {
+ async function fetchAll() {
const url = `/courses/${courseId}/course_groups.json`
+ const response = await axios.get(url, params: {
+ search: searchValue
+ });
+ console.log(response)
+ if (response) {
+ setListRes(response.data)
+ }
}
const onConfirm = async () => {
}
@@ -52,8 +64,8 @@ function CourseGroupList(props) {
function onInputSearchChange() {
}
- function onInputSearchChange() {
-
+ function onInputSearchChange(e) {
+ setSerachValue(e.target.value)
}
function Downloadcal() {
@@ -67,18 +79,13 @@ function CourseGroupList(props) {
}else if(response.data.status&&response.data.status===-2){
if(response.data.message === "100"){
- // 已超出文件导出的上限数量(100 ),建议:
-
- this.setState({
- DownloadType:true,
- DownloadMessageval:100
- })
+ // 已超出文件导出的上限数量(100 ),建议:
+ setDownloadType(true)
+ setDownloadMessageval(100)
}else {
- //因附件资料超过500M
- this.setState({
- DownloadType:true,
- DownloadMessageval:500
- })
+ //因附件资料超过500M
+ setDownloadType(true)
+ setDownloadMessageval(500)
}
}else {
props.slowDownload(url)
@@ -97,7 +104,9 @@ function CourseGroupList(props) {
const DownloadMessageval= '';
const DownloadType= '';
- const total_count = 9
+ const total_count = listRes.group_count;
+ const none_group_member_count = listRes.none_group_member_count;
+ const course_groups = listRes.course_groups
let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩
let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息
@@ -115,7 +124,7 @@ function CourseGroupList(props) {
searchValue={ searchValue }
onInputSearchChange={onInputSearchChange}
showSearchInput={total_count >= 10}
- searchPlaceholder={ '请输入姓名、学号进行搜索' }
+ searchPlaceholder={ '请输入名称进行搜索' }
firstRowRight={
{ // pageType !== TYPE_STUDENTS &&
From 7d6658f72d2adaa454e9bf01f5f1e17efdd8175c Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 11 Oct 2019 15:51:26 +0800
Subject: [PATCH 03/16] table
---
.../courses/members/CourseGroupList.js | 13 +-
.../courses/members/CourseGroupListTable.js | 117 ++++++++++++++++++
2 files changed, 126 insertions(+), 4 deletions(-)
create mode 100644 public/react/src/modules/courses/members/CourseGroupListTable.js
diff --git a/public/react/src/modules/courses/members/CourseGroupList.js b/public/react/src/modules/courses/members/CourseGroupList.js
index 15bc12bd8..248a4d52d 100644
--- a/public/react/src/modules/courses/members/CourseGroupList.js
+++ b/public/react/src/modules/courses/members/CourseGroupList.js
@@ -20,6 +20,7 @@ import NoneData from "../coursesPublic/NoneData"
import DownloadMessageysl from "../../modals/DownloadMessageysl";
import CreateGroupByImportModal from './modal/CreateGroupByImportModal'
import ChangeRolePop from './ChangeRolePop'
+import CourseGroupListTable from './CourseGroupListTable'
/**
角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
*/
@@ -38,9 +39,9 @@ function CourseGroupList(props) {
}, [])
async function fetchAll() {
const url = `/courses/${courseId}/course_groups.json`
- const response = await axios.get(url, params: {
+ const response = await axios.get(url, { params: {
search: searchValue
- });
+ }});
console.log(response)
if (response) {
setListRes(response.data)
@@ -102,8 +103,7 @@ function CourseGroupList(props) {
const isCourseEnd= '';
const course_group_id= '';
- const DownloadMessageval= '';
- const DownloadType= '';
+
const total_count = listRes.group_count;
const none_group_member_count = listRes.none_group_member_count;
const course_groups = listRes.course_groups
@@ -192,6 +192,11 @@ function CourseGroupList(props) {
}
onPressEnter={onPressEnter}
>
+
+
)
}
diff --git a/public/react/src/modules/courses/members/CourseGroupListTable.js b/public/react/src/modules/courses/members/CourseGroupListTable.js
new file mode 100644
index 000000000..96a13cf27
--- /dev/null
+++ b/public/react/src/modules/courses/members/CourseGroupListTable.js
@@ -0,0 +1,117 @@
+import React, { useState, useEffect } from 'react'
+
+import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin, Tooltip , Divider, Popconfirm } from "antd";
+
+import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections } from 'educoder'
+/**
+ 角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
+ course_members_count: 0
+ id: 2441
+ invite_code: "WUNX9K"
+ member_manager: "全部教师"
+ name: "e'e'e"
+*/
+function buildColumns() {
+ const columns=[{
+ title: '序号',
+ dataIndex: 'id',
+ key: 'id',
+ align:'center',
+ width:"10%",
+ className:"color-grey-6",
+ render: (id, record, index) => {
+ return index + 1
+ }
+ },
+ {
+ title: '分班名称',
+ dataIndex: 'name',
+ key: 'name',
+ align:'center',
+ width:"20%",
+ className:"color-grey-6",
+ render: (name, record, index) => {
+ return name
+ }
+ },
+ {
+ title: '邀请码',
+ dataIndex: 'invite_code',
+ key: 'invite_code',
+ align:'center',
+ width:"10%",
+ className:"color-grey-6",
+ render: (invite_code, record, index) => {
+ return invite_code
+ }
+ },
+ {
+ title: '学生成员',
+ dataIndex: 'course_members_count',
+ key: 'course_members_count',
+ align:'center',
+ width:"10%",
+ className:"color-grey-6",
+ render: (course_members_count, record, index) => {
+ return course_members_count
+ }
+ },
+ {
+ title: '管理教师',
+ dataIndex: 'member_manager',
+ key: 'member_manager',
+ align:'center',
+ width:"25%",
+ className:"color-grey-6",
+ render: (member_manager, record, index) => {
+ return member_manager
+ }
+ },
+ {
+ title: '操作',
+ dataIndex: 'setting',
+ key: 'setting',
+ align:'center',
+ width:"25%",
+ className:"color-grey-6",
+ render: (none, record, index) => {
+ return
+ }
+ },
+ ]
+ return columns
+}
+function CourseGroupListTable(props) {
+ const [serachValue, setSerachValue] = useState('')
+
+ const courseId = props.match.params.coursesId
+
+ useEffect(() => {
+
+ }, [])
+
+ const onConfirm = async () => {
+ }
+
+ function deleteDir() {
+
+ }
+ const isAdmin = true;
+ const isSuperAdmin = true;
+ const isParent = true;
+ const searchValue = '';
+ const isCourseEnd= '';
+ const course_group_id= '';
+
+
+ const course_groups = props.course_groups
+ const columns = buildColumns()
+ return (
+
+ {/* onChange={onTableChange} */}
+
+
+
+ )
+}
+export default CourseGroupListTable
\ No newline at end of file
From 96f5a895761474315cff8be55979785ef94f5095 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 14 Oct 2019 11:30:49 +0800
Subject: [PATCH 04/16] CourseGroupListTable
---
public/react/src/common/course/WordsBtn.js | 8 +-
.../courses/members/CourseGroupList.js | 42 ++-
.../courses/members/CourseGroupListTable.js | 240 ++++++++++++------
.../modules/courses/members/studentsList.css | 3 +-
4 files changed, 195 insertions(+), 98 deletions(-)
diff --git a/public/react/src/common/course/WordsBtn.js b/public/react/src/common/course/WordsBtn.js
index 85a85cfb6..e1fc5683d 100644
--- a/public/react/src/common/course/WordsBtn.js
+++ b/public/react/src/common/course/WordsBtn.js
@@ -8,20 +8,20 @@ class WordsBtn extends Component {
}
render() {
- let{to, href,targets, style2 }=this.props
+ let{to, href,targets, style2, style, ...others }=this.props
return(
{
to==undefined&&targets==undefined ?
{this.props.children}:
targets!=undefined? {this.props.children}
:
{this.props.children}
}
diff --git a/public/react/src/modules/courses/members/CourseGroupList.js b/public/react/src/modules/courses/members/CourseGroupList.js
index 248a4d52d..e749adcf1 100644
--- a/public/react/src/modules/courses/members/CourseGroupList.js
+++ b/public/react/src/modules/courses/members/CourseGroupList.js
@@ -1,6 +1,6 @@
// 分班列表 加入分班
-import React, { useState, useEffect } from 'react'
+import React, { useState, useEffect, useRef } from 'react'
import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin, Tooltip , Divider, Popconfirm } from "antd";
import ClipboardJS from 'clipboard'
@@ -21,6 +21,8 @@ import DownloadMessageysl from "../../modals/DownloadMessageysl";
import CreateGroupByImportModal from './modal/CreateGroupByImportModal'
import ChangeRolePop from './ChangeRolePop'
import CourseGroupListTable from './CourseGroupListTable'
+
+import './studentsList.css'
/**
角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
*/
@@ -31,12 +33,20 @@ function CourseGroupList(props) {
const [DownloadMessageval, setDownloadMessageval] = useState()
const [listRes, setListRes] = useState({})
+ const createGroupModalEl = useRef(null);
const courseId = props.match.params.coursesId
useEffect(() => {
fetchAll()
+ on('updateNavSuccess', onOperationSuccess)
+ return () => {
+ off('updateNavSuccess', onOperationSuccess)
+ }
}, [])
+ function onOperationSuccess() {
+ fetchAll()
+ }
async function fetchAll() {
const url = `/courses/${courseId}/course_groups.json`
const response = await axios.get(url, { params: {
@@ -54,7 +64,7 @@ function CourseGroupList(props) {
}
function addDir() {
-
+ trigger('groupAdd', props.coursesids)
}
function deleteDir() {
@@ -96,8 +106,8 @@ function CourseGroupList(props) {
});
}
- const isAdmin = true;
- const isSuperAdmin = true;
+ const isAdmin = props.isAdmin();
+ const isSuperAdmin = props.isSuperAdmin();
const isParent = true;
const searchValue = '';
const isCourseEnd= '';
@@ -107,6 +117,7 @@ function CourseGroupList(props) {
const total_count = listRes.group_count;
const none_group_member_count = listRes.none_group_member_count;
const course_groups = listRes.course_groups
+ const current_group_id = listRes.current_group_id
let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩
let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息
@@ -131,16 +142,17 @@ function CourseGroupList(props) {
isSuperAdmin &&
{/* ref="createGroupByImportModal" */}
{/* this.refs['createGroupByImportModal'].setVisible(true) */}
- {}}>导入创建分班
+ {createGroupModalEl.current.setVisible(true)}}>导入创建分班
}
{
// pageType !== TYPE_STUDENTS &&
- !isCourseEnd && isAdmin && isParent && addDir()}>添加分班 }
- {
- isAdmin && !isParent && course_group_id != 0 && deleteDir()}>删除分班 }
+ !isCourseEnd && isAdmin && isParent && addDir()}>新建分班 }
+ {/* {
+ isAdmin && !isParent && course_group_id != 0 && deleteDir()}>删除分班 } */}
{/* {
isAdmin && !isParent && course_group_id != 0 && this.renameDir()}>分班重命名 } */}
{ isAdmin &&
@@ -207,17 +210,28 @@ function CourseGroupList(props) {
onPressEnter={onPressEnter}
>
-
-
- {course_groups && !!course_groups.length ?
+ 未分班:
+ {none_group_member_count}个学生
+
+ {props.history.push(`/courses/${courseId}/course_groups/0`)}}>查看
+
+
+
+ {course_groups && !!course_groups.length ?
+
+
+ :
- }
-
-
+ >
+
+ :
+ }
+
)
}
diff --git a/public/react/src/modules/courses/members/CourseGroupListTable.js b/public/react/src/modules/courses/members/CourseGroupListTable.js
index 779e40f5e..f1dd3aafd 100644
--- a/public/react/src/modules/courses/members/CourseGroupListTable.js
+++ b/public/react/src/modules/courses/members/CourseGroupListTable.js
@@ -93,29 +93,33 @@ function CourseGroupListTable(props) {
render: (member_manager, record, index) => {
return member_manager
}
- },
- isAdmin ? {
- title: '邀请码',
- dataIndex: 'invite_code',
- key: 'invite_code',
- align:'center',
- width:"10%",
- className:"color-grey-6",
- render: (invite_code, record, index) => {
- return invite_code
- }
- } : {
- title: '你当前所在分班',
- dataIndex: 'group',
- key: 'group',
- align:'center',
- width:"20%",
- className:"color-grey-6",
- render: (invite_code, record, index) => {
- return props.current_group_id == record.id &&
- }
- },
- {
+ }];
+ if (!isNotMember) {
+ const aCol = (isAdmin ? {
+ title: '邀请码',
+ dataIndex: 'invite_code',
+ key: 'invite_code',
+ align:'center',
+ width:"10%",
+ className:"color-grey-6",
+ render: (invite_code, record, index) => {
+ return invite_code
+ }
+ } : {
+ title: '你当前所在分班',
+ dataIndex: 'group',
+ key: 'group',
+ align:'center',
+ width:"20%",
+ className:"color-grey-6",
+ render: (invite_code, record, index) => {
+ return props.current_group_id == record.id &&
+ }
+ })
+ columns.push( aCol );
+ }
+
+ columns.push({
title: '操作',
dataIndex: 'setting',
key: 'setting',
@@ -124,15 +128,15 @@ function CourseGroupListTable(props) {
className:"color-grey-6",
render: (none, record, index) => {
return
- {!isCourseEnd && isAdmin && onDelete(record)} style={'grey'}>删除}
+ {!isCourseEnd && isAdmin && onDelete(record)} style={'grey'}>删除分班}
{isAdmin && 复制邀请码 }
{isStudent && addToDir(record)} style={''}>加入分班}
onGoDetail(record)} style={''}>查看
}
- },
- ]
+ })
+
return columns
}
const addToDir = async (record) => {
@@ -180,6 +184,8 @@ function CourseGroupListTable(props) {
const isAdmin = props.isAdmin();
const isSuperAdmin = props.isSuperAdmin();
const isStudent = props.isStudent()
+ const isNotMember = props.isNotMember()
+
const isParent = true;
const isCourseEnd= props.isCourseEnd();
From 30cc649c0756a3491facde049efedafc9bedecbb Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 14 Oct 2019 17:32:30 +0800
Subject: [PATCH 09/16] =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=95=99=E5=B8=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/members/CourseGroupListTable.js | 25 ++++++++++---------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/public/react/src/modules/courses/members/CourseGroupListTable.js b/public/react/src/modules/courses/members/CourseGroupListTable.js
index f1dd3aafd..1f9b24771 100644
--- a/public/react/src/modules/courses/members/CourseGroupListTable.js
+++ b/public/react/src/modules/courses/members/CourseGroupListTable.js
@@ -82,19 +82,20 @@ function CourseGroupListTable(props) {
render: (course_members_count, record, index) => {
return course_members_count
}
- },
- {
- title: '管理教师',
- dataIndex: 'member_manager',
- key: 'member_manager',
- align:'center',
- width:"27%",
- className:"color-grey-6",
- render: (member_manager, record, index) => {
- return member_manager
- }
- }];
+ }
+ ];
if (!isNotMember) {
+ columns.push({
+ title: '管理教师',
+ dataIndex: 'member_manager',
+ key: 'member_manager',
+ align:'center',
+ width:"27%",
+ className:"color-grey-6",
+ render: (member_manager, record, index) => {
+ return member_manager
+ }
+ })
const aCol = (isAdmin ? {
title: '邀请码',
dataIndex: 'invite_code',
From c3f89b63b35fae1f969b3de02d2360e1baec5b86 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 14 Oct 2019 17:37:40 +0800
Subject: [PATCH 10/16] dot
---
.../src/modules/courses/members/CourseGroupListTable.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/members/CourseGroupListTable.js b/public/react/src/modules/courses/members/CourseGroupListTable.js
index 1f9b24771..e26e951ce 100644
--- a/public/react/src/modules/courses/members/CourseGroupListTable.js
+++ b/public/react/src/modules/courses/members/CourseGroupListTable.js
@@ -195,8 +195,14 @@ function CourseGroupListTable(props) {
const columns = buildColumns()
return (
+
{/* onChange={onTableChange} */}
-
+
)
From d77abf7927643db34516793d0d7a601145a5b4ba Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Tue, 15 Oct 2019 09:07:00 +0800
Subject: [PATCH 11/16] =?UTF-8?q?=E5=88=86=E7=8F=AD=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E7=9A=84url=E6=9B=B4=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/courses_helper.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index fb7bd1a88..9afbdd3af 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -62,7 +62,7 @@ module CoursesHelper
course_board = course.course_board
"/courses/#{course.id}/boards/#{course_board.id}"
when "course_group"
- "/courses/#{course.id}/students"
+ "/courses/#{course.id}/course_groups"
end
end
From 2d4fb385cfd71eecd3db52208ab099aa679339ad Mon Sep 17 00:00:00 2001
From: p31729568
Date: Tue, 15 Oct 2019 09:12:59 +0800
Subject: [PATCH 12/16] laboratory setting
---
app/libs/wechat/{app.rb => weapp.rb} | 0
app/models/laboratory_setting.rb | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
rename app/libs/wechat/{app.rb => weapp.rb} (100%)
diff --git a/app/libs/wechat/app.rb b/app/libs/wechat/weapp.rb
similarity index 100%
rename from app/libs/wechat/app.rb
rename to app/libs/wechat/weapp.rb
diff --git a/app/models/laboratory_setting.rb b/app/models/laboratory_setting.rb
index 32848dca2..dc7679514 100644
--- a/app/models/laboratory_setting.rb
+++ b/app/models/laboratory_setting.rb
@@ -34,7 +34,7 @@ class LaboratorySetting < ApplicationRecord
def logo_url(type)
return nil unless Util::FileManage.exists?(self, type)
- Util::FileManage.source_disk_file_url(self, type)
+ Util::FileManage.source_disk_file_url(self, type)[1..-1] # 前端不兼容带 / 的
end
def self.default_config
From c05bf44ed9a13be760d03f28ba10a0dee3e98705 Mon Sep 17 00:00:00 2001
From: p31729568
Date: Tue, 15 Oct 2019 09:20:52 +0800
Subject: [PATCH 13/16] laboratory setting url
---
app/models/laboratory_setting.rb | 2 +-
app/views/settings/show.json.jbuilder | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/models/laboratory_setting.rb b/app/models/laboratory_setting.rb
index dc7679514..32848dca2 100644
--- a/app/models/laboratory_setting.rb
+++ b/app/models/laboratory_setting.rb
@@ -34,7 +34,7 @@ class LaboratorySetting < ApplicationRecord
def logo_url(type)
return nil unless Util::FileManage.exists?(self, type)
- Util::FileManage.source_disk_file_url(self, type)[1..-1] # 前端不兼容带 / 的
+ Util::FileManage.source_disk_file_url(self, type)
end
def self.default_config
diff --git a/app/views/settings/show.json.jbuilder b/app/views/settings/show.json.jbuilder
index 0765e303b..1fce12b77 100644
--- a/app/views/settings/show.json.jbuilder
+++ b/app/views/settings/show.json.jbuilder
@@ -2,9 +2,9 @@ json.setting do
setting = @laboratory.laboratory_setting
json.name setting.name || default_setting.name
- json.nav_logo_url setting.nav_logo_url || default_setting.nav_logo_url
- json.login_logo_url setting.login_logo_url || default_setting.login_logo_url
- json.tab_logo_url setting.tab_logo_url || default_setting.tab_logo_url
+ json.nav_logo_url (setting.nav_logo_url || default_setting.nav_logo_url)&.[](1..-1)
+ json.login_logo_url (setting.login_logo_url || default_setting.login_logo_url)&.[](1..-1)
+ json.tab_logo_url (setting.tab_logo_url || default_setting.tab_logo_url)&.[](1..-1)
json.navbar setting.navbar || default_setting.navbar
From df3f59ca3d5033d0116fc76113de3a67abfc4ec1 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Tue, 15 Oct 2019 09:37:58 +0800
Subject: [PATCH 14/16] substring
---
.../modules/courses/members/CourseGroupListTable.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/members/CourseGroupListTable.js b/public/react/src/modules/courses/members/CourseGroupListTable.js
index e26e951ce..84edb2fc5 100644
--- a/public/react/src/modules/courses/members/CourseGroupListTable.js
+++ b/public/react/src/modules/courses/members/CourseGroupListTable.js
@@ -93,7 +93,9 @@ function CourseGroupListTable(props) {
width:"27%",
className:"color-grey-6",
render: (member_manager, record, index) => {
- return member_manager
+ return {record.subStringOfMember_manager || member_manager}
}
})
const aCol = (isAdmin ? {
@@ -193,6 +195,13 @@ function CourseGroupListTable(props) {
const course_groups = props.course_groups
const columns = buildColumns()
+ const dataSource = course_groups.map(item => {
+ return {
+ ...item,
+ subStringOfMember_manager : item.member_manager.length > 92
+ ? item.member_manager.substring(0, 92) + '...' : null
+ }
+ })
return (
{/* onChange={onTableChange} */}
-
+
)
From fb59e6115f95dafe93944109cfde31df60042339 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 15 Oct 2019 10:15:48 +0800
Subject: [PATCH 15/16] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=BE=E5=A0=82?=
=?UTF-8?q?=E4=BD=93=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/boards/BoardsNew.js | 3 ++-
public/react/src/modules/courses/boards/TopicDetail.js | 6 ++++--
.../src/modules/courses/busyWork/CommonWorkAppraise.js | 2 ++
.../src/modules/courses/busyWork/CommonWorkDetailIndex.js | 1 +
public/react/src/modules/courses/busyWork/NewWork.js | 4 ++--
public/react/src/modules/courses/exercise/ExerciseNew.js | 5 +++--
.../src/modules/courses/exercise/ExerciseReviewAndAnswer.js | 1 +
.../modules/courses/exercise/Testpapersettinghomepage.js | 2 +-
.../courses/graduation/tasks/GraduationTaskDetail.js | 2 ++
.../courses/graduation/tasks/GraduationTasksSubmitedit.js | 2 +-
.../courses/graduation/tasks/GraduationTasksSubmitnew.js | 4 ++--
.../courses/graduation/tasks/GraduationTasksappraise.js | 2 ++
.../modules/courses/graduation/tasks/GraduationTasksedit.js | 2 +-
.../modules/courses/graduation/tasks/GraduationTasksnew.js | 1 +
.../courses/graduation/topics/GraduateTopicDetail.js | 2 +-
.../modules/courses/graduation/topics/GraduateTopicNew.js | 1 +
public/react/src/modules/courses/poll/PollDetailIndex.js | 1 +
public/react/src/modules/courses/poll/PollInfo.js | 1 +
public/react/src/modules/courses/poll/PollNew.js | 1 +
.../src/modules/courses/shixunHomework/ShixunWorkDetails.js | 1 +
.../src/modules/courses/shixunHomework/ShixunWorkReport.js | 2 +-
21 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js
index 22a5fece1..9ae74699f 100644
--- a/public/react/src/modules/courses/boards/BoardsNew.js
+++ b/public/react/src/modules/courses/boards/BoardsNew.js
@@ -287,7 +287,8 @@ class BoardsNew extends Component{
const isAdmin = this.props.isAdmin()
const courseId=this.props.match.params.coursesId;
const boardId = this.props.match.params.boardId
- const isCourseEnd = this.props.isCourseEnd()
+ const isCourseEnd = this.props.isCourseEnd();
+ document.title=this.props.coursedata&&this.props.coursedata.name;
return(