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

dev_jupyter
杨树林 5 years ago
commit 62f7e17800

@ -530,20 +530,22 @@ class Coursesleftnav extends Component{
{name:value}).then((result)=>{ {name:value}).then((result)=>{
if(result!=undefined){ if(result!=undefined){
if(result.data.status===0){ if(result.data.status===0){
// window.location.reload()
// this.updasaveNavmoda()
//
notification.open({ notification.open({
message:"提示", message:"提示",
description:result.data.message description:result.data.message
}); });
trigger('updateNavSuccess')
if(positiontype==="files"){ if(positiontype==="files"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`; window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`;
} }
if(positiontype==="boards"){ if(positiontype==="boards"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`; window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`;
} }

@ -188,7 +188,7 @@ class ExerciseListItem extends Component{
{ IsAdmin &&<div className="homepagePostSetting" style={{"right":"-17px","top":"51px","display":"block","width":"200px"}}> { IsAdmin &&<div className="homepagePostSetting" style={{"right":"-17px","top":"46px","display":"block","width":"200px"}}>
<a className="btn colorblue font-16 ml20" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a> <a className="btn colorblue font-16 ml20" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a>
<Link className="btn colorblue font-16 ml20" to={`/courses/${coursesId}/exercises/${item.id}/edit`}>编辑</Link> <Link className="btn colorblue font-16 ml20" to={`/courses/${coursesId}/exercises/${item.id}/edit`}>编辑</Link>
<Link className="btn colorblue ml20 font-16" to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`}>设置</Link> <Link className="btn colorblue ml20 font-16" to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`}>设置</Link>
@ -215,18 +215,18 @@ class ExerciseListItem extends Component{
{ {
IsStudent && IsStudent &&
<div className="homepagePostSetting" style={{"right":"0px","top":"62px","position":"absolute","display":"block"}}> <div className="homepagePostSetting" style={{"right":"0px","top":"46px","position":"absolute","display":"block"}}>
<li className={"fl"}> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li> <li className={"fl"}> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li>
{item.current_status ===0&&item.exercise_status>1? <li className={"fl ml20"}> <Link className="btn colorblue font-16" to={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>继续答题</Link></li>: {item.current_status ===0&&item.exercise_status>1? <li className={"fl ml20"}> <Link className="btn colorblue font-16" to={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>继续答题</Link></li>:
item.current_status ===1&&item.exercise_status>1? <li className={"fl ml20"}> <a className="btn colorblue font-16" target="_blank" href={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>查看答题</a></li>: item.current_status ===1&&item.exercise_status>1? <li className={"fl ml20"}> <a className="btn colorblue font-16" target="_blank" href={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>查看答题</a></li>:
item.current_status ===2&&item.exercise_status>1? <li className={"fl ml20"}s> <a className="btn colorblue ml20 font-16" onClick={()=>this.setgameexercise(`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`)}>开始答题</a></li>:""} item.current_status ===2&&item.exercise_status>1? <li className={"fl ml20"}s> <a className="btn colorblue font-16" onClick={()=>this.setgameexercise(`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`)}>开始答题</a></li>:""}
</div> </div>
} }
{ {
this.props.isNotMember()? item.lock_status === 0 ? this.props.isNotMember()? item.lock_status === 0 ?
"" ""
: <div className="homepagePostSetting" style={{"right":"0px","top":"62px","position":"absolute","display":"block"}}> : <div className="homepagePostSetting" style={{"right":"0px","top":"42px","position":"absolute","display":"block"}}>
<li> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li> <li> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li>
</div>:"" </div>:""
} }

@ -131,8 +131,11 @@ class Exercisesetting extends Component{
// } // }
// 已有设置数据的查询 // 已有设置数据的查询
getSettingInfo=()=>{ getSettingInfo=(type)=>{
this.props.Commonheadofthetestpapers() if(type!=1){
this.props.Commonheadofthetestpapers()
}
let Id=this.props.match.params.Id; let Id=this.props.match.params.Id;
let url=`/exercises/${Id}/exercise_setting.json`; let url=`/exercises/${Id}/exercise_setting.json`;
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
@ -241,10 +244,10 @@ class Exercisesetting extends Component{
let{unified_setting}=this.state let{unified_setting}=this.state
if(unified_setting==true){ if(unified_setting==true){
console.log("统一设置"); console.log("统一设置");
this.UnifiedSetting(); this.UnifiedSetting( );
}else{ }else{
console.log("非统一设置"); console.log("非统一设置");
this.NotUnifiedSetting(); this.NotUnifiedSetting( );
} }
} }
}) })
@ -347,7 +350,7 @@ class Exercisesetting extends Component{
console.log(result) console.log(result)
if(result.status==200){ if(result.status==200){
this.props.showNotification(`${result.data.message}`); this.props.showNotification(`${result.data.message}`);
this.getSettingInfo(); this.getSettingInfo(1);
this.cancelEdit(); this.cancelEdit();
} }
}) })
@ -367,7 +370,7 @@ class Exercisesetting extends Component{
if(result.status==200){ if(result.status==200){
this.props.showNotification(`${result.data.message}`); this.props.showNotification(`${result.data.message}`);
this.cancelEdit(); this.cancelEdit();
this.getSettingInfo(); this.getSettingInfo(1);
} }
}); });
@ -559,7 +562,7 @@ class Exercisesetting extends Component{
} }
//取消编辑 //取消编辑
cancelEdit=()=>{ cancelEdit=()=>{
this.getSettingInfo(); this.getSettingInfo(1);
this.setState({ this.setState({
flagPageEdit:false flagPageEdit:false
}) })

@ -51,6 +51,7 @@ class GraduationTaskssettinglist extends Component{
visibles:false, visibles:false,
DownloadType:false, DownloadType:false,
DownloadMessageval:undefined, DownloadMessageval:undefined,
commentstate:null
} }
} }
@ -88,13 +89,13 @@ class GraduationTaskssettinglist extends Component{
course_groupslist:[], course_groupslist:[],
checkAllValue:false checkAllValue:false
}) })
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state; let {commentstate, task_status, course_group, cross_comment, order, b_order, search} = this.state;
this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(commentstate, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search) this.props.getsonar(commentstate, task_status, course_group, cross_comment, search)
} }
seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{ seacthdata=(commentstate,task_status,course_group,cross_comment,order,b_order,search,pages)=>{
let{page,limit}=this.state; let{page,limit}=this.state;
// console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search) // console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search)
@ -104,7 +105,7 @@ class GraduationTaskssettinglist extends Component{
//get 数组 //get 数组
axios.get(url,{ axios.get(url,{
params: { params: {
teacher_comment:teacher_comment===null?undefined:teacher_comment, teacher_comment:commentstate===null||commentstate===undefined?undefined:commentstate,
task_status:task_status===null?undefined:task_status, task_status:task_status===null?undefined:task_status,
course_group:course_group===null?undefined:course_group, course_group:course_group===null?undefined:course_group,
cross_comment:cross_comment===null?undefined:cross_comment, cross_comment:cross_comment===null?undefined:cross_comment,
@ -229,7 +230,8 @@ class GraduationTaskssettinglist extends Component{
} }
funteachercomment=(list,key)=> { funteachercomment=(list,key)=> {
// console.log(e.target.value)
let asum=undefined
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state; let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state;
if(this.state.teacher_comment!=null&&list.length>0){ if(this.state.teacher_comment!=null&&list.length>0){
if(this.state.teacher_comment.length>0){ if(this.state.teacher_comment.length>0){
@ -247,19 +249,29 @@ class GraduationTaskssettinglist extends Component{
if(listype===false){ if(listype===false){
this.setState({ this.setState({
teacher_comment:null, teacher_comment:null,
loadingstate:true loadingstate:true,
commentstate:null
}) })
}else{ }else{
if(list.length>0){
list.map((item,key)=>{
if(key===0){
asum=item;
}
})
}else{
asum=undefined
}
this.setState({ this.setState({
teacher_comment:list, teacher_comment:list,
loadingstate:true loadingstate:true,
commentstate:asum,
}) })
} }
this.seacthdata(asum, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
let newvalue=list.length===0?undefined:parseInt(list[0]) this.props.getsonar(asum, task_status, course_group, cross_comment, search)
this.seacthdata(newvalue, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(newvalue, task_status, course_group, cross_comment, search)
// if(list.length===key){ // if(list.length===key){
// this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page); // this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
// this.props.getsonar(undefined, task_status, course_group, cross_comment, search) // this.props.getsonar(undefined, task_status, course_group, cross_comment, search)
@ -275,14 +287,14 @@ class GraduationTaskssettinglist extends Component{
funcross_comment=(e)=>{ funcross_comment=(e)=>{
let {teacher_comment, task_status, course_group, order, b_order, search} = this.state; let {teacher_comment, task_status, course_group, order, b_order, search,commentstate} = this.state;
this.setState({ this.setState({
cross_comment:e.target.value===undefined||e.target.value===false?null:e.target.value, cross_comment:e.target.value===undefined||e.target.value===false?null:e.target.value,
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, order, b_order, search,this.state.page); this.seacthdata(commentstate, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, search) this.props.getsonar(commentstate, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, search)
} }
inputSearchValue=(e)=>{ inputSearchValue=(e)=>{
@ -302,24 +314,24 @@ class GraduationTaskssettinglist extends Component{
searchValue=()=>{ searchValue=()=>{
let {teacher_comment, task_status, course_group, cross_comment, order, b_order,search} = this.state; let {teacher_comment, task_status, course_group, cross_comment, order, b_order,search,commentstate} = this.state;
this.setState({ this.setState({
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(commentstate, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search) this.props.getsonar(commentstate, task_status, course_group, cross_comment, search)
} }
funorder = (value, newb_order) => { funorder = (value, newb_order) => {
let {teacher_comment, task_status, course_group, cross_comment, b_order, search,order} = this.state; let {teacher_comment, task_status, course_group, cross_comment, b_order, search,commentstate} = this.state;
this.setState({ this.setState({
order: value, order: value,
b_order: newb_order, b_order: newb_order,
loadingstate: true loadingstate: true
}) })
this.seacthdata(teacher_comment, task_status, course_group, cross_comment, value, newb_order, search,this.state.page); this.seacthdata(commentstate, task_status, course_group, cross_comment, value, newb_order, search,this.state.page);
this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search) this.props.getsonar(commentstate, task_status, course_group, cross_comment, search)
} }
@ -327,7 +339,7 @@ class GraduationTaskssettinglist extends Component{
funtaskstatus=(checkedValues,key)=>{ funtaskstatus=(checkedValues,key)=>{
// console.log(checkedValues) // console.log(checkedValues)
let {teacher_comment, course_group, cross_comment, order, b_order, search} = this.state; let {teacher_comment, course_group, cross_comment, order, b_order, search,commentstate} = this.state;
@ -339,8 +351,8 @@ class GraduationTaskssettinglist extends Component{
task_status:undefined, task_status:undefined,
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, null, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(commentstate, null, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, null, course_group, cross_comment, search) this.props.getsonar(commentstate, null, course_group, cross_comment, search)
} }
// else if(checkedValues.length ===key){ // else if(checkedValues.length ===key){
// // 全部抖选中 自然就是查找全部 就是空 // // 全部抖选中 自然就是查找全部 就是空
@ -356,8 +368,8 @@ class GraduationTaskssettinglist extends Component{
task_status:checkedValues===key?null:checkedValues, task_status:checkedValues===key?null:checkedValues,
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(commentstate, checkedValues===key?undefined:checkedValues, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, search) this.props.getsonar(commentstate, checkedValues===key?undefined:checkedValues, course_group, cross_comment, search)
} }
@ -366,7 +378,7 @@ class GraduationTaskssettinglist extends Component{
// console.log(checkedValues); // console.log(checkedValues);
// console.log(key); // console.log(key);
let {teacher_comment, task_status, cross_comment, order,b_order, search} = this.state; let {teacher_comment, task_status, cross_comment, order,b_order, search,commentstate} = this.state;
if(JSON.stringify(checkedValues) === "[]"){ if(JSON.stringify(checkedValues) === "[]"){
// console.log(checkedValues); // console.log(checkedValues);
@ -375,8 +387,8 @@ class GraduationTaskssettinglist extends Component{
course_group:undefined, course_group:undefined,
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, task_status, null, cross_comment, order, b_order, search,this.state.page); this.seacthdata(commentstate, task_status, null, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment,task_status, null, cross_comment, search) this.props.getsonar(commentstate,task_status, null, cross_comment, search)
} }
// else if(checkedValues.length ===key){ // else if(checkedValues.length ===key){
// // 全部抖选中 自然就是查找全部 就是空 // // 全部抖选中 自然就是查找全部 就是空
@ -393,8 +405,8 @@ class GraduationTaskssettinglist extends Component{
course_group:checkedValues===key?null:checkedValues, course_group:checkedValues===key?null:checkedValues,
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, task_status, checkedValues===key?undefined:checkedValues, cross_comment, order, b_order, search,this.state.page); this.seacthdata(commentstate, task_status, checkedValues===key?undefined:checkedValues, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment,task_status, checkedValues===key?undefined:checkedValues, cross_comment, search) this.props.getsonar(commentstate,task_status, checkedValues===key?undefined:checkedValues, cross_comment, search)
} }
@ -575,7 +587,7 @@ class GraduationTaskssettinglist extends Component{
saveModulationModal=(value,num)=>{ saveModulationModal=(value,num)=>{
let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state; let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search,commentstate}=this.state;
let {operationId}=this.state; let {operationId}=this.state;
// console.log(value,num) // console.log(value,num)
@ -586,8 +598,8 @@ class GraduationTaskssettinglist extends Component{
}).then((result)=>{ }).then((result)=>{
// console.log(result) // console.log(result)
if(result.data.status===0){ if(result.data.status===0){
this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page); this.seacthdata(commentstate,task_status,course_group,cross_comment,order,b_order,search,this.state.page);
this.props.getsonar(teacher_comment,task_status, course_group, cross_comment, search) this.props.getsonar(commentstate,task_status, course_group, cross_comment, search)
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
this.cancelmodel(); this.cancelmodel();
this.setState({ this.setState({
@ -703,18 +715,18 @@ class GraduationTaskssettinglist extends Component{
this.setState({ this.setState({
page: pageNumber, page: pageNumber,
}) })
let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state; let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search,commentstate}=this.state;
this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pageNumber); this.seacthdata(commentstate,task_status,course_group,cross_comment,order,b_order,search,pageNumber);
this.props.getsonar(teacher_comment,task_status, course_group, cross_comment, search) this.props.getsonar(commentstate,task_status, course_group, cross_comment, search)
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state; let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,commentstate} =this.state;
let params ={ let params ={
teacher_comment:teacher_comment, teacher_comment:commentstate,
task_status:task_status, task_status:task_status,
course_group:course_group, course_group:course_group,
cross_comment:cross_comment, cross_comment:cross_comment,
@ -764,8 +776,8 @@ class GraduationTaskssettinglist extends Component{
} }
render(){ render(){
let {coursename,coursesearch,taskname,taskid,taskslistdata,data,page,limit,teacher_comment,task_status,cross_comment,search,loadingstate, let { taskslistdata,data,page,limit,teacher_comment,task_status,cross_comment,search,loadingstate,
order, course_group,Modalstype,Modalstopval,ModalCancel,ModalSave,modalname,Modulationtype,operationId,Allocationtype,visibles, course_group,Modalstype,Modalstopval,ModalCancel,ModalSave,modalname,Modulationtype,Allocationtype,visibles,
visible, visible,
Topval, Topval,
Topvalright, Topvalright,

@ -555,11 +555,7 @@ class Trainingjobsetting extends Component {
}) })
if(result.validate==false){ if(result.validate==false){
this.scrollToAnchor("publishtimeid"); this.scrollToAnchor("publishtimeid");
this.props.showNotification(`分班发布设置不能为空`);
return false; return false;
} }
let rulesdata = this.state.rulesdata; let rulesdata = this.state.rulesdata;

Loading…
Cancel
Save