dev_ec
hjm 5 years ago
commit 96c7a94c3d

@ -22,9 +22,9 @@ $.fn.bootstrapViewer = function (options) {
' <div class="modal-dialog modal-lg" style="display: inline-block; width: auto;">\n' +
' <div class="modal-content">\n' +
' <img' +
'\t\t\t class="carousel-inner img-responsive img-rounded img-viewer" \n' +
'\t\t\t onclick="$(\'#bootstrapViewer\').modal(\'hide\');setTimeout(function(){$(\'#bootstrapViewer\').remove();},200);"\n' +
'\t\t\t onmouseover="this.style.cursor=\'zoom-out\';" \n' +
'\t\t\t class="carousel-inner img-responsive img-rounded img-viewer" draggable="false"\n' +
'\t\t\t onclick="/*$(\'#bootstrapViewer\').modal(\'hide\');setTimeout(function(){$(\'#bootstrapViewer\').remove();},200);*/"\n' +
'\t\t\t onmouseover="this.style.cursor=\'move\';" \n' +
'\t\t\t onmouseout="this.style.cursor=\'default\'" \n' +
'\t\t\t />\n' +
' </div>\n' +
@ -37,13 +37,41 @@ $.fn.bootstrapViewer = function (options) {
} else {
throw "图片不存在"
}
$('#bootstrapViewer').on('hidden.bs.modal', function(){
$('#bootstrapViewer').remove();
});
var $moveDiv = $('#bootstrapViewer .modal-dialog');
var isMove = false;
var div_x = $moveDiv.offset().left;
var div_y = $moveDiv.offset().top;
var mousedownFunc = function (e) {
if (isMove) {
var left = e.pageX - div_x;
var top = e.pageY - div_y;
if(left < 0){ left = 0}
if(top < 0){ top = 0}
$moveDiv.css({"left": left, "top":top});
}
}
$moveDiv.mousedown(function (e) {
$moveDiv.css({ left: $moveDiv[0].offsetLeft, top: $moveDiv[0].offsetTop, marginTop: 0, position: 'absolute' });
isMove = true;
div_x = e.pageX - $moveDiv.offset().left;
div_y = e.pageY - $moveDiv.offset().top;
$(document).mousemove(mousedownFunc);
}).mouseup(function () {
isMove = false;
$(document).unbind('mousemove', mousedownFunc);
});
})
$(this).on('mouseover', function () {
$(this).css('cursor', 'zoom-in');
})
}
$.fn.bootstrapViewer.defaults = {
src: 'src'

@ -1,4 +1,4 @@
class ReachCriteriaController < Ecs::BaseController
class Ecs::ReachCriteriaController < Ecs::BaseController
before_action :check_major_manager_permission!, only: [:create]
def create

@ -1,7 +1,7 @@
class Ecs::ReachEvaluationsController < Ecs::BaseController
def show
preload = { ec_graduation_subitems: { ec_course_support: [:ec_course, :ec_graduation_requirement_calculation] } }
preload = { ec_graduation_subitems: { ec_course_supports: [:ec_course, :ec_graduation_requirement_calculation] } }
@graduation_requirements = current_year.ec_graduation_requirements.includes(preload)
respond_to do |format|

File diff suppressed because one or more lines are too long

@ -27586,9 +27586,9 @@ $.fn.bootstrapViewer = function (options) {
' <div class="modal-dialog modal-lg" style="display: inline-block; width: auto;">\n' +
' <div class="modal-content">\n' +
' <img' +
'\t\t\t class="carousel-inner img-responsive img-rounded img-viewer" \n' +
'\t\t\t onclick="$(\'#bootstrapViewer\').modal(\'hide\');setTimeout(function(){$(\'#bootstrapViewer\').remove();},200);"\n' +
'\t\t\t onmouseover="this.style.cursor=\'zoom-out\';" \n' +
'\t\t\t class="carousel-inner img-responsive img-rounded img-viewer" draggable="false"\n' +
'\t\t\t onclick="/*$(\'#bootstrapViewer\').modal(\'hide\');setTimeout(function(){$(\'#bootstrapViewer\').remove();},200);*/"\n' +
'\t\t\t onmouseover="this.style.cursor=\'move\';" \n' +
'\t\t\t onmouseout="this.style.cursor=\'default\'" \n' +
'\t\t\t />\n' +
' </div>\n' +
@ -27601,13 +27601,41 @@ $.fn.bootstrapViewer = function (options) {
} else {
throw "图片不存在"
}
$('#bootstrapViewer').on('hidden.bs.modal', function(){
$('#bootstrapViewer').remove();
});
var $moveDiv = $('#bootstrapViewer .modal-dialog');
var isMove = false;
var div_x = $moveDiv.offset().left;
var div_y = $moveDiv.offset().top;
var mousedownFunc = function (e) {
if (isMove) {
var left = e.pageX - div_x;
var top = e.pageY - div_y;
if(left < 0){ left = 0}
if(top < 0){ top = 0}
$moveDiv.css({"left": left, "top":top});
}
}
$moveDiv.mousedown(function (e) {
$moveDiv.css({ left: $moveDiv[0].offsetLeft, top: $moveDiv[0].offsetTop, marginTop: 0, position: 'absolute' });
isMove = true;
div_x = e.pageX - $moveDiv.offset().left;
div_y = e.pageY - $moveDiv.offset().top;
$(document).mousemove(mousedownFunc);
}).mouseup(function () {
isMove = false;
$(document).unbind('mousemove', mousedownFunc);
});
})
$(this).on('mouseover', function () {
$(this).css('cursor', 'zoom-in');
})
}
$.fn.bootstrapViewer.defaults = {
src: 'src'

@ -113,13 +113,13 @@
}
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus()
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus()
return false;
}]
}

@ -3,13 +3,12 @@
<head>
<meta charset="utf-8">
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />-->
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<!-- width=device-width, initial-scale=1 , shrink-to-fit=no -->
<!-- <meta name="viewport" content=""> -->
<meta name="theme-color" content="#000000">
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--

File diff suppressed because one or more lines are too long

@ -83,9 +83,9 @@ export function initAxiosInterceptors(props) {
}
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`
config.url = `${config.url}?debug=${'admin'}`
} else {
config.url = `${config.url}&debug=${debugType}`
config.url = `${config.url}&debug=${'admin'}`
}
} else {
// 加api前缀

@ -299,7 +299,6 @@ class CoursesIndex extends Component{
this.historyArray = [window.location.pathname];
this.props.history.listen( location => {
console.log(location);
this.historyArray.unshift(window.location.pathname);
this.historyArray.length = 2;
//Do your stuff here

@ -28,6 +28,21 @@ class Fileslistitem extends Component{
}
showfiles=(list)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
if(list.is_history_file===false){
// this.props.DownloadFileA(list.title,list.url)
//window.location.href=list.url;
@ -217,7 +232,9 @@ class Fileslistitem extends Component{
{
this.props.isNotMember===true?
discussMessage.is_lock === true ?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</span>
<Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.title}</span>
</Tooltip>
:<a
onClick={()=>this.showfiles(discussMessage)}
title={discussMessage.title}

@ -113,6 +113,9 @@ class Fileslists extends Component{
updadatalist=(id)=>{
// this.seactall(id)
if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user.login=== null||this.props.user&&this.props.user.login=== undefined){
}else{
let coursesId=this.props.match.params.coursesId;
let url="/courses/"+coursesId+"/attahcment_category_list.json";
axios.get(url, {
@ -139,6 +142,8 @@ class Fileslists extends Component{
})
}
}
updatafiled=()=>{
if(this.props.match.params.main_id){
this.seactall();

@ -10,6 +10,21 @@ class BoardsListItem extends Component{
}
}
onTitleClick = (discussMessage) => {
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
const isAdminOrStudent = this.props.isAdminOrStudent();
if (!isAdminOrStudent && discussMessage.is_public == false) {
// 没有权限访问
@ -47,15 +62,16 @@ class BoardsListItem extends Component{
</a>
<div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}>
<h6>
<a href="javascript:void(0)" className="panel-list-title hide fl mt5 color-dark font-bd"
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'default' : 'poninter'), maxWidth: '700px' }}
<Tooltip title={canNotLink?"私有属性,非课堂成员不能访问":`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`} placement="bottom">
<a className="panel-list-title hide fl mt5 color-dark font-bd pointer"
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'poninter' : 'poninter'), maxWidth: '700px' }}
onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)}
title={`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`}
>{discussMessage.subject}</a>
</Tooltip>
{ !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> }
{
discussMessage.is_public == false ? (<Tooltip title={`${isAdminOrStudent ? '私有属性' : '私有属性,非课堂成员不能访问'}`}>
discussMessage.is_public == false ? (<Tooltip title={`${isAdminOrStudent ? '私有属性' : '私有属性,非课堂成员不能访问'}`} placement="bottom">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i>
</Tooltip>) : ""
}

@ -16,6 +16,22 @@ class CommonWorkItem extends Component{
}
}
onItemClick = (item) => {
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
const isStudent = this.props.isStudent()
if (isStudent) {
this.props.toWorkQuestionPage(this.props.match.params, item.homework_id)
@ -144,15 +160,15 @@ class CommonWorkItem extends Component{
}
<div className="flex1" onClick={() => this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>
<p className="clearfix mb20">
<a title={item.name}
className="fl font-16 font-bd mt2 comnonwidth580" style={{cursor: canNotLink ? 'default' : 'poninter'}}
<Tooltip title={ canNotLink ? "私有属性,非课堂成员不能访问" : item.name} placement="bottom" >
<span className="fl font-16 font-bd mt2 comnonwidth580 pointer" style={{cursor: canNotLink ? 'poninter' : 'poninter'}}
onClick={ canNotLink ? () => {} : () => this.onItemClick(item)}
>{item.name}</a>
>{item.name}</span>
</Tooltip>
{/* 只有非课堂成员且作业是私有的情况下才会为true */}
{
item.private_icon===true ?
(<Tooltip title={ isAdminOrStudent ? "私有属性" : "私有属性,非课堂成员不能访问"}>
(<Tooltip title={ isAdminOrStudent ? "私有属性" : "私有属性,非课堂成员不能访问"} placement="bottom" >
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip>) : ""
}
@ -182,7 +198,7 @@ class CommonWorkItem extends Component{
{item.uncommit_count===undefined?"":<span className="mr20 fl">{item.uncommit_count} 未交</span>}
{
item.status_time!="" &&
<Tooltip title={ item.status.indexOf('提交中') != -1 ? '提交剩余时间' :
<Tooltip placement="bottom" title={ item.status.indexOf('提交中') != -1 ? '提交剩余时间' :
item.status.indexOf('补交中') != -1 ? '补交剩余时间' :
item.status.indexOf('申诉中') != -1 ? '申诉剩余时间' :
item.status.indexOf('匿评中') != -1 ? '匿评剩余时间' :

@ -641,7 +641,7 @@ class CommonWorkList extends Component{
timeMsg = '申诉剩余时间'
}
const hasData = student_works && !!student_works.length && page == 1
const hasData = this.state.homework_status && this.state.homework_status.indexOf("未发布") == -1 // student_works && !!student_works.length && page == 1 &&
// console.log(StudentData)
// console.log(student_works)

@ -323,7 +323,7 @@ class NewWorkForm extends Component{
const courseId = this.state.course_id || this.props.match.params.coursesId ;
this.isEdit = this.isEdit || this.props.match.url.indexOf('/edit') != -1
if ((this.isEdit) && !this.state.description) {
if ((this.isEdit) && !this.state.description && this.state.description != '') {
return ''
}
const uploadProps = {

@ -181,7 +181,7 @@ class Coursesleftnav extends Component{
on('editshixunname',this.editshixunchild)
on('editshixunmainname',this.editshixunmainname)
this.props.updataleftNavfun();
// this.props.updataleftNavfun();
// this.props.getleftNavid && this.props.getleftNavid("shixun_homework");
// const position =parseInt(this.props.match.params.position);
@ -239,50 +239,52 @@ class Coursesleftnav extends Component{
setnavid=(e,key,id,type,url)=>{
// this.props.getleftNavid && this.props.getleftNavid(key,type);
let {selectnavid,navid}=this.state;
if(navidtype===true&&selectnavid===false){
if(navid===key){
this.setState({
navid:"",
selectnavid:false,
newselectnavid:id
})
}else{
this.setState({
navid:key,
positiontype:type,
selectnavid:false,
newselectnavid:id
})
}
}else{
// console.log(navidtype)
// console.log(selectnavid)
this.setState({
navid:"",
selectnavid:false,
newselectnavid:id
})
}
this.props.updataleftNavfun();
this.props.history.replace( url );
e.stopPropagation();//阻止冒泡
// let {selectnavid,navid}=this.state;
//
// if(navidtype===true&&selectnavid===false){
//
// if(navid===key){
// this.setState({
// navid:"",
// selectnavid:false,
// newselectnavid:id
// })
// }else{
// this.setState({
// navid:key,
// positiontype:type,
// selectnavid:false,
// newselectnavid:id
// })
// }
// }else{
// // console.log(navidtype)
// // console.log(selectnavid)
// this.setState({
// navid:"",
// selectnavid:false,
// newselectnavid:id
// })
// }
//
// this.props.updataleftNavfun();
// this.props.history.replace( url );
// e.stopPropagation();//阻止冒泡
this.selectnavid(e,key,id,type,url)
}
selectnavid=(e,key,id,type,urls,index)=>{
let {url}=this.state;
if(urls!=url){
this.props.history.replace(urls);
this.props.updataleftNavfun();
this.props.history.replace(urls);
}else{
if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined)
} else {
this.props.updataleftNavfun();
this.props.unlocationNavfun(key)
this.props.history.replace(urls);
}
@ -304,8 +306,9 @@ class Coursesleftnav extends Component{
url:urls,
indexs:index
})
this.props.history.replace(urls);
this.props.updataleftNavfun();
this.props.history.replace(urls);
}
@ -721,24 +724,27 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
showsandians=(e,key,urls,num)=> {
showsandians=(e,key,urls,num,id,type,index)=> {
let {url}=this.state;
if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined)
this.props.history.replace(urls);
} else {
this.props.updataleftNavfun();
this.props.unlocationNavfun(key)
this.props.history.replace(urls);
}
if(urls!=url){
this.props.updataleftNavfun();
this.props.history.replace(urls);
}
// if(this.props.indexs===undefined){
//
// }else{
//
// }
this.setState({
selectnavid:true,
newselectnavid:id,
url:urls,
indexs:index
})
}
maincontent=(item,key)=>{
@ -930,8 +936,8 @@ class Coursesleftnav extends Component{
return(
<div key={key} >
<a>
<li title={item.name.length<7?"":item.name} onClick={(e)=>this.showsandians(e,key,item.category_url,1)} className={this.props.mainurl===item.category_url&&key===this.props.indexs?"liactive":"clearfix active"} onMouseLeave={(e)=>this.hidesandian(e,key)} onMouseEnter={(e)=>this.showsandian(e,key)}>
<a onClick={(e)=>this.showsandians(e,key,item.category_url,1)} className={ item.second_category===undefined?"fl ml20 pd0":item.second_category.length===0?"fl ml20 pd0":this.state.sandiantypes===key?"fl ml20 pd0 ebebeb":"fl ml20 pd0"}>
<li title={item.name.length<7?"":item.name} onClick={(e)=>this.showsandians(e,key,item.category_url,1,item.id,item.type)} className={this.props.mainurl===item.category_url?"liactive":"clearfix active"} onMouseLeave={(e)=>this.hidesandian(e,key)} onMouseEnter={(e)=>this.showsandian(e,key)}>
<a onClick={(e)=>this.showsandians(e,key,item.category_url,1,item.id,item.type)} className={ item.second_category===undefined?"fl ml20 pd0":item.second_category.length===0?"fl ml20 pd0":this.state.sandiantypes===key?"fl ml20 pd0 ebebeb":"fl ml20 pd0"}>
{
item.type==="announcement"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-xiaoxi1 mr10 fl":"iconfont icon-xiaoxi1 mr10 fl"}></i>:
item.type==="online_learning"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-kecheng mr10 fl font-16":"iconfont icon-kecheng mr10 fl font-16"}></i>:
@ -976,7 +982,7 @@ class Coursesleftnav extends Component{
ref={provided.innerRef}
{...provided.droppableProps}
className={"droppableul"}
style={{display: this.props.mainurl===item.category_url&&key===this.props.indexs?"":"none"}}
style={{display: key===this.props.indexs?"":"none"}}
>
{item.second_category===undefined?"":item.second_category.map((iem,index)=>{
if(item.type==="course_group"){
@ -1044,7 +1050,7 @@ class Coursesleftnav extends Component{
<div key={key}>
{/*<Tooltip placement="bottom" title={"点击空白处展开二级菜单,点击模块名字跳转到对应模块"}>*/}
<a >
<li className={this.props.mainurl===item.category_url&&key===this.props.indexs?"liactive":"clearfix active"}
<li className={this.props.mainurl===item.category_url?"liactive":"clearfix active"}
onClick={(e)=>this.setnavid(e,key,item.id,item.type,item.category_url)} onMouseEnter={(e)=>this.showsandian(e,key)}
title={item.name.length<7?"":item.name}
>
@ -1069,11 +1075,8 @@ class Coursesleftnav extends Component{
</a>
</li>
</a>
{/*</Tooltip>*/}
{/*下拉列表*/}
{/* className={this.props.location.pathname===item.category_url||this.props.location.pathname===this.state.url&&key===this.state.indexs?"":""}*/}
<ul style={{display:this.props.mainurl===item.category_url&&key===this.props.indexs?"":"none"}} class="droppableul">
<ul style={{display:key===this.props.indexs?"":"none"}} class="droppableul">
{
item.second_category===undefined?"":item.second_category.map((iem,index)=>{
@ -1115,72 +1118,3 @@ class Coursesleftnav extends Component{
export default Coursesleftnav;
//
// sandianshow=(e,key)=>{
// this.setState({
// sandiantype:key
// })
// e.stopPropagation();//阻止冒泡
// }
// hidesandian=(e,key)=>{
// this.setState({
// sandiantypes:undefined
// })
// e.stopPropagation();//阻止冒泡
// }
// sandianshow=(e,key)=>{
// this.setState({
// sandiantype:key
// })
// e.stopPropagation();//阻止冒泡
// }
// sandianhide=(e)=>{
// this.setState({
// sandiantype:undefined,
//
// })
// e.stopPropagation();//阻止冒泡
// }
// twosandianshows=(e,key,type)=>{
//
// this.setState({
// twosandiantypenum:key,
// toopvisible:false,
// toopvisibleindex:undefined,
// twosandiantypes:type
// })
// e.stopPropagation();//阻止冒泡
// }
// twoMouseLeave=(e)=>{
// this.setState({
// toopvisible:false,
// })
// e.stopPropagation();//阻止冒泡
// }
{/*{ is_teacher===true?*/}
{/* <div className={hidden_modules.length===0?"none":""}>*/}
{/* <li className="clearfix addjia ebebeb">*/}
{/* <span className="addtaskmodle">*/}
{/* <i className={addGroup===true?"iconfont icon-jia mr5 ml110 fl martop1":"none"} onClick={this.addGroupmodel}></i>*/}
{/* <div className={addGroup===false?"ml100":"none"} onClick={this.addGroupmodelsave}>确定</div>*/}
{/* </span>*/}
{/* </li>*/}
{/* </div> :""}*/}
{/*{ is_teacher===true?<div className={addGroup===false?"CheckboxGroup":"none"}>*/}
{/* <CheckboxGroup style={{ width: '100%' }} value={addCheckboxGroup} onChange={this.addCheckboxGroupID}>*/}
{/* {hidden_modules.length===0?"":hidden_modules.map((list,key)=>{*/}
{/* return(*/}
{/* <li className="clearfix pl20" key={key}>*/}
{/* <Checkbox value={list.id} className="fl "></Checkbox>*/}
{/* <span className="task-hide activity-left-name ml3">{list.name}</span>*/}
{/* </li>*/}
{/* )*/}
{/* })}*/}
{/* </CheckboxGroup>*/}
{/* </div> :""}*/}

@ -51,6 +51,26 @@ class ExerciseListItem extends Component{
Loadtype:false
})
}
toDetailPage=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.props.history.push(url);
}
render(){
let{item,checkBox,index}=this.props;
let {coursesId,Id}=this.props.match.params
@ -96,20 +116,22 @@ class ExerciseListItem extends Component{
{/*<Link to={`/courses/${coursesId}/exercises/${item.id}/exercises/student_exercise_list?tab=0`} className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px"}}>{item.exercise_name}</Link>*/}
{
this.props.isAdmin()? <Link className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580"
this.props.isAdmin()? <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer"
title={item.exercise_name}
to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`}>{item.exercise_name}</Link>:""
onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:""
}
{
this.props.isStudent()?
<Link className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580" title={item.exercise_name} to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`}>{item.exercise_name}</Link>:""
<a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer" title={item.exercise_name} onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:""
}
{
this.props.isNotMember()? item.lock_status === 0 ?
<span className="fl mt3 font-16 font-bd color-dark comnonwidth580" title={item.exercise_name}>{item.exercise_name}</span>
: <Link className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580" title={item.exercise_name} to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`}>{item.exercise_name}</Link>:""
<Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
<span className="fl mt3 font-16 font-bd color-dark comnonwidth580 pointer" title={item.exercise_name}>{item.exercise_name}</span>
</Tooltip>
: <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer" title={item.exercise_name} onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:""
}
{
@ -150,13 +172,13 @@ class ExerciseListItem extends Component{
{
item.exercise_status ===2?
<Tooltip title="提交剩余时间" placement="bottom">
<span className="mr20 fl">{item.exercise_left_time}</span>
<span className="mr20 fl">{"提交剩余时间:"+item.exercise_left_time}</span>
</Tooltip>:""
}
{
item.exercise_status ===3?
item.exercise_left_time===null?"":item.exercise_status ===3?
<Tooltip title="截止剩余时间" placement="bottom">
<span className="mr20 fl">{item.exercise_left_time}</span>
<span className="mr20 fl">{"截止剩余时间:"+item.exercise_left_time}</span>
</Tooltip>:""
}
{/*{*/}

@ -1278,20 +1278,6 @@ class Studentshavecompletedthelist extends Component {
}catch (e) {
}
try {
if(this.props.Commonheadofthetestpaper.exercise_status !== undefined){
this.setState({
exercise_status:this.props.Commonheadofthetestpaper.exercise_status,
})
}else{
this.setState({
exercise_status:0,
})
}
}catch (e) {
}
}
componentWillReceiveProps = (nextProps) => {
@ -1330,7 +1316,7 @@ class Studentshavecompletedthelist extends Component {
})
if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) {
// 学生未截止
// console.log("试卷学生未截止");
this.Generatenewdatas(response.data.exercise_users);
if (response.data.exercise_types.subjective === 0) {
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
@ -1377,6 +1363,7 @@ class Studentshavecompletedthelist extends Component {
}
} else {
//学生已截止
// console.log("试卷学生已截止");
if (response.data.exercise_types.subjective === 0) {
if (this.state.loadingstate === false) {
var arr =[];
@ -1458,7 +1445,7 @@ class Studentshavecompletedthelist extends Component {
else if (response.data.exercise_types.user_permission === 0) {
// console.log(response.data.exercise_users)
// console.log(response)
// console.log("试卷老师加载中");
if (thiss.state.loadingstate === false) {
thiss.setState({
loadingstate: true,
@ -1469,7 +1456,9 @@ class Studentshavecompletedthelist extends Component {
thiss.Generatenewdatasy(response.data.exercise_users, response);
}
}).catch((error) => {
console.log(error)
console.log(error);
console.log("其实数据加载失败了");
console.log("1111");
});
@ -2490,16 +2479,22 @@ class Studentshavecompletedthelist extends Component {
let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable,exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state;
// console.log("Studentshavecompletedthelist");
// console.log(this.props.current_status);
// console.log("获取到的数据");
// console.log(datas);
// console.log(data);
// console.log("this.props.Commonheadofthetestpaper.exercise_status");
// console.log(this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status);
// console.log(exercise_status);
return (
isAdmin === true ?
(
<div style={{
"margin": "0 auto",
" min-width": " 1200px",
minWidth: " 1200px",
}}>
{/*老师*/}
{
exercise_status===0 || exercise_status===1 ?
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===1 ?
<div className="edu-back-white">
<NoneData></NoneData>
</div>
@ -2598,9 +2593,9 @@ class Studentshavecompletedthelist extends Component {
{course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" :
<li className="clearfix mt10">
<tr>
<td className="w80" style={{"vertical-align": "top"}}><span
<td className="w80" style={{verticalAlign: "top"}}><span
className=" mr10 color-grey-8 ">分班情况</span></td>
<td className="w70" style={{"vertical-align": "top"}}><span><a
<td className="w70" style={{verticalAlign: "top"}}><span><a
id="graduation_comment_no_limit"
className={unlimitedtwo === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
onClick={() => this.funtaskstatustwos()}>不限</a></span>
@ -2714,9 +2709,9 @@ class Studentshavecompletedthelist extends Component {
Teacherliststudentlist === undefined || Teacherliststudentlist.current_answer_user === undefined || Teacherliststudentlist.current_answer_user === null ?
<div>
<div className=" clearfix "
style={{"margin": "0 auto", "padding-bottom": "100px", " min-width": " 1200px"}}>
style={{"margin": "0 auto", "padding-bottom": "100px", minWidth: " 1200px"}}>
{
exercise_status === 0 || exercise_status === 1 ?
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white">
<NoneData></NoneData>
</div>
@ -2794,10 +2789,10 @@ class Studentshavecompletedthelist extends Component {
<div className="clearfix" style={{
"margin": "0 auto",
"padding-bottom": "100px",
" min-width": " 1200px"
minWidth: " 1200px"
}}>
{
exercise_status === 0 || exercise_status === 1 ?
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white">
<NoneData></NoneData>
</div>

@ -436,22 +436,22 @@ class Testpapersettinghomepage extends Component{
/>
{
// 教师列表
parseInt(tab[0])==0 && <Studentshavecompletedthelist {...this.props} {...this.state} triggerRef={this.bindRef} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}></Studentshavecompletedthelist>
parseInt(tab[0])==0 ? <Studentshavecompletedthelist {...this.props} {...this.state} triggerRef={this.bindRef} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}></Studentshavecompletedthelist>:""
}
{/*统计结果*/}
{
parseInt(tab[0])==1 && <Exercisestatisticalresult {...this.props} {...this.state} triggerRef={this.bindRef}></Exercisestatisticalresult>
parseInt(tab[0])==1 ? <Exercisestatisticalresult {...this.props} {...this.state} triggerRef={this.bindRef}></Exercisestatisticalresult>:""
}
{
parseInt(tab[0])==2 && <ExerciseDisplay {...this.props} {...this.state} triggerRef={this.bindRef}></ExerciseDisplay>
parseInt(tab[0])==2 ? <ExerciseDisplay {...this.props} {...this.state} triggerRef={this.bindRef}></ExerciseDisplay>:""
}
{
parseInt(tab[0])==3 && <WrappedExercisesetting {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting>
parseInt(tab[0])==3 ? <WrappedExercisesetting {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting>:""
}
</div>
</div>

@ -133,6 +133,26 @@ class GraduateTaskItem extends Component{
setupdate=()=>{
this.props.funlist
}
toDetailPage=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.props.history.push(url);
}
render(){
let {
Modalstype,
@ -215,20 +235,22 @@ class GraduateTaskItem extends Component{
<h6>
{
this.props.isAdmin?<Link to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list"}
this.props.isAdmin?<a onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}
{
this.props.isStudent? <Link to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list"}
this.props.isStudent? <a onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}
{
this.props.isNotMember===true?this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580" title={discussMessage.name}>{discussMessage.name}</span>
:<a href={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list"}
<Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer" >{discussMessage.name}</span>
</Tooltip>
:<a onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list")}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}
@ -256,8 +278,8 @@ class GraduateTaskItem extends Component{
{discussMessage.commit_count===undefined?"":<span className="mr15 color-grey9 font-14">{discussMessage.commit_count} 已交</span>}
{discussMessage.uncommit_count===undefined?"":<span className="mr15 color-grey9 font-14">{discussMessage.uncommit_count} 未交</span>}
{/*<span className="mr15 color-grey9">{discussMessage.replies_count} 3 未评</span>*/}
<Tooltip title={discussMessage.task_status===1?"提交剩余时间":discussMessage.task_status===2?"补交剩余时间":""} placement="bottom">
<span className="mr15 color-grey9 font-14">{discussMessage.status_time}</span>
<Tooltip title={discussMessage.task_status===1?"提交剩余时间":discussMessage.task_status===2?"补交剩余时间":discussMessage.task_status===3?"交叉评阅剩余时间":""} placement="bottom">
<span className="mr15 color-grey9 font-14">{discussMessage.task_status===1&&discussMessage.status_time!=""&&discussMessage.status_time!=null?"提交剩余时间:"+discussMessage.status_time:discussMessage.task_status===2&&discussMessage.status_time!=""&&discussMessage.status_time!=null?"补交剩余时间:"+discussMessage.status_time:discussMessage.task_status===3&&discussMessage.status_time!=""&&discussMessage.status_time!=null?"交叉评阅剩余时间:"+discussMessage.status_time:discussMessage.status_time}</span>
</Tooltip>
{/* { discussMessage.replies_count != 0 && <span className="mr15 color-grey9">{discussMessage.replies_count} </span> }

@ -1169,9 +1169,11 @@ class GraduationTaskssettingapp extends Component{
<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36">
<div className={" font-16 color-dark h20 mb20"}>评分设置 </div>
<div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>取各教师最终评分的平均分</span></div>
<Tooltip placement="bottomLeft" title={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?"正在交叉评阅,不可取消":"":"":""}>
<Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment}
disabled={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?true:false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span>
</Checkbox>
</Tooltip>
{crosscomment===true?<div>
<div className={"h20 mb30 ml30 mt20 ml87"}>
<span>开始时间</span>

@ -40,7 +40,7 @@ class GraduationTaskssettinglist extends Component{
task_status:undefined,
cross_comment:null,
search:null,
order:"updated_at",
order:"update_time",
b_order:"desc",
course_group:undefined,
loadingstate:true,
@ -92,6 +92,7 @@ class GraduationTaskssettinglist extends Component{
seacthdata=(teacher_comment,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)
let task_Id=this.props.match.params.task_Id;
let url="/graduation_tasks/"+task_Id+"/tasks_list.json";
@ -106,7 +107,7 @@ class GraduationTaskssettinglist extends Component{
order:order===null?undefined:order,
b_order:b_order===null?undefined:b_order,
search:search===null?undefined:search,
page:pages===null?undefined:page,
page:pages,
limit:20,
},
paramsSerializer: function(params) {
@ -281,8 +282,6 @@ class GraduationTaskssettinglist extends Component{
funtaskstatus=(checkedValues,key)=>{
// console.log(checkedValues)
console.log(checkedValues);
let {teacher_comment, course_group, cross_comment, order, b_order, search} = this.state;
@ -599,7 +598,7 @@ class GraduationTaskssettinglist extends Component{
this.cannerassocition();
let {taskslistdata}=this.state;
let url = "/graduation_tasks/"+taskslistdata.task_id+"/graduation_works/cancel_relate_project.json";
console.log(url)
axios.get(url).then((result)=>{
if(result.data.status===0){
@ -655,8 +654,7 @@ class GraduationTaskssettinglist extends Component{
/// 确认是否下载
confirmysl(url){
debugger;
console.log(1);
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state;
let params ={
@ -958,7 +956,7 @@ class GraduationTaskssettinglist extends Component{
}
console.log(this.props.questionslist.status)
return(
<React.Fragment>
@ -1217,14 +1215,14 @@ class GraduationTaskssettinglist extends Component{
<div className="clearfix">
{this.props.isAdmin()===true?<span className="fl color-grey-6 font-12">
<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
个检索结果{taskslistdata&&taskslistdata.work_count} 学生</span>:""}
个检索结果{taskslistdata&&taskslistdata.all_work_count} 学生</span>:""}
{this.props.isAdmin()===true?<div className="fr color-grey-6 edu-menu-panel">
<p>
<a data-remote="true" class="color-grey-6 font-12">
{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a>
{order==="update_time"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list edu-menu-lists" style={{width: '87px'}}>
<li onClick={(e)=>this.funorder("updated_at")}><a data-remote="true">更新时间</a>
<li onClick={(e)=>this.funorder("update_time")}><a data-remote="true">更新时间</a>
</li>
<li onClick={(e)=>this.funorder("work_score" )}><a data-remote="true">最终成绩</a>
</li>
@ -1415,10 +1413,10 @@ class GraduationTaskssettinglist extends Component{
</span>
<div className="fr color-grey-6 edu-menu-panel">
<p><a data-remote="true">
{order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序</a><i
{order==="update_time"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序</a><i
className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list">
<li onClick={(e)=>this.funorder("updated_at")} className={order==="updated_at"?"none":""}><a data-remote="true">时间</a>
<li onClick={(e)=>this.funorder("update_time")} className={order==="update_time"?"none":""}><a data-remote="true">时间</a>
</li>
<li onClick={(e)=>this.funorder("work_score" )} className={order==="work_score"?"none":""}><a data-remote="true">成绩</a>
</li>

@ -744,6 +744,8 @@ class GraduationTasks extends Component{
<div className="mt20 edu-back-white pt10 pl30 pr30" key={index}>
<div className="clearfix">
<GraduateTaskItem
{...this.state}
{...this.props}
discussMessage={item}
isAdmin={this.props.isAdmin()}
isStudent={this.props.isStudent()}

@ -15,6 +15,22 @@ class GraduateTopicItem extends Component{
this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/edit`);
}
toDetailPage=(topicId)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
let courseId=this.props.match.params.coursesId;
this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`);
}
@ -71,7 +87,9 @@ class GraduateTopicItem extends Component{
<h6>
{
isNotMember?
<a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
<Tooltip title={ discussMessage.private_icon===true?"私有属性,非课堂成员不能访问":discussMessage.name} placement="bottom">
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.name}</span>
</Tooltip>:""
}
{

@ -359,6 +359,22 @@ class PollDetailTabForthRules extends Component{
return(
<div className="clearfix mb5" key={r}>
{
flagPageEdit===undefined?"":
flagPageEdit===true?
<style>
{
`
.yskspickersy
.ant-input, .ant-input .ant-input-suffix{
background-color: #fff !important;
}
`
}
</style>
:""
}
<div className="with40 fl pr20 df">
<span className="font-16 pr20 fl mt8">发布规则{r+1}</span>
<div className="flex1">
@ -396,7 +412,7 @@ class PollDetailTabForthRules extends Component{
</p>
</div>
</div>
<div className="fl pr20 with25">
<div className="fl pr20 with25 yskspickersy">
<Tooltip placement="bottom" title={rule.e_timeflag ? "发布时间已过,不能再修改":""}>
<span>
<DatePicker
@ -422,7 +438,7 @@ class PollDetailTabForthRules extends Component{
}
</p>
</div>
<div className="fl mr20">
<div className="fl mr20 yskspickersy">
<Tooltip placement="bottom" title={rule.e_timeflag ? "截止时间已过,不能再修改":""}>
<span>
<DatePicker

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import Tooltip from 'material-ui/Tooltip';
import {Tooltip} from 'antd';
import {Link} from 'react-router-dom';
import moment from 'moment';
import CoursesListType from '../coursesPublic/CoursesListType';
@ -15,6 +15,25 @@ class PollListItem extends Component{
constructor(props){
super(props);
}
toDetailPage=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.props.history.push(url);
}
render(){
let{item,checkBox,courseType,index}=this.props;
let {coursesId}=this.props.match.params;
@ -37,12 +56,16 @@ class PollListItem extends Component{
}
<div className="flex1 pr">
<p className="clearfix mb30">
{ canNotLink ? <a className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px", "cursor": "default"}} title={item.polls_name}>{item.polls_name}</a> :
<Link to={`/courses/${coursesId}/polls/${item.id}/detail`} className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px"}} title={item.polls_name}>{item.polls_name}</Link>
{ canNotLink ?
<Tooltip title={courseType.user_permission == 0?"私有属性,非课堂成员不能访问":item.polls_name} placement="bottom">
<span className="fl font-16 font-bd mt2 color-grey-3 task-hide pointer" style={{"maxWidth":"600px"}} >{item.polls_name}</span>
</Tooltip>
:
<a onClick={()=>this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} className="fl font-16 font-bd mt2 color-grey-3 task-hide pointer" style={{"maxWidth":"600px"}} title={item.polls_name}>{item.polls_name}</a>
}
{
item.lock_status === 0 ?
<Tooltip title={`${courseType.user_permission == 0 ? "私有属性,非课堂成员不能访问" : "私有属性"}`}>
<Tooltip title={`${courseType.user_permission == 0 ? "私有属性,非课堂成员不能访问" : "私有属性"}`} placement="bottom">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip>
:""
@ -73,7 +96,7 @@ class PollListItem extends Component{
{
item.polls_status ==2 && item.publish_time !=null &&
<Tooltip title="提交剩余时间">
<span className="mr20 fl mt3">{formatDuring(t)}</span>
<span className="mr20 fl mt3">{"提交剩余时间:"+formatDuring(t)}</span>
</Tooltip>
}
{

@ -3320,7 +3320,7 @@ class Listofworksstudentone extends Component {
<div className="clearfix">
<span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.all_member_count}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.work_count&&teacherdata.work_count}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count&&teacherdata.all_member_count} </span>
<style>
{
`

@ -181,9 +181,7 @@ class ShixunHomeworkPage extends Component {
const isAdmin = this.props.isAdmin();
// console.log(119)
console.log(jobsettingsdatapage);
// console.log(jobsettingsdatapage);
return (
<div className="newMain clearfix ">
<Modals
@ -197,6 +195,8 @@ class ShixunHomeworkPage extends Component {
</Modals>
<div className={"educontent mt10 mb20"} style={{width: "1200px"}}>
<Spin size="large" spinning={this.state.mylistisSpin}>
{
jobsettingsdatapage === undefined?"":
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<a className="btn colorgrey fl hovercolorblue " href={this.props.current_user&&this.props.current_user.first_category_url}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}</a>
@ -208,6 +208,8 @@ class ShixunHomeworkPage extends Component {
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
}
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth: "33px"}}>
{teacherdatapage === undefined ? "" : teacherdatapage.homework_name}

@ -143,6 +143,27 @@ class ShixunhomeWorkItem extends Component{
ModalsRenametype:false,
})
}
hrefjumpskip=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.props.history.push(url);
}
render(){
let {
Modalstype,
@ -294,23 +315,25 @@ class ShixunhomeWorkItem extends Component{
{/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/}
{
this.props.isAdmin?<Link to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0"}
this.props.isAdmin?<a onClick={()=>this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}
{
this.props.isStudent? <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`}
this.props.isStudent? <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}
{
this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580" title={discussMessage.name}>{discussMessage.name}</span>
: <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`}
<Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.name}</span>
</Tooltip>
: <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}

@ -67,7 +67,7 @@ class Trainingjobsetting extends Component {
//
// });
this.state = {
flagPageEdit: undefined,
flagPageEdit: true,
flagPageEdits: false,
flagPageEditstwo:false,
flagPageEditsthrees:false,
@ -137,7 +137,7 @@ class Trainingjobsetting extends Component {
componentDidMount() {
console.log("Trainingjobsetting");
console.log("componentDidMount");
this.getTrainingjobsetting();
this.getTrainingjobsetting(true);
let query = this.props.location.pathname;
const type = query.split('/');
this.setState({
@ -165,7 +165,7 @@ class Trainingjobsetting extends Component {
// }
// 获取数据地方
getTrainingjobsetting = () => {
getTrainingjobsetting = (bool) => {
// console.log("getTrainingjobsetting")
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
@ -241,26 +241,26 @@ class Trainingjobsetting extends Component {
}
}
}
console.log("220");
// console.log("220");
var publish_timebools=false;
if(result.data.publish_time){
publish_timebools= moment(result.data.publish_time,"YYYY-MM-DD HH:mm")<=moment();
}
console.log("228");
console.log(publish_timebools);
// console.log("228");
// console.log(publish_timebools);
var end_timebools =false;
if(result.data.end_time){
end_timebools == moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment();
}
console.log("233");
console.log(end_timebools);
// console.log("233");
// console.log(end_timebools);
var late_timess=false;
if(result.data.late_time){
late_timess== moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment();
}
console.log("240");
console.log(late_timess);
// console.log("240");
// console.log(late_timess);
this.setState({
@ -293,6 +293,14 @@ class Trainingjobsetting extends Component {
code_review:result.data.code_review
})
this.props.Getdataback(result,result.data);
if(bool===true){
if(this.props.isAdmin() !== undefined){
if(this.props.isAdmin() === true){
this.editSettings(result);
}
}
}
}
})
@ -1592,7 +1600,7 @@ class Trainingjobsetting extends Component {
description:result.data.message
});
this.homeworkhide();
this.getTrainingjobsetting();
this.getTrainingjobsetting(false);
}
}
@ -1623,7 +1631,7 @@ class Trainingjobsetting extends Component {
// message:"提示",
// description:response.data.message
// });
this.getTrainingjobsetting();
this.getTrainingjobsetting(false);
this.homeworkhide()
}
})
@ -1797,6 +1805,7 @@ class Trainingjobsetting extends Component {
modalSave: this.cancelBox
})
} else {
// debugger
var releasetime =true;
var deadline = true;
var endtime =true;
@ -1814,7 +1823,7 @@ class Trainingjobsetting extends Component {
if(moment(datas.data.late_time,"YYYY-MM-DD HH:mm")<=moment()){
endtime=false;
}
if(datas.data.allowreplenishment === false){
if(datas.data.allow_late === false){
whethertopays=false;
}
@ -1829,19 +1838,23 @@ class Trainingjobsetting extends Component {
flagPageEditsfor:endtime,
completionefficiencyscore:true,
work_efficiencys:true,
unifiedsetting:datas.data.unifiedsetting,
unifiedsetting:datas.data.unified_setting,
latedeductiontwo:20,
});
//均分比例
// result.data.shixun_evaluation === 0 ? "均分比例" : result.data.shixun_evaluation === 1 ? "经验值比例" : result.data.shixun_evaluation === 2 ?
try {
if(datas.data.proportion==="均分比例"){
if(datas.data.shixun_evaluation === 0){
this.Equalproportion(20);
}else if(datas.data.proportion==="经验值比例"){
}else if(datas.data.shixun_evaluation === 1){
this.Empiricalvalueratio(20);
}
}catch (e) {
console.log(1);
console.log(e);
}
@ -1853,9 +1866,9 @@ class Trainingjobsetting extends Component {
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
unifiedsetting:datas.data.unifiedsetting,
unifiedsetting:datas.data.unified_setting,
});
if(datas.data.work_efficiencys===true){
if(datas.data.work_efficiency===true){
this.setState({
completionefficiencyscore:true,
})
@ -1866,6 +1879,8 @@ class Trainingjobsetting extends Component {
}
}
}catch (e) {
console.log(2);
console.log(e);
this.setState({
flagPageEditsbox:true,
flagPageEdit: true,
@ -1873,9 +1888,9 @@ class Trainingjobsetting extends Component {
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
unifiedsetting:datas.data.unifiedsetting,
unifiedsetting:datas.data.unified_setting,
});
if(datas.data.work_efficiencys===true){
if(datas.data.work_efficiency===true){
this.setState({
completionefficiencyscore:true,
})
@ -1886,7 +1901,7 @@ class Trainingjobsetting extends Component {
}
}
if(datas.data.proportion === "自定义分值"){
if(datas.data.shixun_evaluation === 2){
this.setState({
boolUnitetwoname:"自定义分值",
boolUnitetwo: false,
@ -1896,9 +1911,10 @@ class Trainingjobsetting extends Component {
}
} catch (e) {
}
console.log(3);
console.log(e);
}
};
//取消编辑
cancelEdit = () => {
this.setState({
@ -1920,7 +1936,7 @@ class Trainingjobsetting extends Component {
unit_e_tip: "",
})
this.refs.targetElementTrainingjobsetting.scrollIntoView();
this.getTrainingjobsetting();
this.getTrainingjobsetting(false);
}
rulesCheckInfo=(rules)=>{
@ -2108,7 +2124,24 @@ class Trainingjobsetting extends Component {
loadtype={loadtype}
modalSave={modalSave}
></Modals>
<div className={"educontent "}>
<div className={"educontent"}>
{
!flagPageEdit && this.props.isAdmin() === true ?
""
:
<style>
{
`
.yskspickers
.ant-input, .ant-input .ant-input-suffix{
background-color: #fff !important;
}
`
}
</style>
}
<div className="edu-back-white" style={{paddingTop: "20px"}}>
{/*发布设置*/}
<div className="stud-class-set bor-bottom-greyE edu-back-white">
@ -2146,7 +2179,7 @@ class Trainingjobsetting extends Component {
<div className="clearfix mb5 ml15">
<span className="font-16 fl mt3" style={{"color":"#999999"}}>发布时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true && publish_timebool === true?"发布时间已过,则不能修改": ""}>
<div className="fl">
<div className="fl yskspickers">
<DatePicker
showToday={false}
id={"publishtimeid"}
@ -2179,7 +2212,7 @@ class Trainingjobsetting extends Component {
<div className="clearfix ml15 mb5">
<span className=" fl mt3 font-16" style={{"color":"#999999"}}>截止时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true&&end_timebool===true?"截止时间已过,则不能修改": ""}>
<div className="fl">
<div className="fl yskspickers">
<DatePicker
showToday={false}
id={"end_timeid"}
@ -2252,7 +2285,7 @@ class Trainingjobsetting extends Component {
`
}
</style>
<InputNumber disabled={!flagPageEditsfor || !whethertopay} min={0} max={1000} className="mr10 h40 color-grey-9"
<InputNumber disabled={!whethertopay} min={0} max={1000} className="mr10 h40 color-grey-9"
onChange={this.changeTopicName}
style={{"color":"#999999","height": "40px"}}
value={this.state.latededuction}/>
@ -2260,8 +2293,21 @@ class Trainingjobsetting extends Component {
<span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(延时提交作品时学生成绩将被扣减的分值)</span>
{/*{latepenaltytype===true?<div className={"color-red ml40"}></div>:""}*/}
</div>
<div className={"h20 mb20 "}>
{
whethertopay&& whethertopay === true ?
<style>
{
`
.yskspickerss
.ant-input, .ant-input .ant-input-suffix{
background-color: #fff !important;
}
`
}
</style>
:""
}
<div className={"h20 mb20 yskspickerss"}>
<span style={{"width": "100px","color":"#999999"}}>结束时间</span>
<DatePicker
showToday={false}
@ -2277,7 +2323,7 @@ class Trainingjobsetting extends Component {
onOk={this.ontimeonokthree}
showTime={{ format: 'HH:mm' }}
width={"210px"}
disabled={!flagPageEditsfor || !whethertopay}
disabled={ !whethertopay}
dropdownClassName="hideDisable"
className={handclass}
/>
@ -2394,7 +2440,7 @@ class Trainingjobsetting extends Component {
</span>
</div>
<p className="ml20 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span
className="color-grey-c font-10 ml10">(需要学生完成的任务请选中)</span></p>
className="color-grey-c font-12 ml10">(需要学生完成的任务请选中)</span></p>
<div className="ml40 mt15" >
{this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => {
return (
@ -2424,7 +2470,7 @@ class Trainingjobsetting extends Component {
<RadioGroup className="ml40 mt20" onChange={this.onChangeslevel} value={this.state.level}>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值</span></Radio>
className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>(根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值)</span></Radio>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
value={"满分"}>不扣分 </Radio>
</RadioGroup>

@ -84,7 +84,8 @@ class ShixunHomework extends Component{
}
componentDidMount() {
this.setState({
isSpin:true
isSpin:true,
})
if(this.props.match.params.main_id){
this.setState({
@ -108,7 +109,8 @@ class ShixunHomework extends Component{
}
seactall=(id)=>{
this.setState({
isSpin:true
isSpin:true,
checkBoxValues:[]
})
let coursesId=this.props.match.params.coursesId;
let url="/courses/"+coursesId+"/homework_commons.json?type=4";
@ -1080,7 +1082,7 @@ class ShixunHomework extends Component{
</span>:
<WordsBtn style="blue" onClick={()=>this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:""}
{this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?<WordsBtn style="blue" className="mr30 font-16" onClick={this.createCommonpath}>选用实践课程</WordsBtn>:"":""}
{this.props.isAdmin()===true?<a className={"btn colorblue font-16"} onClick={()=>this.showNewShixunModelType()}>选用实训</a>:""}
{this.props.isAdmin()===true?<a className={"btn colorblue font-16"} onClick={()=>this.showNewShixunModelType()}>选用实训项目</a>:""}
</li>
</p>

@ -80,11 +80,11 @@ class EcSetting extends React.Component {
let type = stepTypes[stepIndex];
this.setState({ stepIndex: stepIndex });
if(type==="courses"){
this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}/ec_course_support_setting/1`);
}else {
// if(type==="courses"){
// this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}/ec_course_support_setting/1`);
// }else {
this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}`);
}
// }
}
setupStep = () => {

@ -233,19 +233,19 @@ class Curriculum extends Component {
<Switch>
{/*Curriculumtwo 测试用*/}
{/*课程目标*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/:type/1'
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/subpage/courses/:type/1'
render={ (props) => (<EcCourseSupportSetting {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)} />) }></Route>
{/*课程考核方式与数据来源*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/:type/2'
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/subpage/courses/:type/2'
render={ (props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
{/*成绩等级设置*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/:type/3'
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/subpage/courses/:type/3'
render={ (props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
{/*4课程目标评价方法*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/:type/4'
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/subpage/courses/:type/4'
render={ (props) => (<EcCourseEvaluationsbottom {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
{/*5课程达成评价结果*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/:type/5'
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/subpage/courses/:type/5'
render={ (props) => (<EcCompletionCalculation {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
</Switch>
</div>

@ -16,7 +16,7 @@ class CurriculumSubpage extends Component {
console.log(this.props.match.params);
}
Curriculumstructure=()=>{
this.props.history.push('/ecs/major_schools/:majorId/years/:yearId/subpage/courses')
this.props.history.push(`/ecs/major_schools/${this.props.match.params.majorId}/years/${this.props.match.params.yearId}/subpage/courses`);
}

@ -398,9 +398,13 @@ class LoginDialog extends Component {
});
}
handleDialogClose = () => {
if(this.props.match===undefined){
if(this.props.isloginCancel===undefined){
window.location.href="/";
this.props.Modifyloginvalue();
// this.setState({
// isRender: false
// })
// this.props.Modifyloginvalue();
}else{
this.setState({
isRender: false

@ -514,8 +514,8 @@ class MessagSub extends Component {
<li className={typeysl && typeysl === "project" ? "active" : ""}><a
onClick={(s, i) => this.getdata("project", 1)}>项目提醒</a></li>
<li className={typeysl && typeysl === "project_package" ? "active" : ""}><a
onClick={(s, i) => this.getdata("project_package", 1)}>众包提醒</a></li>
{/*<li className={typeysl && typeysl === "project_package" ? "active" : ""}><a*/}
{/*onClick={(s, i) => this.getdata("project_package", 1)}>众包提醒</a></li>*/}
<li className={typeysl && typeysl === "interaction" ? "active" : ""}><a
onClick={(s, i) => this.getdata("interaction", 1)}>互动提醒</a></li>

@ -3,7 +3,6 @@ import {getImageUrl} from 'educoder';
import {Tooltip,Modal,Icon,Spin,message} from 'antd';
import DetailCardsEditAndAdd from './DetailCardsEditAndAdd';
import DetailCardsEditAndEdit from './DetailCardsEditAndEdit';
import AccountProfile from"../../user/AccountProfile";
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import axios from 'axios';
import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
@ -200,13 +199,16 @@ class DetailCards extends Component{
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
let url = "/shixuns/" + id + "/shixun_exec.json";
@ -308,16 +310,11 @@ class DetailCards extends Component{
startshixunCombattype:false
})
}
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render(){
let { pathCardsList,
dropid,
AccountProfiletype,
idsum,
pathCardsedittype,
pathlistedit,
@ -339,11 +336,7 @@ class DetailCards extends Component{
// console.log("zzz"+this.props.MenuItemsindextype)
return(
<div>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
{...this.state}
/>:""}
<Modals
modalsType={Modalstype}
@ -495,7 +488,7 @@ class DetailCards extends Component{
:
<li className={showparagraph===false?"none":"fr status_li"}>
{
showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.MenuItemsindextype===2?"":<div>
showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.current_user&&this.props.current_user.user_identity==="学生"&&this.props.courses!=undefined?"":<div>
<Link to={'/shixuns/'+line.identifier+'/challenges'} className="mr30 color-blue_4C shixun_detail pointer fl" target="_blank">查看详情</Link>
{line.shixun_status==="暂未公开"?"":<a onClick={()=>this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始实战</a>}
</div>:""

@ -374,7 +374,7 @@ class DetailCardsEditAndAdd extends Component{
<p className="clearfix mb30">
<a onClick={this.AddShixunBox} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i>
选择实训</a>
选用实训项目</a>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span>
</p>

@ -378,7 +378,7 @@ class DetailCardsEditAndEdit extends Component{
</div>
<p className="clearfix mb30">
<a onClick={this.AddShixunBox} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i>
<i className="iconfont icon-tianjiafangda fl mr5"></i>
</a>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span>
</p>

@ -5,7 +5,6 @@ import SendPanel from "./sendPanel.js";
import { getImageUrl } from 'educoder';
import axios from 'axios';
import Modals from '../../modals/Modals';
import AccountProfile from"../../user/AccountProfile";
import OpenCourse from './OpenCourse';
import Jointheclass from '../../modals/Jointheclass';
import './DetailTop.css';
@ -30,7 +29,7 @@ class DetailTop extends Component{
Pathcourseid:undefined,
OpenCourseTypes:false,
putappointmenttype:false,
getappointmenttype:false
getappointmenttype:false,
}
}
componentDidMount(){
@ -249,11 +248,16 @@ class DetailTop extends Component{
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.setState({
@ -268,13 +272,16 @@ class DetailTop extends Component{
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.setState({
Modalstype:true,
@ -336,14 +343,10 @@ class DetailTop extends Component{
})
}
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render(){
let{detailInfoList}=this.props;
let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,AccountProfiletype}=this.state;
let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype}=this.state;
const radioStyle = {
display: 'block',
height: '30px',
@ -373,11 +376,7 @@ class DetailTop extends Component{
return(
<div className={this.props.courses===undefined?"subhead":this.props.courses.length===0?applypath===true?"subhead mb100":"subhead":applypath===false?detailInfoList.name.length>40?"subhead mb100":"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb120":detailInfoList.name.length>40?"subhead mb100":"subhead mb80"}>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
{...this.state}
/>:""}
<Modals
modalsType={Modalstype}

@ -167,12 +167,20 @@ class TPMBanner extends Component {
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
//
// if(this.props.checkIfProfessionalCertification()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/search_user_courses.json";
this.setState({
@ -390,13 +398,20 @@ class TPMBanner extends Component {
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
// if(this.props.checkIfProfessionalCertification()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
let {shixunsDetails} = this.props
if( shixunsDetails.shixun_status>1){
this.setState({

@ -83,6 +83,7 @@ export function TPMIndexHOC(WrappedComponent) {
globalLoading: false,
dataquerys:{},
isloginCancel:undefined
}
}
@ -429,15 +430,16 @@ export function TPMIndexHOC(WrappedComponent) {
};
hideLoginDialog = () => {
this.setState({
isRender: false
isRender: false,
isloginCancel:undefined
})
}
showLoginDialog = () => {
this.setState({
isRender: true
isRender: true,
isloginCancel:"iscancel"
})
}
checkIfLogin = () => {
return this.state.current_user && this.state.current_user.login != ''
}

@ -52,7 +52,7 @@ export default class TPMUpdatepropaede extends Component {
updatepropaedeuticsvalue=()=>{
let id = this.props.match.params.shixunId;
let url="/shixuns/"+id+"/update_propaedeutics.json";
const update_propaedeuticsvalue = this.editanswersRef.current.getValue().trim();
const update_propaedeuticsvalue = this.neweditanswerRef.current.getValue().trim();
axios.post(url,{
content:update_propaedeuticsvalue
}

@ -227,14 +227,20 @@ class Challenges extends Component {
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
// if(this.props.checkIfProfessionalCertification()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
let { ChallengesDataList } = this.state;
// let id = this.props.match.params.shixunId;

@ -16,8 +16,10 @@ import { getImageUrl, toPath } from 'educoder'
import axios from 'axios';
import NoneData from "../../../courses/coursesPublic/NoneData";
import './Collaborators.css';
import SchoolSelect from "../../../courses/members/modal/AddStudentModal";
const $ = window.$;
@ -34,7 +36,7 @@ class Collaborators extends Component {
Collaboratorsvisibleadmin: false,
value: 1,
page: 1,
Searchadmin: [],
Searchadmin: undefined,
allChangechecked: false,
Collaboratorslist: [],
Collaboratorslisttype: false,
@ -88,6 +90,7 @@ class Collaborators extends Component {
});
}
CollaboratorsshowModal = (type) => {
if (type === "cooperation") {
this.setState({
Collaboratorsvisibleadmin: false,
@ -108,9 +111,10 @@ class Collaborators extends Component {
}
showCollaboratorsvisible = (type) => {
this.setState({
Collaboratorslist: [],
Searchadmin:[],
Searchadmin:undefined,
onSearchcalue:""
})
let admintype = this.props.identity;
@ -160,7 +164,7 @@ class Collaborators extends Component {
let {collaboratorList,user_name,school_name} = this.state;
this.setState({
Searchadmin: [],
// Searchadmin: undefined,
spinnings:true,
})
// if (value === "") {
@ -199,6 +203,7 @@ class Collaborators extends Component {
}
selectChangenickname = (e, key) => {
let {Searchadmin} = this.state;
let newlist = Searchadmin;
for (var i = 0; i < newlist.length; i++) {
@ -235,6 +240,7 @@ class Collaborators extends Component {
}
allChange = (e) => {
let {Searchadmin} = this.state;
let newlist = Searchadmin;
for (var i = 0; i < newlist.length; i++) {
@ -246,6 +252,7 @@ class Collaborators extends Component {
})
}
submit_add_collaborators_form = () => {
let id = this.props.match.params.shixunId;
let {Searchadmin,collaboratorList} = this.state;
let newlist = Searchadmin;
@ -300,6 +307,7 @@ class Collaborators extends Component {
}
submit_addadminredio = () => {
let {addadminrediovalue} = this.state;
let id = this.props.match.params.shixunId;
@ -371,6 +379,7 @@ class Collaborators extends Component {
contentViewScrolledit=(e)=>{
//滑动到底判断
let newscrollTop=parseInt(e.currentTarget.scrollTop);
let allclientHeight=e.currentTarget.clientHeight+newscrollTop;
@ -395,7 +404,6 @@ class Collaborators extends Component {
newSearchadmin.push(newlist[i])
}
console.log(newSearchadmin)
this.setState({
Searchadmin: newSearchadmin,
collaboratorList: collaboratorList,
@ -434,10 +442,10 @@ class Collaborators extends Component {
height: '30px',
lineHeight: '30px',
};
// console.log(collaboratorList)
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
console.log(Searchadmin)
return (
<React.Fragment>
<p className="clearfix mt30"
@ -495,7 +503,7 @@ class Collaborators extends Component {
</Modal>
<Modal
{Collaboratorsvisibleadmin===true?<Modal
keyboard={false}
title="添加合作者"
visible={Collaboratorsvisibleadmin}
@ -533,9 +541,9 @@ class Collaborators extends Component {
<Spin indicator={antIcon} spinning={this.state.spinnings}>
<div className="clearfix">
<ul className="upload_select_box fl" id="search_not_teachers_list" onScroll={this.contentViewScrolledit}>
{Searchadmin.length === 0 ? <li style={{textAlign: 'center'}}>
{Searchadmin === undefined ? <li style={{textAlign: 'center'}}>
<span>请试试搜索一下</span>
</li> : Searchadmin.map((item, key) => {
</li>:Searchadmin.length === 0 ?<NoneData/>: Searchadmin.map((item, key) => {
return (
<li key={key} style={{display: item.identify === "专业人士" ? "none" : "block"}}>
<Checkbox className="fl mr20" checked={item.checked}
@ -575,7 +583,7 @@ class Collaborators extends Component {
<a className="task-btn task-btn-orange"
onClick={() => this.submit_add_collaborators_form()}>确定</a>
</div>
</Modal>
</Modal>:""}
<div className="pl20" id="collaborators_list_info">
{

@ -109,7 +109,7 @@ class ChangeHeaderPicModal extends Component{
// https://www.trustie.net/issues/22461
if ( this.props.current_user.image_url.indexOf('avatars/User/b') != -1
|| this.props.current_user.image_url.indexOf('avatars/User/g') != -1 ) {
this.setTimeout(() => {
window.setTimeout(() => {
this.doAfterUpdated()
}, 1000)
} else {

Loading…
Cancel
Save