Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/react/src/modules/courses/shixunHomework/Listofworks.js
dev_forum
杨树明 6 years ago
commit ac4864f89c

@ -102,7 +102,7 @@ class Exercisestatisticalresult extends Component {
} }
`} `}
</style> </style>
<div className={"educontent mb20" }> <div className={"educontent mb20" } style={{width: "1250px"}}>
{data&&data.course_groups.length===0?"":<div className="stud-class-set"> {data&&data.course_groups.length===0?"":<div className="stud-class-set">
<div className="clearfix edu-back-white"> <div className="clearfix edu-back-white">

@ -159,7 +159,7 @@ class Testpapersettinghomepage extends Component{
return( return(
<div className="newMain clearfix "> <div className="newMain clearfix ">
<div className={"educontent mb20"}> <div className={"educontent mb20"} style={{width:"1250px"}}>
{/* 公用的提示弹框 */} {/* 公用的提示弹框 */}
{this.state.Modalstype===true?<Modals {this.state.Modalstype===true?<Modals
modalsType={this.state.Modalstype} modalsType={this.state.Modalstype}
@ -177,7 +177,7 @@ class Testpapersettinghomepage extends Component{
callback={this.callback} callback={this.callback}
/>:""} />:""}
<div className="educontent mb20"> <div className="educontent mb20" style={{width:"1250px"}}>
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn> <ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
@ -195,7 +195,7 @@ class Testpapersettinghomepage extends Component{
`} `}
</style> </style>
<div className="educontent"> <div className="educontent" style={{width:"1250px"}}>
<p className=" fl color-black summaryname "> <p className=" fl color-black summaryname ">
{Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name} {Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name}
</p> </p>

@ -189,8 +189,9 @@ class SingleEditor extends Component{
<div> <div>
<RadioGroup onChange={this.onOptionClick} value={standard_answers[0]}> <RadioGroup onChange={this.onOptionClick} value={standard_answers[0]}>
<Radio value={true} disabled={exerciseIsPublish}></Radio> {/* disabled={exerciseIsPublish} */}
<Radio value={false} disabled={exerciseIsPublish}></Radio> <Radio value={true} ></Radio>
<Radio value={false} ></Radio>
</RadioGroup> </RadioGroup>
{/* not work */} {/* not work */}
{/* <Radio value={standard_answers[0]} onClick={() => this.onOptionClick(0)} disabled={exerciseIsPublish}></Radio> {/* <Radio value={standard_answers[0]} onClick={() => this.onOptionClick(0)} disabled={exerciseIsPublish}></Radio>

@ -165,9 +165,9 @@ class SingleEditor extends Component{
} }
onOptionClick = (index) => { onOptionClick = (index) => {
if (this.props.exerciseIsPublish) { // if (this.props.exerciseIsPublish) {
return; // return;
} // }
let standard_answers = this.state.standard_answers.slice(0) let standard_answers = this.state.standard_answers.slice(0)
standard_answers[index] = !standard_answers[index] standard_answers[index] = !standard_answers[index]
this.setState({ standard_answers }) this.setState({ standard_answers })
@ -247,7 +247,7 @@ class SingleEditor extends Component{
{/* <Tooltip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'}> */} {/* <Tooltip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'}> */}
<span class={`option-item fr mr10 color-grey select-choice ${bg} `} <span class={`option-item fr mr10 color-grey select-choice ${bg} `}
name="option_span" onClick={() => this.onOptionClick(index)} style={{flex: '0 0 38px'}}> name="option_span" onClick={() => this.onOptionClick(index)} style={{flex: '0 0 38px'}}>
<ConditionToolTip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'} placement="left" condition={!exerciseIsPublish}> <ConditionToolTip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'} placement="left" condition={true}>
<div style={{width: '100%', height: '100%'}}>{tagArray[index]}</div> <div style={{width: '100%', height: '100%'}}>{tagArray[index]}</div>
</ConditionToolTip> </ConditionToolTip>
</span> </span>

@ -14,23 +14,32 @@ class ShixunWorkModal extends Component{
} }
} }
componentDidMount() { componentDidMount() {
let {group_list}=this.state;
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json"; let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
axios.get(url,{params:{ axios.get(url,{params:{
limit:10, limit:10,
page:1, page:1,
} }
}).then((response) => { }).then((response) => {
console.log(response);
if(response.data.group_list===undefined){ if(response.data.group_list===undefined){
this.setState({ this.setState({
course_groups:response.data, course_groups:response.data,
group_list:undefined group_list:undefined
}) })
}else{ }else{
let newgroup_list=group_list;
response.data.group_list.map((item,key)=>{
newgroup_list.push(item)
console.log(item);
})
response.data.ungroup_list.map((items,keys)=>{
newgroup_list.push(item)
console.log(item);
})
this.setState({ this.setState({
course_groups:response.data, course_groups:response.data,
group_list:response.data.group_list group_list:newgroup_list,
}) })
} }
@ -44,6 +53,7 @@ class ShixunWorkModal extends Component{
//勾选实训 //勾选实训
shixunhomeworkedit=(checkedValues)=>{ shixunhomeworkedit=(checkedValues)=>{
let{group_list}=this.state; let{group_list}=this.state;
if(checkedValues.length===group_list.length){ if(checkedValues.length===group_list.length){
this.setState({ this.setState({
onChangetype:true, onChangetype:true,
@ -71,10 +81,10 @@ class ShixunWorkModal extends Component{
page:newpage, page:newpage,
} }
}).then((response) => { }).then((response) => {
response.data. course_groups.group_list&&response.data.group_list.map((item,key)=>{ response.data.group_list&&response.data.group_list.map((item,key)=>{
newgroup_list.push(item) newgroup_list.push(item)
}) })
response.data. course_groups.ungroup_list&&response.data.ungroup_list.map((items,keys)=>{ response.data.ungroup_list&&response.data.ungroup_list.map((items,keys)=>{
newgroup_list.push(items) newgroup_list.push(items)
}) })
this.setState({ this.setState({

Loading…
Cancel
Save