Merge branches 'dev_aliyun' and 'dev_item_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_item_bank

dev_jupyter
杨树明 5 years ago
commit 0bba8b6972

@ -194,7 +194,7 @@ class HomeworkCommonsController < ApplicationController
# TODO user_extension 如果修改 请调整
unless params[:search].blank?
@student_works = @student_works.joins(user: :user_extension).where("concat(lastname, firstname) like ?
or student_id like ?", "%#{params[:search]}%", "%#{params[:search]}%")
or student_id like ?", "%#{params[:search].strip}%", "%#{params[:search].strip}%")
end
@work_count = @student_works.size

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

@ -170,6 +170,7 @@ class Question extends Component {
this.setState({
defaultActiveKey: key,
selectallquestionsonthispages:false,
difficulty:null,
})
var data = {
discipline_id:this.state.discipline_id,
@ -177,7 +178,7 @@ class Question extends Component {
tag_discipline_id:this.state.tag_discipline_id,
public: key,
item_type: this.state.item_type,
difficulty: this.state.difficulty,
difficulty: null,
page: 1,
per_page:10,
};

@ -40,8 +40,10 @@ class Contentpart extends Component {
const content = (
<div className="questiontypes" style={{
width:'93px',
height:'161px',
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>
@ -56,8 +58,10 @@ class Contentpart extends Component {
const contents = (
<div className="questiontypes" style={{
width:'93px',
height:'120px',
height:'161px',
}}>
<p className="questiontype " onClick={()=>this.props.setdifficulty(null)}>全部</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setdifficulty(1)}>简单</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setdifficulty(2)}>适中</p>

@ -96,8 +96,13 @@ class Testpaperlibrary extends Component {
})
var data={
page:pages,
per_page:10,
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: null,
per_page:10,
}
this.getdata(data);
}
@ -114,20 +119,31 @@ class Testpaperlibrary extends Component {
keywords: value,
})
var data={
page:1,
per_page:10,
page:this.state.page,
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: value,
per_page:10,
}
this.getdata(data);
}
callback = (key) => {
this.setState({
defaultActiveKey: key,
difficulty:null
})
var data={
page:1,
per_page:10,
page:this.state.page,
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: key,
difficulty: this.state.difficulty,
keywords: this.state.keywords,
per_page:10,
}
this.getdata(data);
}
@ -178,9 +194,9 @@ class Testpaperlibrary extends Component {
sub_discipline_id:null,
tag_discipline_id:null,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: this.state.keywords,
page: this.state.page,
difficulty: null,
keywords: null,
page: 1,
per_page:10,
};
this.getdata(data);
@ -196,9 +212,9 @@ class Testpaperlibrary extends Component {
sub_discipline_id:sub_discipline_id,
tag_discipline_id:null,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: this.state.keywords,
page: this.state.page,
difficulty: null,
keywords: null,
page:1,
per_page:10,
};
this.getdata(data);
@ -213,17 +229,15 @@ class Testpaperlibrary extends Component {
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: this.state.keywords,
page: this.state.page,
difficulty: null,
keywords: null,
page: 1,
per_page:10,
};
this.getdata(data);
}
setdifficulty=(bool)=>{
}
modalCancels=()=>{
this.setState({
modalsTypes: false
@ -258,7 +272,7 @@ class Testpaperlibrary extends Component {
})
}
//公开试
//公开试
publicopentimu = (id) => {
const url = `/examination_banks/${id}/set_public.json`;
@ -283,7 +297,7 @@ class Testpaperlibrary extends Component {
})
}
//删除试
//删除试
deletetimu = (id) => {
const url = `/examination_banks/${id}.json`;
@ -313,7 +327,7 @@ class Testpaperlibrary extends Component {
showmodels = (id) => {
this.setState({
modalsType: true,
titilesm: "设为公开后,所有成员均可使用试",
titilesm: "设为公开后,所有成员均可使用试",
titiless: "是否设置为公开?",
titbool: true,
timuid: id

@ -44,8 +44,10 @@ class Contentpart extends Component {
const contents = (
<div className="questiontypes" style={{
width:'93px',
height:'120px',
height:'160px',
}}>
<p className="questiontype " onClick={()=>this.props.setdifficulty(null)}>全部</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setdifficulty(1)}>简单</p>
<p className="questiontypeheng"></p>
<p className="questiontype " onClick={()=>this.props.setdifficulty(2)}>适中</p>

Loading…
Cancel
Save