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)=>{
if(result!=undefined){
if(result.data.status===0){
// window.location.reload()
// this.updasaveNavmoda()
//
notification.open({
message:"提示",
description:result.data.message
});
trigger('updateNavSuccess')
if(positiontype==="files"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`;
}
if(positiontype==="boards"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
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>
<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>
@ -215,18 +215,18 @@ class ExerciseListItem extends Component{
{
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>
{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 ===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>
}
{
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>
</div>:""
}

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

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

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

Loading…
Cancel
Save