|
|
|
@ -11,7 +11,7 @@ import NoneData from '../coursesPublic/NoneData'
|
|
|
|
|
|
|
|
|
|
const Search=Input.Search;
|
|
|
|
|
const pageCount = 20
|
|
|
|
|
// "poll", #normal 普通作业题库; group 分组作业题库; poll问卷题库; exercise试卷题库; gtask 毕设选题题库;gtopic 毕设任务
|
|
|
|
|
// "poll", #normal 普通作业题库; group 分组作业题库; poll问卷题库; exercise试卷题库; gtask 毕设选题题库;gtopic 毕设任务
|
|
|
|
|
const engNameMap = {
|
|
|
|
|
poll: '问卷',
|
|
|
|
|
normal: '普通作业',
|
|
|
|
@ -37,7 +37,7 @@ class UseBank extends Component{
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
console.log("UseBank");
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
onCheckBoxChange = (checkBoxValues) => {
|
|
|
|
|
this.setState({
|
|
|
|
@ -51,10 +51,10 @@ class UseBank extends Component{
|
|
|
|
|
}
|
|
|
|
|
fetchAll = (arg_page) => {
|
|
|
|
|
console.log('fetchAll')
|
|
|
|
|
const courseId = this.props.match.params.coursesId
|
|
|
|
|
const courseId = this.props.match.params.coursesId
|
|
|
|
|
const page = arg_page || this.state.page;
|
|
|
|
|
const { nav_my, search } = this.state
|
|
|
|
|
/**
|
|
|
|
|
/**
|
|
|
|
|
normal 普通作业题库; group 分组作业题库; poll问卷题库; exercise试卷题库; gtask 毕设选题题库;gtopic 毕设任务
|
|
|
|
|
filter string public公共题库 2, myself我的题库 1
|
|
|
|
|
*/
|
|
|
|
@ -142,11 +142,11 @@ class UseBank extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
hometypepvisible:true
|
|
|
|
|
})
|
|
|
|
|
const courseId = this.props.match.params.coursesId
|
|
|
|
|
const courseId = this.props.match.params.coursesId
|
|
|
|
|
let url = `/question_banks/save_banks.json`
|
|
|
|
|
this.setState({ loading: true })
|
|
|
|
|
axios.post(url
|
|
|
|
|
,{
|
|
|
|
|
, {
|
|
|
|
|
"object_type": object_type,
|
|
|
|
|
"bank_id": checkBoxValues,
|
|
|
|
|
"course_id": courseId
|
|
|
|
@ -167,7 +167,7 @@ class UseBank extends Component{
|
|
|
|
|
hometypepvisible:false,
|
|
|
|
|
checkBoxValues:[]
|
|
|
|
|
})
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch( (error) =>{
|
|
|
|
@ -267,14 +267,14 @@ class UseBank extends Component{
|
|
|
|
|
></Search>
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
object_list && object_list.length == 0 && page == 1 ? "" : nav_my==='myself'?
|
|
|
|
|
object_list && object_list.length == 0 && page == 1 ? "" : nav_my === 'myself' ?
|
|
|
|
|
<p className="color-grey-6 mb25 edu-txt-center">选用对象:你在课堂{engNameMap[object_type]}列表中已<span className="color-orange-tip">“加入题库”</span>的{engNameMap[object_type]}</p>
|
|
|
|
|
:
|
|
|
|
|
<p className="color-grey-6 mb25 edu-txt-center">选用对象:题库中已设置成公共属性的所有{engNameMap[object_type]}</p>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
nav_my !='myself' && is_teacher == false ?
|
|
|
|
|
nav_my != 'myself' && is_teacher == false ?
|
|
|
|
|
<div style={{"height":"230px"}} className="d_middle edu-txt-center">
|
|
|
|
|
<div>
|
|
|
|
|
<p className="font-16 mb20 color-grey-3">通过职业认证的教师才能访问公共题库</p>
|
|
|
|
@ -296,7 +296,7 @@ class UseBank extends Component{
|
|
|
|
|
>
|
|
|
|
|
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
|
|
|
|
|
{ object_list && object_list.map( item => {
|
|
|
|
|
/**
|
|
|
|
|
/**
|
|
|
|
|
course_list_name: "C++程序设计"
|
|
|
|
|
id: 3889
|
|
|
|
|
name: "作业3:第四章 控制结构 "
|
|
|
|
@ -313,7 +313,7 @@ class UseBank extends Component{
|
|
|
|
|
|
|
|
|
|
>{item.course_list_name}</span>
|
|
|
|
|
{
|
|
|
|
|
nav_my==='public' &&
|
|
|
|
|
nav_my === 'public' &&
|
|
|
|
|
<span className="fl with16 color-grey-6 task-hide pl10">{item.username}</span>
|
|
|
|
|
}
|
|
|
|
|
{nav_my === "myself" ?
|
|
|
|
@ -345,15 +345,15 @@ class UseBank extends Component{
|
|
|
|
|
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>毕业设计2018开题报告题报</label></span>
|
|
|
|
|
<span className={nav_my===1?"fl with50 color-grey-6 task-hide pl5":"fl with30 color-grey-6 task-hide pl5"}>数据库原理数据库原理</span>
|
|
|
|
|
{
|
|
|
|
|
nav_my===2 &&
|
|
|
|
|
nav_my===2 &&
|
|
|
|
|
<span className="fl with16 color-grey-6 task-hide pl10">胡莎莎胡莎莎</span>
|
|
|
|
|
}
|
|
|
|
|
</p> */}
|
|
|
|
|
</InfiniteScroll>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<p style={{height:"20px",lineHeight:"20px;", marginTop: '4px'}}>
|
|
|
|
|
|
|
|
|
|
<p style={{height: "20px", lineHeight: "20px;", marginTop: '4px'}}>
|
|
|
|
|
{
|
|
|
|
|
isChecked !="" ? <span className="color-red">{isChecked}</span>:""
|
|
|
|
|
}
|
|
|
|
@ -376,4 +376,4 @@ class UseBank extends Component{
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
export default UseBank;
|
|
|
|
|
export default UseBank;
|
|
|
|
|