Merge remote-tracking branch 'origin/master'

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

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

@ -159,7 +159,7 @@ class Testpapersettinghomepage extends Component{
return(
<div className="newMain clearfix ">
<div className={"educontent mb20"}>
<div className={"educontent mb20"} style={{width:"1250px"}}>
{/* 公用的提示弹框 */}
{this.state.Modalstype===true?<Modals
modalsType={this.state.Modalstype}
@ -177,7 +177,7 @@ class Testpapersettinghomepage extends Component{
callback={this.callback}
/>:""}
<div className="educontent mb20">
<div className="educontent mb20" style={{width:"1250px"}}>
<p className="clearfix mb20 mt10">
<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>
@ -195,7 +195,7 @@ class Testpapersettinghomepage extends Component{
`}
</style>
<div className="educontent">
<div className="educontent" style={{width:"1250px"}}>
<p className=" fl color-black summaryname ">
{Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name}
</p>

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

@ -165,9 +165,9 @@ class SingleEditor extends Component{
}
onOptionClick = (index) => {
if (this.props.exerciseIsPublish) {
return;
}
// if (this.props.exerciseIsPublish) {
// return;
// }
let standard_answers = this.state.standard_answers.slice(0)
standard_answers[index] = !standard_answers[index]
this.setState({ standard_answers })
@ -247,7 +247,7 @@ class SingleEditor extends Component{
{/* <Tooltip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'}> */}
<span class={`option-item fr mr10 color-grey select-choice ${bg} `}
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>
</ConditionToolTip>
</span>

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

Loading…
Cancel
Save