diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 8f74f0474..54eb19474 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -182,7 +182,7 @@ class ShixunsController < ApplicationController select m.user_id, u.login, u.lastname, m.updated_at, (select sum(cost_time) from games g where g.myshixun_id = m.id) as time, (select sum(final_score) from games g where g.myshixun_id = m.id) as score - from (users u left join myshixuns m on m.user_id = u.id) where m.shixun_id = #{@shixun.id} and m.status = 1 + from (users u left join myshixuns m on m.user_id = u.id) where u.is_test =0 and m.shixun_id = #{@shixun.id} and m.status = 1 order by score desc, time asc limit 10 " @myshixuns = Myshixun.find_by_sql(sql) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index 772a75fb1..87d05f71a 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -742,9 +742,6 @@ class Question extends Component { } // 撤销 getitem_basketss=(id)=>{ - this.setState({ - - }) if(Undoclickable===true){ Undoclickable=false; //选用题型可以上传单个 或者多个题型 diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index f4fba7d5f..e3f5259e5 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -232,39 +232,6 @@ class Contentpart extends Component { } - const content = ( -
-

this.props.setitem_types(null)}>全部

-

-

this.props.setitem_types("SINGLE")}>单选题

-

-

this.props.setitem_types("MULTIPLE")}>多选题

-

-

this.props.setitem_types("JUDGMENT")}>判断题

-

-

this.props.setitem_types("PROGRAM")}>编程题

-

- -
- ); - const contents = ( -
-

this.props.setoj_status(null)}>全部

-

-

this.props.setoj_status(0)}>未发布

-

-

this.props.setoj_status(1)}>已发布

-

-
- ); - - // console.log("Contentpart.js"); // console.log(this.props.current_user.professional_certification); @@ -381,22 +348,6 @@ class Contentpart extends Component { :"" } - {item_type==="PROGRAM"? - defaultActiveKey===0||defaultActiveKey==="0"? - trigger.parentNode} placement="bottom" trigger="hover" content={contents} onVisibleChange={()=>this.props.handleVisibleChange(true)}> -
- -
- 全部 -
- -
-
- : - "":"" - } - - { this.props.Isitapopup&&this.props.Isitapopup==="true"? { return ( { items.item_type==="PROGRAM"? - this.seturls(`/problems/${items.program_attr.identifier}/edit`)} className="ml10 flex1 mt2"> -
-
+ ( + this.props.defaultActiveKeys&&this.props.defaultActiveKeys==="0"? + this.seturls(`/problems/${items.program_attr.identifier}/edit`)} className="ml10 flex1 mt2 xiaoshou"> +
+
+ : +

+

+

+ ) + :
diff --git a/public/react/src/modules/question/component/QuestionModal.js b/public/react/src/modules/question/component/QuestionModal.js index de7614f37..87338faa7 100644 --- a/public/react/src/modules/question/component/QuestionModal.js +++ b/public/react/src/modules/question/component/QuestionModal.js @@ -28,11 +28,21 @@ class QuestionModal extends Component { width="442px" >
-

{this.props.titilesm}

-

{this.props.titiless}

+ {this.props.titilesm? +

{this.props.titilesm}

+ + : + "" + } + { + this.props.titiless? +

{this.props.titiless}

+ : + "" + }
this.props.modalCancel()}>取消 - this.props.setDownload()}>确定 + this.props.setDownload()}>{this.props.boolok?this.props.boolok:"确定"}
diff --git a/public/react/src/modules/testpaper/Paperlibraryseeid.js b/public/react/src/modules/testpaper/Paperlibraryseeid.js index d81a0afa7..ce529c05e 100644 --- a/public/react/src/modules/testpaper/Paperlibraryseeid.js +++ b/public/react/src/modules/testpaper/Paperlibraryseeid.js @@ -19,6 +19,7 @@ import '../tpm/newshixuns/css/Newshixuns.css'; import Bottomsubmit from "../../modules/modals/Bottomsubmit"; import Seeoagertit from "./component/Seeoagertit"; import Paperlibraryseeid_item from './component/Paperlibraryseeid_item'; +import QuestionModal from "../question/component/QuestionModal"; //人工组卷预览 class Paperlibraryseeid extends Component { constructor(props) { @@ -27,8 +28,10 @@ class Paperlibraryseeid extends Component { this.state = { paperlibrartdata:[], defaultActiveKey:"0", - - + modalsType:false, + titilesm:"", + titiless:"", + boolok:"知道了" } @@ -91,7 +94,11 @@ class Paperlibraryseeid extends Component { } preservation = () => { //保存试卷 - + this.setState({ + modalsType: true, + titilesm: "功能正在内测中,敬请期待", + titiless: "", + }) @@ -109,13 +116,34 @@ class Paperlibraryseeid extends Component { getcontentMdRef = (Ref) => { this.contentMdRef = Ref; } + + modalCancel =()=>{ + this.setState({ + modalsType: false, + }) + + } + + setDownload =()=>{ + this.setState({ + modalsType: false, + }) + + } + render() { - let {paperlibrartdata,defaultActiveKey} = this.state; + let {paperlibrartdata,defaultActiveKey,titilesm,titiless,boolok,modalsType} = this.state; const params = this.props && this.props.match && this.props.match.params; // ////console.log(params); let urlsysl=`/paperlibrary?defaultActiveKey=${defaultActiveKey}`; return (
+ { + modalsType===true? + this.modalCancel()} + setDownload={() => this.setDownload()}> + :"" + }