Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

newyslclassrooms
cxt 5 years ago
commit 2a38928688

@ -182,7 +182,7 @@ class ShixunsController < ApplicationController
select m.user_id, u.login, u.lastname, m.updated_at, 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(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 (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 order by score desc, time asc limit 10
" "
@myshixuns = Myshixun.find_by_sql(sql) @myshixuns = Myshixun.find_by_sql(sql)

@ -742,9 +742,6 @@ class Question extends Component {
} }
// 撤销 // 撤销
getitem_basketss=(id)=>{ getitem_basketss=(id)=>{
this.setState({
})
if(Undoclickable===true){ if(Undoclickable===true){
Undoclickable=false; Undoclickable=false;
//选用题型可以上传单个 或者多个题型 //选用题型可以上传单个 或者多个题型

@ -232,39 +232,6 @@ class Contentpart extends Component {
} }
const content = (
<div className="questiontypes" style={{
width:'93px',
height:'200px',
}}>
<p className="questiontype " onClick={()=>this.props.setitem_types(null)}>全部</p>
<p className="questiontypeheng" ></p>
<p className="questiontype " onClick={()=>this.props.setitem_types("SINGLE")}>单选题</p>
<p className="questiontypeheng" ></p>
<p className="questiontype " onClick={()=>this.props.setitem_types("MULTIPLE")}>多选题</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setitem_types("JUDGMENT")}>判断题</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setitem_types("PROGRAM")}>编程题</p>
<p className="questiontypeheng"></p>
</div>
);
const contents = (
<div className="questiontypes" style={{
width:'93px',
height:'120px',
}}>
<p className="questiontype " onClick={()=>this.props.setoj_status(null)}>全部</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setoj_status(0)}>未发布</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setoj_status(1)}>已发布</p>
<p className="questiontypeheng"></p>
</div>
);
// console.log("Contentpart.js"); // console.log("Contentpart.js");
// console.log(this.props.current_user.professional_certification); // console.log(this.props.current_user.professional_certification);
@ -381,22 +348,6 @@ class Contentpart extends Component {
:"" :""
} }
{item_type==="PROGRAM"?
defaultActiveKey===0||defaultActiveKey==="0"?
<Popover getPopupContainer={trigger => trigger.parentNode} placement="bottom" trigger="hover" content={contents} onVisibleChange={()=>this.props.handleVisibleChange(true)}>
<div className=" sortinxdirection mr30">
<div className="subjecttit">
全部
</div>
<i className="iconfont icon-sanjiaoxing-down font-12 lg ml7 icondowncolor"></i>
</div>
</Popover>
:
"":""
}
{ {
this.props.Isitapopup&&this.props.Isitapopup==="true"? this.props.Isitapopup&&this.props.Isitapopup==="true"?
<Search <Search
@ -455,6 +406,7 @@ class Contentpart extends Component {
: this.props.Contentdata.items.map((object, index) => { : this.props.Contentdata.items.map((object, index) => {
return ( return (
<Listjihe {...this.state} {...this.props} <Listjihe {...this.state} {...this.props}
defaultActiveKeys={defaultActiveKeys}
Datacountbool={this.props.Datacountbool} Datacountbool={this.props.Datacountbool}
Datacount={this.props.Datacount} Datacount={this.props.Datacount}
Isitapopup={this.props.Isitapopup} Isitapopup={this.props.Isitapopup}

@ -346,9 +346,17 @@ class Listjihe extends Component {
</div> </div>
{ {
items.item_type==="PROGRAM"? items.item_type==="PROGRAM"?
<a onClick={()=>this.seturls(`/problems/${items.program_attr.identifier}/edit`)} className="ml10 flex1 mt2"> (
<div style={{wordBreak: "break-word",fontWeight:"bold"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}></div> this.props.defaultActiveKeys&&this.props.defaultActiveKeys==="0"?
</a> <a onClick={()=>this.seturls(`/problems/${items.program_attr.identifier}/edit`)} className="ml10 flex1 mt2 xiaoshou">
<div style={{wordBreak: "break-word",fontWeight:"bold"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}></div>
</a>
:
<p className="ml10 flex1 mt2 xiaoshout">
<div style={{wordBreak: "break-word",fontWeight:"bold"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}></div>
</p>
)
: :
<div className="ml10 flex1 markdown-body mt2" style={{wordBreak: "break-word",fontWeight:"bold"}}> <div className="ml10 flex1 markdown-body mt2" style={{wordBreak: "break-word",fontWeight:"bold"}}>

@ -28,11 +28,21 @@ class QuestionModal extends Component {
width="442px" width="442px"
> >
<div className="educouddiv"> <div className="educouddiv">
<div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titilesm}</p></div> {this.props.titilesm?
<div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titiless}</p></div> <div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titilesm}</p></div>
:
""
}
{
this.props.titiless?
<div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titiless}</p></div>
:
""
}
<div className="clearfix mt30 edu-txt-center"> <div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30 w80" onClick={()=>this.props.modalCancel()}>取消</a> <a className="task-btn mr30 w80" onClick={()=>this.props.modalCancel()}>取消</a>
<a className="task-btn task-btn-orange w80" onClick={()=>this.props.setDownload()}>确定</a> <a className="task-btn task-btn-orange w80" onClick={()=>this.props.setDownload()}>{this.props.boolok?this.props.boolok:"确定"}</a>
</div> </div>
</div> </div>
</Modal> </Modal>

@ -19,6 +19,7 @@ import '../tpm/newshixuns/css/Newshixuns.css';
import Bottomsubmit from "../../modules/modals/Bottomsubmit"; import Bottomsubmit from "../../modules/modals/Bottomsubmit";
import Seeoagertit from "./component/Seeoagertit"; import Seeoagertit from "./component/Seeoagertit";
import Paperlibraryseeid_item from './component/Paperlibraryseeid_item'; import Paperlibraryseeid_item from './component/Paperlibraryseeid_item';
import QuestionModal from "../question/component/QuestionModal";
//人工组卷预览 //人工组卷预览
class Paperlibraryseeid extends Component { class Paperlibraryseeid extends Component {
constructor(props) { constructor(props) {
@ -27,8 +28,10 @@ class Paperlibraryseeid extends Component {
this.state = { this.state = {
paperlibrartdata:[], paperlibrartdata:[],
defaultActiveKey:"0", defaultActiveKey:"0",
modalsType:false,
titilesm:"",
titiless:"",
boolok:"知道了"
} }
@ -91,7 +94,11 @@ class Paperlibraryseeid extends Component {
} }
preservation = () => { preservation = () => {
//保存试卷 //保存试卷
this.setState({
modalsType: true,
titilesm: "功能正在内测中,敬请期待",
titiless: "",
})
@ -109,13 +116,34 @@ class Paperlibraryseeid extends Component {
getcontentMdRef = (Ref) => { getcontentMdRef = (Ref) => {
this.contentMdRef = Ref; this.contentMdRef = Ref;
} }
modalCancel =()=>{
this.setState({
modalsType: false,
})
}
setDownload =()=>{
this.setState({
modalsType: false,
})
}
render() { 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; const params = this.props && this.props.match && this.props.match.params;
// ////console.log(params); // ////console.log(params);
let urlsysl=`/paperlibrary?defaultActiveKey=${defaultActiveKey}`; let urlsysl=`/paperlibrary?defaultActiveKey=${defaultActiveKey}`;
return ( return (
<div> <div>
{
modalsType===true?
<QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={() => this.modalCancel()}
setDownload={() => this.setDownload()}></QuestionModal>
:""
}
<div id={"Itembankstopid"} className="newMain clearfix intermediatecenter " <div id={"Itembankstopid"} className="newMain clearfix intermediatecenter "
> >

Loading…
Cancel
Save