dev_jupyter
杨树林 5 years ago
parent 8c7be3c4d8
commit dd3e26a319

@ -816,7 +816,9 @@ class Question extends Component {
+ program_questions_count
+ single_questions_count
+ subjective_questions_count;
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
return (
@ -878,15 +880,33 @@ class Question extends Component {
`
}
</style>
<SiderBars
Datacount={Datacount}
myvisible={visible}
{...this.props}
{...this.state}
showDrawer={() => this.showDrawer()}
Headertop={Headertop}
{
isysladmins===true?
<SiderBars
Datacount={Datacount}
myvisible={visible}
{...this.props}
{...this.state}
showDrawer={() => this.showDrawer()}
Headertop={Headertop}
/>
:
is_teacher===true&&professional_certification===true?
<SiderBars
Datacount={Datacount}
myvisible={visible}
{...this.props}
{...this.state}
showDrawer={() => this.showDrawer()}
Headertop={Headertop}
/>
:
""
}
/>
{/*顶部*/}

@ -82,6 +82,11 @@ class Contentpart extends Component {
render() {
let {page}=this.state;
let {defaultActiveKey,item_type,booljupyterurls}=this.props;
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
const content = (
<div className="questiontypes" style={{
width:'93px',
@ -144,8 +149,16 @@ class Contentpart extends Component {
<Tabs defaultActiveKey={defaultActiveKey} onChange={(e)=>this.props.callback(e)}>
<TabPane tab="公共" key="1">
</TabPane>
<TabPane tab="我的" key="0">
</TabPane>
{
isysladmins===true?
<TabPane tab="我的" key="0">
</TabPane>
:is_teacher===true&&professional_certification===true?
<TabPane tab="我的" key="0">
</TabPane>
:""
}
</Tabs>
<div className=" mt19" style={{
@ -181,11 +194,20 @@ class Contentpart extends Component {
<div className="xaxisreverseorder">
{
defaultActiveKey===0||defaultActiveKey==="0"?
<a onClick={(e)=>this.xinzenw(e)}>
<div className="newbutoon">
<p className="newbutoontes" >新增</p>
</div>
</a>
isysladmins===true?
<a onClick={(e)=>this.xinzenw(e)}>
<div className="newbutoon">
<p className="newbutoontes" >新增</p>
</div>
</a>
:
is_teacher===true&&professional_certification===true?
<a onClick={(e)=>this.xinzenw(e)}>
<div className="newbutoon">
<p className="newbutoontes" >新增</p>
</div>
</a>
:""
:""
}
@ -208,7 +230,7 @@ class Contentpart extends Component {
{
defaultActiveKey===0||defaultActiveKey==="0"?
<Search
style={{ marginRight:"30px"}}
style={isysladmins===true||(is_teacher===true&&professional_certification)?{ marginRight:"30px"}:{marginRight:"0px"}}
className={"xaxisreverseorder searchwidth"}
placeholder="请输入题目名称、内容"
enterButton

Loading…
Cancel
Save