diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 41b873bac..258a06332 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -104,6 +104,7 @@ class CommonWorkItem extends Component{ let coursesId = this.props.match.params.coursesId; const isStudent = this.props.isStudent() + const isAdmin = this.props.isAdmin() const isAdminOrStudent = this.props.isAdminOrStudent() return(
@@ -128,19 +129,20 @@ class CommonWorkItem extends Component{ { mainList && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{ + let canNotLink = !isAdminOrStudent && item.private_icon == true return(
{ - mainList && mainList.course_identity < 5 && + mainList && isAdmin && }
this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>

this.onItemClick(item)} + className="fl font-16 font-bd mt2 comnonwidth580" style={{cursor: canNotLink ? 'normal' : 'poninter'}} + onClick={canNotLink ? () => {} : () => this.onItemClick(item)} >{item.name} {/* 只有非课堂成员且作业是私有的情况下才会为true */} @@ -155,7 +157,7 @@ class CommonWorkItem extends Component{ { - mainList && mainList.course_identity < 5 && + mainList && isAdmin &&