diff --git a/app/models/poll.rb b/app/models/poll.rb index 5c1a9a64c..0ea76a8a3 100644 --- a/app/models/poll.rb +++ b/app/models/poll.rb @@ -103,7 +103,7 @@ class Poll < ApplicationRecord if course.is_end status = 4 else - if user.present? && user.student_of_course?(course) + if user.present? && user.course_identity(course) == Course::STUDENT ex_time = get_poll_times(user.id,false) pb_time = ex_time[:publish_time] ed_time = ex_time[:end_time] diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index b96751d85..2da5f0d0e 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -60,6 +60,7 @@ class Question extends Component { booljupyterurls:false, disciplinesdatakc:0, disciplinesdatazsd:0, + selectallquestionsonthispages:false, } } @@ -168,6 +169,7 @@ class Question extends Component { callback = (key) => { this.setState({ defaultActiveKey: key, + selectallquestionsonthispages:false, }) var data = { discipline_id:this.state.discipline_id, @@ -176,7 +178,7 @@ class Question extends Component { public: key, item_type: this.state.item_type, difficulty: this.state.difficulty, - page: this.state.page, + page: 1, per_page:10, }; this.getdata(data); @@ -579,8 +581,13 @@ class Question extends Component { item_ids:item_idsdata } this.getitem_baskets(data); + this.setState({ + selectallquestionsonthispages:true, + }) } + //全选的状态 + //删除大题型 Deletebigquestiontype =(item_type)=>{ const url=`/item_baskets/delete_item_type.json`; @@ -748,55 +755,55 @@ class Question extends Component { { single_questions_count === 0 ? "" - :
单选题{'('}{single_questions_count}{')'}
+ className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("SINGLE")}>
多选题{'('}{multiple_questions_count}{')'}
+ className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("MULTIPLE")}>
判断题{'('}{judgement_questions_count}{')'}
+ className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("JUDGMENT")}>
填空题{'('}{completion_questions_count}{')'}
+ className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("COMPLETION")}>
简答题{'('}{subjective_questions_count}{')'}
+ className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("SUBJECTIVE")}>
编程题{'('}{program_questions_count}{')'}
+ className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("PROGRAM")}>
选用本页全部试题