From 40f5cbd4a1557f046248d5d503b4bcc127b3c432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 11 Mar 2020 19:57:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/exercise/Exercisesetting.js | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Exercisesetting.js b/public/react/src/modules/courses/exercise/Exercisesetting.js index 0acfec901..2a43f42fb 100644 --- a/public/react/src/modules/courses/exercise/Exercisesetting.js +++ b/public/react/src/modules/courses/exercise/Exercisesetting.js @@ -604,9 +604,33 @@ class Exercisesetting extends Component{ modalSave:this.cancelBox }) }else{ - this.setState({ - flagPageEdit:true - }) + if(this.props.isAdmin()===true){ + try { + //是否为助教 + if(this.props.isAssistant()===true){ + //如果是助教是否有权限 + if(this.props.assistant_auth===true){ + this.setState({ + flagPageEdit:true + }) + }else{ + this.setState({ + flagPageEdit:false + }) + } + }else{ + //是老师 + this.setState({ + flagPageEdit:true + }) + } + }catch (e) { + this.setState({ + flagPageEdit:true + }) + } + } + } } //取消编辑