Merge branch 'dev_aliyun_beta' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun_beta

dev_aliyun_beta
杨树林 5 years ago
commit c2b7bbe229

@ -177,6 +177,7 @@ class CommonWorkItem extends Component{
} */}
</p>
<p className="color-grey-9 clearfix">
{ item.author && <span className="mr20 fl">{item.author}</span> }
{item.commit_count===undefined?"":<span className="mr20 fl">{item.commit_count} 已交</span>}
{item.uncommit_count===undefined?"":<span className="mr20 fl">{item.uncommit_count} 未交</span>}
{

@ -134,6 +134,7 @@ class ExerciseListItem extends Component{
{/*</li>*/}
</p>
<p className="color-grey-9 clearfix">
{ item.author && <span className="mr20 fl">{item.author}</span> }
{item.exercise_status===1?"":<span className="mr20 fl">{item.exercise_answer} 已答</span>}
{item.exercise_status===1?"":<span className="mr20 fl">{item.exercise_unanswer} 未答</span>}
{item.unreview_count===null||item.exercise_status===1?"":<span className="mr20 fl">{item.unreview_count} 未评数</span> }

@ -553,6 +553,9 @@ class ExerciseReviewAndAnswer extends Component{
height:16px;
margin-top:2px;
}
.standardAnswer.editormd-html-preview,.answerStyle.editormd-html-preview{
width:100%!important
}
`}</style>
{/*<p style={{height:"60px"}}></p>*/}
<Modals
@ -716,7 +719,7 @@ class ExerciseReviewAndAnswer extends Component{
<span className="fr">
{
// 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮
isAdmin && ((parseInt(item.answer_status) == 1 && item.question_type == 4) || item.question_type == 3) ?
isAdmin && ((parseInt(item.answer_status) != 0 && item.question_type == 4) || item.question_type == 3) ?
<WordsBtn style="blue" className="mr20 font-16 fl" onClick={()=>this.showSetScore(key,item.setScore,item.q_position+"_"+item.question_type)}>调分</WordsBtn>:""
}
{
@ -724,11 +727,17 @@ class ExerciseReviewAndAnswer extends Component{
isAdmin && parseInt(item.answer_status) == 0 && item.question_type == 4 ?
<span className="color-red fl mr20">未批</span>:""
}
{
// 客观题:老师||学生(试卷已截止且答案公开)显示正确答案
item.question_type < 3 && item.standard_answer_show ?
<span className="font-16 ml20">
正确答案{ item.standard_answer_show }
</span>:""
}
{
//(老师身份且除实训题外) || (学生身份且试卷已经截止)就显示用户当前题目所得分数
( isAdmin || (isStudent && exercise.exercise_status == 3)) && item.question_type != 5 && item.user_score ?
<span className="font-16 ml20">
<i className={parseInt(item.answer_status) ==0 ? "iconfont icon-htmal5icon19 color-red font-20 fl":parseInt(item.answer_status) ==1 ? "fl iconfont icon-wancheng font-20 color-green" :"iconfont icon-htmal5icon19 color-orange-tip font-20 fl"}></i>
<span><span className={parseInt(item.answer_status) == 0 ?"color-red":parseInt(item.answer_status) == 1 ?"color-green":"color-orange-tip"}>{item.user_score}</span> </span>
</span> : ""
}

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

@ -108,7 +108,7 @@ class fillEmpty extends Component{
array.map((item,key)=>{
return(
<li className="df mb10 emptyPanel">
<span className="mr10 lineh-35 font-16">答案(填空{key+1})</span>
<span className="mr10 lineh-35 font-16">答案填空{key+1}:</span>
<div className="flex1" style={{width:"0"}}>
{
user_exercise_status == 1 ?
@ -135,7 +135,7 @@ class fillEmpty extends Component{
{ questionType.standard_answer && questionType.standard_answer.map((item,k)=>{
return(
<ul className="df font-16">
<span className="mr10">填空{k+1}:</span>
<span className="mr10">答案填空{k+1}:</span>
<li className="flex1">
{
item.answer_text && item.answer_text.map((i,index)=>{

@ -103,11 +103,11 @@ class Poll extends Component{
this.InitList(e.key,StudentList_value,page);
}
// 获取列表数据
InitList=(type,search,page)=>{
InitList=(type,search,page,bank_checkValue)=>{
this.setState({
isSpin:true
})
let {pageSize}=this.state
let { pageSize,checkBoxValues }=this.state
let coursesId=this.props.match.params.coursesId;
let url='/courses/'+coursesId+'/polls.json?limit='+pageSize+'&page='+page
if(type!="0"){
@ -123,7 +123,7 @@ class Poll extends Component{
course_types:result.data.course_types,
polls_counts:result.data.polls_counts,
isSpin:false,
checkBoxValues:[]
checkBoxValues: bank_checkValue ? bank_checkValue : []
})
}
}).catch((error)=>{
@ -209,12 +209,6 @@ class Poll extends Component{
//判断是否有选中数据
if(this.state.checkBoxValues.length==0){
this.props.showNotification("请先在列表中选择数据");
// this.setState({
// modalsType:true,
// modalsTopval:"请先在列表中选择数据",
// modalsBottomval:'',
// loadtype:true
// })
}else{
if(value != "bank"){
this.setState({
@ -325,15 +319,13 @@ class Poll extends Component{
}
// 题库选用成功后,立即发布,刷新页面
useBankSuccess=(checkValue,value)=>{
debugger;
this.setState({
isSpin:true
})
let{type,StudentList_value,page}=this.state
this.InitList(type,StudentList_value,page);
this.InitList(type,StudentList_value,page,value);
this.setState({
checkBoxValues:[]
})
let coursesId=this.props.match.params.coursesId;
let url=`/courses/${coursesId}/polls/publish_modal.json`;
axios.get(url,{
@ -351,10 +343,6 @@ class Poll extends Component{
})
}
}
this.setState({
course_groups:list,
checkBoxValues:value
})
this.setState({
modalname:"立即发布",
modaltype:response.data.un_publish > 0 ? 1 : 2,
@ -369,6 +357,8 @@ class Poll extends Component{
Savesname:"立即发布",
Cancel:this.homeworkhide,
Saves:this.homeworkstartend,
course_groups:list,
checkBoxValues:value
})
}
}).catch((error) => {
@ -425,7 +415,7 @@ class Poll extends Component{
addname:undefined,
addnametype:false,
addnametab:undefined,
checkBoxValues:[]
// checkBoxValues:[]
})
}

@ -54,6 +54,7 @@ class PollListItem extends Component{
}
</p>
<p className="color-grey-9 clearfix">
{ item.author && <span className="mr20 fl">{item.author}</span> }
{
item.polls_status !=1 &&
<span className="fl mt3">

@ -333,7 +333,7 @@ class ShixunhomeWorkItem extends Component{
<p className="color-grey panel-lightgrey mt16 fl">
<span className="mr50">
{/* <a href="/users/innov" className="panel-name-small hide fl mr15 mr30 color-grey3">{discussMessage.author.name}</a> */}
{ discussMessage.author && <span className="mr15 color-grey-3">{discussMessage.author}</span> }
{discussMessage.commit_count===undefined?"":<span className="mr15 color-grey9">{discussMessage.commit_count} 已交</span>}
{discussMessage.uncommit_count===undefined?"":<span className="mr15 color-grey9">{discussMessage.uncommit_count} 未交</span>}
{/*<span className="mr15 color-grey9">{discussMessage.replies_count} 3 未评</span>*/}

Loading…
Cancel
Save