this.smyJump(3,item.target.id)}>
diff --git a/public/react/src/modules/page/main/CodeRepositoryViewContainer.js b/public/react/src/modules/page/main/CodeRepositoryViewContainer.js
index 279402e66..c30ec0386 100644
--- a/public/react/src/modules/page/main/CodeRepositoryViewContainer.js
+++ b/public/react/src/modules/page/main/CodeRepositoryViewContainer.js
@@ -21,8 +21,11 @@ function getNewTreeData(treeData, curKey, child, level) {
data.forEach((item) => {
// 这里不能用indexOf 同一级可能出现test目录和test.py文件
if (item.key == curKey) {
- child = addPrePath(child, curKey);
- item.children = child;
+ if (child && child.length) { // 可能没有子节点
+ child = addPrePath(child, curKey);
+ item.children = child;
+ }
+ item.isLeaf = false;
} else {
if (item.children) {
loop(item.children);
@@ -153,6 +156,10 @@ class CodeRepositoryViewContainer extends Component {
});
}
map2OldData = (treeData) => {
+ if (!treeData || treeData.length == 0) {
+ return []
+ }
+
if (!treeData || treeData.length === 0) return treeData;
treeData = treeData.map(item => {
return {
diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js
index c39042308..dd4572bcc 100644
--- a/public/react/src/modules/tpm/TPMIndexHOC.js
+++ b/public/react/src/modules/tpm/TPMIndexHOC.js
@@ -222,7 +222,7 @@ export function TPMIndexHOC(WrappedComponent) {
# 课程权限判断
ADMIN = 0 # 超级管理员
BUSINESS = 1 # 运营人员
- CREATOR = 2 # 课程创建者
+ CREATOR = 2 # 课程创建者 课堂管理员
PROFESSOR = 3 # 课程老师
ASSISTANT_PROFESSOR = 4 # 课程助教
STUDENT = 5 # 学生
@@ -233,6 +233,9 @@ export function TPMIndexHOC(WrappedComponent) {
isSuperAdmin = () => {
// return false
return this.state.coursedata&&this.state.coursedata.course_identity === 0
+ }
+ isCourseAdmin = () => {
+ return this.state.coursedata&&this.state.coursedata.course_identity === 2
}
//超管、运维0-1
isClassManagement = () => {
@@ -537,6 +540,8 @@ export function TPMIndexHOC(WrappedComponent) {
isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator,
isClassManagement:this.isClassManagement,
+ isCourseAdmin:this.isCourseAdmin,
+
isAdmin: this.isAdmin,
isAdminOrTeacher: this.isAdminOrTeacher,
isStudent: this.isStudent,
diff --git a/public/react/src/modules/user/account/AccountSecure.js b/public/react/src/modules/user/account/AccountSecure.js
index e5b03e36b..797b350d2 100644
--- a/public/react/src/modules/user/account/AccountSecure.js
+++ b/public/react/src/modules/user/account/AccountSecure.js
@@ -284,7 +284,7 @@ class AccountSecure extends Component {
{
basicInfo && basicInfo.phone ?
-
{ regPhoneAndEmail(basicInfo.phone) }
+
{ basicInfo.phone }
:
未绑定
}
@@ -348,7 +348,7 @@ class AccountSecure extends Component {
{
basicInfo && basicInfo.mail ?
-
{ regPhoneAndEmail(basicInfo.mail) }
+
{ basicInfo.mail }
:
未绑定
}
diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js
index 76979c9f5..3b76bfa28 100644
--- a/public/react/src/modules/user/usersInfo/InfosTopics.js
+++ b/public/react/src/modules/user/usersInfo/InfosTopics.js
@@ -297,8 +297,8 @@ class InfosTopics extends Component{
let categorylist=[
{val:"普通作业",type:"normal"},
{val:"分组作业",type:"group"},
- {val:"毕设选题",type:"gtopic"},
- {val:"毕设任务",type:"gtask"},
+ // {val:"毕设选题",type:"gtopic"},
+ // {val:"毕设任务",type:"gtask"},
{val:"试卷",type:"exercise"},
{val:"问卷",type:"poll"},
]
diff --git a/public/react/src/modules/user/usersInfo/video/InfosVideo.js b/public/react/src/modules/user/usersInfo/video/InfosVideo.js
index cb66434d0..dfda982f2 100644
--- a/public/react/src/modules/user/usersInfo/video/InfosVideo.js
+++ b/public/react/src/modules/user/usersInfo/video/InfosVideo.js
@@ -288,12 +288,22 @@ function InfoVideo (props) {
个视频
- {categoryObj.category == 'all' &&
}
+ {/*{categoryObj.category == 'all' &&
}*/}
+
+ {categoryObj.category == 'all' &&
+
+ {sortKey=="published_at-desc"?"最新上传":"最早上传"}
+
+ - onSortChange("published_at-desc",0)}>最新上传
+ - onSortChange("published_at-asc",1)}>最早上传
+
+
+
}