diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index a3efafdb9..e31eaa26b 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -44,7 +44,7 @@ if (isDev) { // 超管 debugType = "admin"; // 老师 -// debugType="teacher"; +debugType="teacher"; // 学生 // debugType="student"; diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js index 20e5a86e0..9615994fa 100644 --- a/public/react/src/modules/question/component/Listjihe.js +++ b/public/react/src/modules/question/component/Listjihe.js @@ -269,6 +269,23 @@ class Listjihe extends Component { } const types = questionType.filter(item=>item.type === items.item_type); + let Periofters = false; + let Perioftersbols=false; + if (this.props) { + if (this.props.current_user) { + if (this.props.current_user.admin) { + Periofters = true; + } + else if (this.props.current_user.business) { + Perioftersbols = true; + } + } + } + // console.log(this.props); + // console.log("PerioftersPerioftersbols"); + // console.log(Periofters); + // console.log(Perioftersbols); + return (
this.props.showmodelysl(items.id)}> + + 删除 +
+ { + items.item_type === "PROGRAM" ? + this.props.Isitapopup&&this.props.Isitapopup==="true"? + "" + : + this.seturls(`/problems/${items.program_attr.identifier}/edit`)}> ++ + 编辑 +
+ + : + this.props.Isitapopup&&this.props.Isitapopup==="true"? + "" + : + this.seturls(`/problemset/edit/${items.id}`)}> ++ + 编辑 +
+ + } ++ + 编辑 +
+ + : + this.props.Isitapopup&&this.props.Isitapopup==="true"? + "" + : + this.seturls(`/problemset/edit/${items.id}`)}> ++ + 编辑 +
+ + } +