Merge branch 'dev_aliyun' into dev_hjm_a

dev_ec
hjm 6 years ago
commit 204f296568

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

@ -1,7 +1,7 @@
class Ecs::ReachEvaluationsController < Ecs::BaseController class Ecs::ReachEvaluationsController < Ecs::BaseController
def show 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) @graduation_requirements = current_year.ec_graduation_requirements.includes(preload)
respond_to do |format| respond_to do |format|

@ -431,6 +431,7 @@ class GamesController < ApplicationController
# params[:status] 1: 目录树点击的请求 0正常自动加载 # params[:status] 1: 目录树点击的请求 0正常自动加载
# 返回参数status -1 系统统一报错提示;-3 需要轮训重试带retry参数-4 立即重试 # 返回参数status -1 系统统一报错提示;-3 需要轮训重试带retry参数-4 立即重试
def rep_content def rep_content
raise("666")
challenge_path = @game.challenge.try(:path) challenge_path = @game.challenge.try(:path)
if challenge_path.blank? if challenge_path.blank?
tip_exception("代码获取异常,请检查实训模板的评测设置是否正确") tip_exception("代码获取异常,请检查实训模板的评测设置是否正确")

@ -3,13 +3,12 @@
<head> <head>
<meta charset="utf-8"> <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 --> <!-- width=device-width, initial-scale=1 , shrink-to-fit=no -->
<!-- <meta name="viewport" content=""> --> <!-- <meta name="viewport" content=""> -->
<meta name="theme-color" content="#000000"> <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="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

@ -2,6 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <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="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000"> <meta name="theme-color" content="#000000">
<!-- <!--

File diff suppressed because one or more lines are too long

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

@ -28,6 +28,16 @@ class Fileslistitem extends Component{
} }
showfiles=(list)=>{ showfiles=(list)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
if(list.is_history_file===false){ if(list.is_history_file===false){
// this.props.DownloadFileA(list.title,list.url) // this.props.DownloadFileA(list.title,list.url)
//window.location.href=list.url; //window.location.href=list.url;
@ -217,7 +227,9 @@ class Fileslistitem extends Component{
{ {
this.props.isNotMember===true? this.props.isNotMember===true?
discussMessage.is_lock === 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 :<a
onClick={()=>this.showfiles(discussMessage)} onClick={()=>this.showfiles(discussMessage)}
title={discussMessage.title} title={discussMessage.title}

@ -113,31 +113,36 @@ class Fileslists extends Component{
updadatalist=(id)=>{ updadatalist=(id)=>{
// this.seactall(id) // this.seactall(id)
let coursesId=this.props.match.params.coursesId; if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user.login=== null||this.props.user&&this.props.user.login=== undefined){
let url="/courses/"+coursesId+"/attahcment_category_list.json";
axios.get(url, { }else{
}).then((response) => { let coursesId=this.props.match.params.coursesId;
if(response!=undefined){ let url="/courses/"+coursesId+"/attahcment_category_list.json";
axios.get(url, {
if(response.data&&response.data) { }).then((response) => {
if (response.data.status != 401) { if(response!=undefined){
let list = response.data.course_modules;
let course_second_categoriess; if(response.data&&response.data) {
list.map((item, key) => { if (response.data.status != 401) {
course_second_categoriess = item.course_second_categories let list = response.data.course_modules;
}) let course_second_categoriess;
list.map((item, key) => {
this.setState({ course_second_categoriess = item.course_second_categories
course_modules: response.data, })
has_course_groups: response.data.has_course_groups,
course_second_categories: course_second_categoriess this.setState({
}) course_modules: response.data,
has_course_groups: response.data.has_course_groups,
course_second_categories: course_second_categoriess
})
}
} }
} }
} })
}
})
} }
updatafiled=()=>{ updatafiled=()=>{
if(this.props.match.params.main_id){ if(this.props.match.params.main_id){

@ -1,115 +1,126 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Tooltip} from 'antd' import {Tooltip} from 'antd'
import moment from 'moment' import moment from 'moment'
import { getUrl, WordsBtn } from 'educoder' import { getUrl, WordsBtn } from 'educoder'
class BoardsListItem extends Component{ class BoardsListItem extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state = { this.state = {
} }
} }
onTitleClick = (discussMessage) => { onTitleClick = (discussMessage) => {
const isAdminOrStudent = this.props.isAdminOrStudent(); if(this.props.checkIfLogin()===false){
if (!isAdminOrStudent && discussMessage.is_public == false) { this.props.showLoginDialog()
// 没有权限访问 return
return; }
}
const cid = this.props.match.params.coursesId if(this.props.checkIfProfileCompleted()===false){
const board_id = this.props.match.params.boardId this.props.showProfileCompleteDialog()
this.props.toDetailPage(cid, board_id, discussMessage.id) return
} }
render(){
let { addGroup } = this.state; const isAdminOrStudent = this.props.isAdminOrStudent();
const isAdmin = this.props.isAdmin() if (!isAdminOrStudent && discussMessage.is_public == false) {
const isAdminOrStudent = this.props.isAdminOrStudent() // 没有权限访问
const { checkBox, discussMessage, onSticky, onItemClick, current_user } = this.props; return;
if (!discussMessage || !discussMessage.author) { }
return ''; const cid = this.props.match.params.coursesId
} const board_id = this.props.match.params.boardId
let canNotLink = !isAdminOrStudent && discussMessage.is_public == false this.props.toDetailPage(cid, board_id, discussMessage.id)
}
return( render(){
<div className="panel-inner-fourm boardsList"> let { addGroup } = this.state;
<style>{` const isAdmin = this.props.isAdmin()
.boardsList .panel-list-img { const isAdminOrStudent = this.props.isAdminOrStudent()
width: 50px; const { checkBox, discussMessage, onSticky, onItemClick, current_user } = this.props;
height: 50px; if (!discussMessage || !discussMessage.author) {
} return '';
`}</style> }
{ checkBox } let canNotLink = !isAdminOrStudent && discussMessage.is_public == false
<a href={`/users/${discussMessage.author.login}`} alt="用户" style={{"width":"50px","height":"50px","display":"block", margin: "0 10px"}}>
{/* /images/avatars/User/1?1529221779 */} return(
<img <div className="panel-inner-fourm boardsList">
alt="1?1529221779" className="panel-list-img mr15" height="50" <style>{`
src={`${getUrl()}/images/${discussMessage.author.image_url}`} width="50" .boardsList .panel-list-img {
></img> width: 50px;
</a> height: 50px;
<div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}> }
<h6> `}</style>
<a href="javascript:void(0)" className="panel-list-title hide fl mt5 color-dark font-bd" { checkBox }
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'default' : 'poninter'), maxWidth: '700px' }} <a href={`/users/${discussMessage.author.login}`} alt="用户" style={{"width":"50px","height":"50px","display":"block", margin: "0 10px"}}>
onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)} {/* /images/avatars/User/1?1529221779 */}
title={`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`} <img
>{discussMessage.subject}</a> alt="1?1529221779" className="panel-list-img mr15" height="50"
{ !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> } src={`${getUrl()}/images/${discussMessage.author.image_url}`} width="50"
{ ></img>
</a>
discussMessage.is_public == false ? (<Tooltip title={`${isAdminOrStudent ? '私有属性' : '私有属性,非课堂成员不能访问'}`}> <div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}>
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i> <h6>
</Tooltip>) : "" <Tooltip title={canNotLink?"私有属性,非课堂成员不能访问":`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`} placement="bottom">
} <a className="panel-list-title hide fl mt5 color-dark font-bd pointer"
</h6> style={{ fontWeight: 'bold', cursor: (canNotLink ? 'poninter' : 'poninter'), maxWidth: '700px' }}
onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)}
<div className="cl"></div> >{discussMessage.subject}</a>
<p className="color-grey panel-lightgrey mt18 fl"> </Tooltip>
<span className="mr50"> { !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> }
<a href={`/users/${discussMessage.author.login}`} className="panel-name-small hide fl mr15 mr30 color-grey3 font-14">{discussMessage.author.name}</a> {
{ discussMessage.total_replies_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.total_replies_count} 回复</span> } discussMessage.is_public == false ? (<Tooltip title={`${isAdminOrStudent ? '私有属性' : '私有属性,非课堂成员不能访问'}`} placement="bottom">
{ discussMessage.praises_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.praises_count} 点赞</span> } <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i>
{ discussMessage.visits != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.visits} 浏览</span> } </Tooltip>) : ""
}
<span className="mr15 color-light-grey-C font-14">{moment(discussMessage.created_on).fromNow()} </span> </h6>
</span>
</p> <div className="cl"></div>
<div className="fr mt15"> <p className="color-grey panel-lightgrey mt18 fl">
{(isAdmin || discussMessage.author.login == current_user.login) && <span className="mr50">
<WordsBtn style="blue" className="fl font-16 ml28" <a href={`/users/${discussMessage.author.login}`} className="panel-name-small hide fl mr15 mr30 color-grey3 font-14">{discussMessage.author.name}</a>
onClick={(e) => { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑</WordsBtn> }
{ discussMessage.total_replies_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.total_replies_count} 回复</span> }
{ isAdmin && <WordsBtn style="blue" className="fl font-16 ml28" { discussMessage.praises_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.praises_count} 点赞</span> }
onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> { discussMessage.visits != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.visits} 浏览</span> }
{ discussMessage.sticky ? '取消置顶' : '置顶' }</WordsBtn> }
</div> <span className="mr15 color-light-grey-C font-14">{moment(discussMessage.created_on).fromNow()} </span>
</span>
</p>
<div className="fr mt15">
{(isAdmin || discussMessage.author.login == current_user.login) &&
<WordsBtn style="blue" className="fl font-16 ml28"
{/* { (isAdmin || discussMessage.author.login == current_user.login) && onClick={(e) => { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑</WordsBtn> }
<div className="homepagePostSetting" style={{"right":"4px","top":"5px","display":"block"}}>
<ul> { isAdmin && <WordsBtn style="blue" className="fl font-16 ml28"
<li className="edu-position edu-position-hidebox"> onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}>
<i className="fa fa-bars color-grey-b"></i> { discussMessage.sticky ? '取消置顶' : '置顶' }</WordsBtn> }
<ul className="edu-position-hide undis"> </div>
{(isAdmin || discussMessage.author.login == current_user.login) && <li><a href="javascript:void(0)" onClick={(e) => {
this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} } >编辑</a></li>
}
{isAdmin && <li><a href="javascript:void(0)" onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();} }>
{ discussMessage.sticky ? '取消置顶' : '置顶' }
</a></li> {/* { (isAdmin || discussMessage.author.login == current_user.login) &&
} <div className="homepagePostSetting" style={{"right":"4px","top":"5px","display":"block"}}>
</ul> <ul>
</li> <li className="edu-position edu-position-hidebox">
</ul> <i className="fa fa-bars color-grey-b"></i>
</div> <ul className="edu-position-hide undis">
} */} {(isAdmin || discussMessage.author.login == current_user.login) && <li><a href="javascript:void(0)" onClick={(e) => {
this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} } >编辑</a></li>
}
</div> {isAdmin && <li><a href="javascript:void(0)" onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();} }>
</div> { discussMessage.sticky ? '取消置顶' : '置顶' }
) </a></li>
} }
} </ul>
</li>
</ul>
</div>
} */}
</div>
</div>
)
}
}
export default BoardsListItem; export default BoardsListItem;

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

@ -641,7 +641,7 @@ class CommonWorkList extends Component{
timeMsg = '申诉剩余时间' 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(StudentData)
// console.log(student_works) // console.log(student_works)

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

@ -181,7 +181,7 @@ class Coursesleftnav extends Component{
on('editshixunname',this.editshixunchild) on('editshixunname',this.editshixunchild)
on('editshixunmainname',this.editshixunmainname) on('editshixunmainname',this.editshixunmainname)
this.props.updataleftNavfun(); // this.props.updataleftNavfun();
// this.props.getleftNavid && this.props.getleftNavid("shixun_homework"); // this.props.getleftNavid && this.props.getleftNavid("shixun_homework");
// const position =parseInt(this.props.match.params.position); // const position =parseInt(this.props.match.params.position);
@ -239,50 +239,52 @@ class Coursesleftnav extends Component{
setnavid=(e,key,id,type,url)=>{ setnavid=(e,key,id,type,url)=>{
// this.props.getleftNavid && this.props.getleftNavid(key,type); // this.props.getleftNavid && this.props.getleftNavid(key,type);
let {selectnavid,navid}=this.state; // let {selectnavid,navid}=this.state;
//
if(navidtype===true&&selectnavid===false){ // if(navidtype===true&&selectnavid===false){
//
if(navid===key){ // if(navid===key){
this.setState({ // this.setState({
navid:"", // navid:"",
selectnavid:false, // selectnavid:false,
newselectnavid:id // newselectnavid:id
}) // })
}else{ // }else{
this.setState({ // this.setState({
navid:key, // navid:key,
positiontype:type, // positiontype:type,
selectnavid:false, // selectnavid:false,
newselectnavid:id // newselectnavid:id
}) // })
} // }
}else{ // }else{
// console.log(navidtype) // // console.log(navidtype)
// console.log(selectnavid) // // console.log(selectnavid)
this.setState({ // this.setState({
navid:"", // navid:"",
selectnavid:false, // selectnavid:false,
newselectnavid:id // newselectnavid:id
}) // })
} // }
this.props.updataleftNavfun(); //
this.props.history.replace( url ); // this.props.updataleftNavfun();
e.stopPropagation();//阻止冒泡 // this.props.history.replace( url );
// e.stopPropagation();//阻止冒泡
this.selectnavid(e,key,id,type,url)
} }
selectnavid=(e,key,id,type,urls,index)=>{ selectnavid=(e,key,id,type,urls,index)=>{
let {url}=this.state; let {url}=this.state;
if(urls!=url){ if(urls!=url){
this.props.updataleftNavfun();
this.props.history.replace(urls); this.props.history.replace(urls);
this.props.updataleftNavfun();
}else{ }else{
if (key === this.props.indexs) { if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined) this.props.unlocationNavfun(undefined)
} else { } else {
this.props.updataleftNavfun();
this.props.unlocationNavfun(key) this.props.unlocationNavfun(key)
this.props.history.replace(urls); this.props.history.replace(urls);
} }
@ -304,8 +306,9 @@ class Coursesleftnav extends Component{
url:urls, url:urls,
indexs:index indexs:index
}) })
this.props.updataleftNavfun();
this.props.history.replace(urls); this.props.history.replace(urls);
this.props.updataleftNavfun();
} }
@ -721,24 +724,27 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡 e.stopPropagation();//阻止冒泡
} }
showsandians=(e,key,urls,num)=> { showsandians=(e,key,urls,num,id,type,index)=> {
let {url}=this.state; let {url}=this.state;
if (key === this.props.indexs) { if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined) this.props.unlocationNavfun(undefined)
this.props.history.replace(urls); this.props.history.replace(urls);
} else { } else {
this.props.updataleftNavfun();
this.props.unlocationNavfun(key) this.props.unlocationNavfun(key)
this.props.history.replace(urls); this.props.history.replace(urls);
} }
if(urls!=url){ if(urls!=url){
this.props.updataleftNavfun();
this.props.history.replace(urls); this.props.history.replace(urls);
} }
// if(this.props.indexs===undefined){ this.setState({
// selectnavid:true,
// }else{ newselectnavid:id,
// url:urls,
// } indexs:index
})
} }
maincontent=(item,key)=>{ maincontent=(item,key)=>{
@ -930,8 +936,8 @@ class Coursesleftnav extends Component{
return( return(
<div key={key} > <div key={key} >
<a> <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)}> <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)} 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"}> <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==="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>: 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} ref={provided.innerRef}
{...provided.droppableProps} {...provided.droppableProps}
className={"droppableul"} 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)=>{ {item.second_category===undefined?"":item.second_category.map((iem,index)=>{
if(item.type==="course_group"){ if(item.type==="course_group"){
@ -1044,7 +1050,7 @@ class Coursesleftnav extends Component{
<div key={key}> <div key={key}>
{/*<Tooltip placement="bottom" title={"点击空白处展开二级菜单,点击模块名字跳转到对应模块"}>*/} {/*<Tooltip placement="bottom" title={"点击空白处展开二级菜单,点击模块名字跳转到对应模块"}>*/}
<a > <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)} 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} title={item.name.length<7?"":item.name}
> >
@ -1069,11 +1075,8 @@ class Coursesleftnav extends Component{
</a> </a>
</li> </li>
</a> </a>
{/*</Tooltip>*/}
{/*下拉列表*/} <ul style={{display:key===this.props.indexs?"":"none"}} class="droppableul">
{/* 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">
{ {
item.second_category===undefined?"":item.second_category.map((iem,index)=>{ item.second_category===undefined?"":item.second_category.map((iem,index)=>{
@ -1115,72 +1118,3 @@ class Coursesleftnav extends Component{
export default Coursesleftnav; 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,21 @@ class ExerciseListItem extends Component{
Loadtype:false Loadtype:false
}) })
} }
toDetailPage=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
this.props.history.push(url);
}
render(){ render(){
let{item,checkBox,index}=this.props; let{item,checkBox,index}=this.props;
let {coursesId,Id}=this.props.match.params let {coursesId,Id}=this.props.match.params
@ -96,20 +111,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>*/} {/*<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} 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()? 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 ? 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> <Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
: <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>:"" <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 +167,13 @@ class ExerciseListItem extends Component{
{ {
item.exercise_status ===2? item.exercise_status ===2?
<Tooltip title="提交剩余时间" placement="bottom"> <Tooltip title="提交剩余时间" placement="bottom">
<span className="mr20 fl">{item.exercise_left_time}</span> <span className="mr20 fl">{"提交剩余时间:"+item.exercise_left_time}</span>
</Tooltip>:"" </Tooltip>:""
} }
{ {
item.exercise_status ===3? item.exercise_left_time===null?"":item.exercise_status ===3?
<Tooltip title="截止剩余时间" placement="bottom"> <Tooltip title="截止剩余时间" placement="bottom">
<span className="mr20 fl">{item.exercise_left_time}</span> <span className="mr20 fl">{"截止剩余时间:"+item.exercise_left_time}</span>
</Tooltip>:"" </Tooltip>:""
} }
{/*{*/} {/*{*/}

@ -133,6 +133,21 @@ class GraduateTaskItem extends Component{
setupdate=()=>{ setupdate=()=>{
this.props.funlist this.props.funlist
} }
toDetailPage=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
this.props.history.push(url);
}
render(){ render(){
let { let {
Modalstype, Modalstype,
@ -215,20 +230,22 @@ class GraduateTaskItem extends Component{
<h6> <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} 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} 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? 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> <Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
:<a href={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list"} <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} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }
@ -256,8 +273,8 @@ class GraduateTaskItem extends Component{
{discussMessage.commit_count===undefined?"":<span className="mr15 color-grey9 font-14">{discussMessage.commit_count} 已交</span>} {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>} {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>*/} {/*<span className="mr15 color-grey9">{discussMessage.replies_count} 3 未评</span>*/}
<Tooltip title={discussMessage.task_status===1?"提交剩余时间":discussMessage.task_status===2?"补交剩余时间":""} placement="bottom"> <Tooltip title={discussMessage.task_status===1?"提交剩余时间":discussMessage.task_status===2?"补交剩余时间":discussMessage.task_status===3?"交叉评阅剩余时间":""} placement="bottom">
<span className="mr15 color-grey9 font-14">{discussMessage.status_time}</span> <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> </Tooltip>
{/* { discussMessage.replies_count != 0 && <span className="mr15 color-grey9">{discussMessage.replies_count} </span> } {/* { 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="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36">
<div className={" font-16 color-dark h20 mb20"}>评分设置 </div> <div className={" font-16 color-dark h20 mb20"}>评分设置 </div>
<div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>取各教师最终评分的平均分</span></div> <div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>取各教师最终评分的平均分</span></div>
<Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment} <Tooltip placement="bottom" title={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?"正在交叉评阅,不可取消":"":"":""}>
disabled={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?true:false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span> <Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment}
</Checkbox> 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> {crosscomment===true?<div>
<div className={"h20 mb30 ml30 mt20 ml87"}> <div className={"h20 mb30 ml30 mt20 ml87"}>
<span>开始时间</span> <span>开始时间</span>

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

@ -15,6 +15,17 @@ class GraduateTopicItem extends Component{
this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/edit`); this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/edit`);
} }
toDetailPage=(topicId)=>{ toDetailPage=(topicId)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`); this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`);
} }
@ -71,7 +82,9 @@ class GraduateTopicItem extends Component{
<h6> <h6>
{ {
isNotMember? 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>:""
} }
{ {

@ -1,5 +1,5 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import Tooltip from 'material-ui/Tooltip'; import {Tooltip} from 'antd';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import moment from 'moment'; import moment from 'moment';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
@ -15,6 +15,20 @@ class PollListItem extends Component{
constructor(props){ constructor(props){
super(props); super(props);
} }
toDetailPage=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
this.props.history.push(url);
}
render(){ render(){
let{item,checkBox,courseType,index}=this.props; let{item,checkBox,courseType,index}=this.props;
let {coursesId}=this.props.match.params; let {coursesId}=this.props.match.params;
@ -37,12 +51,16 @@ class PollListItem extends Component{
} }
<div className="flex1 pr"> <div className="flex1 pr">
<p className="clearfix mb30"> <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> : { canNotLink ?
<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> <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 ? 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> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip> </Tooltip>
:"" :""
@ -73,7 +91,7 @@ class PollListItem extends Component{
{ {
item.polls_status ==2 && item.publish_time !=null && item.polls_status ==2 && item.publish_time !=null &&
<Tooltip title="提交剩余时间"> <Tooltip title="提交剩余时间">
<span className="mr20 fl mt3">{formatDuring(t)}</span> <span className="mr20 fl mt3">{"提交剩余时间:"+formatDuring(t)}</span>
</Tooltip> </Tooltip>
} }
{ {

@ -3320,7 +3320,7 @@ class Listofworksstudentone extends Component {
<div className="clearfix"> <div className="clearfix">
<span className="fl color-grey-6 font-12"><span <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> <style>
{ {
` `

@ -143,6 +143,22 @@ class ShixunhomeWorkItem extends Component{
ModalsRenametype:false, ModalsRenametype:false,
}) })
} }
hrefjumpskip=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
this.props.history.push(url);
}
render(){ render(){
let { let {
Modalstype, Modalstype,
@ -294,23 +310,25 @@ class ShixunhomeWorkItem extends Component{
{/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} {/*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} 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} 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? 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> <Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
: <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`} <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} 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>:""
} }

@ -137,7 +137,7 @@ class Trainingjobsetting extends Component {
componentDidMount() { componentDidMount() {
console.log("Trainingjobsetting"); console.log("Trainingjobsetting");
console.log("componentDidMount"); console.log("componentDidMount");
this.getTrainingjobsetting(); this.getTrainingjobsetting(true);
let query = this.props.location.pathname; let query = this.props.location.pathname;
const type = query.split('/'); const type = query.split('/');
this.setState({ this.setState({
@ -165,7 +165,7 @@ class Trainingjobsetting extends Component {
// } // }
// 获取数据地方 // 获取数据地方
getTrainingjobsetting = () => { getTrainingjobsetting = (bool) => {
// console.log("getTrainingjobsetting") // console.log("getTrainingjobsetting")
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid) // console.log(homeworkid)
@ -293,6 +293,14 @@ class Trainingjobsetting extends Component {
code_review:result.data.code_review code_review:result.data.code_review
}) })
this.props.Getdataback(result,result.data); 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 description:result.data.message
}); });
this.homeworkhide(); this.homeworkhide();
this.getTrainingjobsetting(); this.getTrainingjobsetting(false);
} }
} }
@ -1623,7 +1631,7 @@ class Trainingjobsetting extends Component {
// message:"提示", // message:"提示",
// description:response.data.message // description:response.data.message
// }); // });
this.getTrainingjobsetting(); this.getTrainingjobsetting(false);
this.homeworkhide() this.homeworkhide()
} }
}) })
@ -1814,7 +1822,7 @@ class Trainingjobsetting extends Component {
if(moment(datas.data.late_time,"YYYY-MM-DD HH:mm")<=moment()){ if(moment(datas.data.late_time,"YYYY-MM-DD HH:mm")<=moment()){
endtime=false; endtime=false;
} }
if(datas.data.allowreplenishment === false){ if(datas.data.allow_late === false){
whethertopays=false; whethertopays=false;
} }
@ -1829,15 +1837,16 @@ class Trainingjobsetting extends Component {
flagPageEditsfor:endtime, flagPageEditsfor:endtime,
completionefficiencyscore:true, completionefficiencyscore:true,
work_efficiencys:true, work_efficiencys:true,
unifiedsetting:datas.data.unifiedsetting, unifiedsetting:datas.data.unified_setting,
latedeductiontwo:20, latedeductiontwo:20,
}); });
//均分比例 //均分比例
// result.data.shixun_evaluation === 0 ? "均分比例" : result.data.shixun_evaluation === 1 ? "经验值比例" : result.data.shixun_evaluation === 2 ?
try { try {
if(datas.data.proportion==="均分比例"){ if(datas.data.shixun_evaluation === 0){
this.Equalproportion(20); this.Equalproportion(20);
}else if(datas.data.proportion==="经验值比例"){ }else if(datas.data.shixun_evaluation === 1){
this.Empiricalvalueratio(20); this.Empiricalvalueratio(20);
} }
@ -1853,9 +1862,9 @@ class Trainingjobsetting extends Component {
flagPageEditstwo:releasetime, flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline, flagPageEditsthrees:deadline,
flagPageEditsfor:endtime, 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({ this.setState({
completionefficiencyscore:true, completionefficiencyscore:true,
}) })
@ -1873,9 +1882,9 @@ class Trainingjobsetting extends Component {
flagPageEditstwo:releasetime, flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline, flagPageEditsthrees:deadline,
flagPageEditsfor:endtime, 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({ this.setState({
completionefficiencyscore:true, completionefficiencyscore:true,
}) })
@ -1886,7 +1895,7 @@ class Trainingjobsetting extends Component {
} }
} }
if(datas.data.proportion === "自定义分值"){ if(datas.data.shixun_evaluation === 2){
this.setState({ this.setState({
boolUnitetwoname:"自定义分值", boolUnitetwoname:"自定义分值",
boolUnitetwo: false, boolUnitetwo: false,
@ -1920,7 +1929,7 @@ class Trainingjobsetting extends Component {
unit_e_tip: "", unit_e_tip: "",
}) })
this.refs.targetElementTrainingjobsetting.scrollIntoView(); this.refs.targetElementTrainingjobsetting.scrollIntoView();
this.getTrainingjobsetting(); this.getTrainingjobsetting(false);
} }
rulesCheckInfo=(rules)=>{ rulesCheckInfo=(rules)=>{

@ -84,7 +84,8 @@ class ShixunHomework extends Component{
} }
componentDidMount() { componentDidMount() {
this.setState({ this.setState({
isSpin:true isSpin:true,
}) })
if(this.props.match.params.main_id){ if(this.props.match.params.main_id){
this.setState({ this.setState({
@ -108,7 +109,8 @@ class ShixunHomework extends Component{
} }
seactall=(id)=>{ seactall=(id)=>{
this.setState({ this.setState({
isSpin:true isSpin:true,
checkBoxValues:[]
}) })
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
let url="/courses/"+coursesId+"/homework_commons.json?type=4"; let url="/courses/"+coursesId+"/homework_commons.json?type=4";
@ -1080,7 +1082,7 @@ class ShixunHomework extends Component{
</span>: </span>:
<WordsBtn style="blue" onClick={()=>this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:""} <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?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> </li>
</p> </p>

@ -399,8 +399,14 @@ class LoginDialog extends Component {
} }
handleDialogClose = () => { handleDialogClose = () => {
console.log(this.props.match)
debugger
if(this.props.match===undefined){ if(this.props.match===undefined){
window.location.href="/"; window.location.href="/";
// this.setState({
// isRender: false
// })
// this.props.Modifyloginvalue();
}else{ }else{
this.setState({ this.setState({
isRender: false isRender: false

@ -514,8 +514,8 @@ class MessagSub extends Component {
<li className={typeysl && typeysl === "project" ? "active" : ""}><a <li className={typeysl && typeysl === "project" ? "active" : ""}><a
onClick={(s, i) => this.getdata("project", 1)}>项目提醒</a></li> onClick={(s, i) => this.getdata("project", 1)}>项目提醒</a></li>
<li className={typeysl && typeysl === "project_package" ? "active" : ""}><a {/*<li className={typeysl && typeysl === "project_package" ? "active" : ""}><a*/}
onClick={(s, i) => this.getdata("project_package", 1)}>众包提醒</a></li> {/*onClick={(s, i) => this.getdata("project_package", 1)}>众包提醒</a></li>*/}
<li className={typeysl && typeysl === "interaction" ? "active" : ""}><a <li className={typeysl && typeysl === "interaction" ? "active" : ""}><a
onClick={(s, i) => this.getdata("interaction", 1)}>互动提醒</a></li> 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 {Tooltip,Modal,Icon,Spin,message} from 'antd';
import DetailCardsEditAndAdd from './DetailCardsEditAndAdd'; import DetailCardsEditAndAdd from './DetailCardsEditAndAdd';
import DetailCardsEditAndEdit from './DetailCardsEditAndEdit'; import DetailCardsEditAndEdit from './DetailCardsEditAndEdit';
import AccountProfile from"../../user/AccountProfile";
import { BrowserRouter as Router, Route, Link } from "react-router-dom"; import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import axios from 'axios'; import axios from 'axios';
import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd'; import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
@ -201,10 +200,8 @@ class DetailCards extends Component{
return return
} }
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.checkIfProfileCompleted()===false){
this.setState({ this.props.showProfileCompleteDialog()
AccountProfiletype:true
})
return return
} }
@ -308,16 +305,11 @@ class DetailCards extends Component{
startshixunCombattype:false startshixunCombattype:false
}) })
} }
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render(){ render(){
let { pathCardsList, let { pathCardsList,
dropid, dropid,
AccountProfiletype,
idsum, idsum,
pathCardsedittype, pathCardsedittype,
pathlistedit, pathlistedit,
@ -339,11 +331,7 @@ class DetailCards extends Component{
// console.log("zzz"+this.props.MenuItemsindextype) // console.log("zzz"+this.props.MenuItemsindextype)
return( return(
<div> <div>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
{...this.state}
/>:""}
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
@ -495,7 +483,7 @@ class DetailCards extends Component{
: :
<li className={showparagraph===false?"none":"fr status_li"}> <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> <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>} {line.shixun_status==="暂未公开"?"":<a onClick={()=>this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始实战</a>}
</div>:"" </div>:""

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

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

@ -5,7 +5,6 @@ import SendPanel from "./sendPanel.js";
import { getImageUrl } from 'educoder'; import { getImageUrl } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
import AccountProfile from"../../user/AccountProfile";
import OpenCourse from './OpenCourse'; import OpenCourse from './OpenCourse';
import Jointheclass from '../../modals/Jointheclass'; import Jointheclass from '../../modals/Jointheclass';
import './DetailTop.css'; import './DetailTop.css';
@ -30,7 +29,7 @@ class DetailTop extends Component{
Pathcourseid:undefined, Pathcourseid:undefined,
OpenCourseTypes:false, OpenCourseTypes:false,
putappointmenttype:false, putappointmenttype:false,
getappointmenttype:false getappointmenttype:false,
} }
} }
componentDidMount(){ componentDidMount(){
@ -250,7 +249,7 @@ class DetailTop extends Component{
return return
} }
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog() this.props.showProfileCompleteDialog()
return return
} }
@ -269,10 +268,8 @@ class DetailTop extends Component{
return return
} }
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.checkIfProfileCompleted()===false){
this.setState({ this.props.showProfileCompleteDialog()
AccountProfiletype:true
})
return return
} }
@ -336,14 +333,10 @@ class DetailTop extends Component{
}) })
} }
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render(){ render(){
let{detailInfoList}=this.props; 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 = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
@ -373,11 +366,7 @@ class DetailTop extends Component{
return( 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"}> <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 <Modals
modalsType={Modalstype} modalsType={Modalstype}

@ -167,7 +167,7 @@ class TPMBanner extends Component {
this.props.showLoginDialog() this.props.showLoginDialog()
return return
} }
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.checkIfProfileCompleted()===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })
@ -390,7 +390,7 @@ class TPMBanner extends Component {
return return
} }
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.checkIfProfileCompleted()===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })

@ -52,7 +52,7 @@ export default class TPMUpdatepropaede extends Component {
updatepropaedeuticsvalue=()=>{ updatepropaedeuticsvalue=()=>{
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let url="/shixuns/"+id+"/update_propaedeutics.json"; 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,{ axios.post(url,{
content:update_propaedeuticsvalue content:update_propaedeuticsvalue
} }

@ -228,7 +228,7 @@ class Challenges extends Component {
} }
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.checkIfProfileCompleted()===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })

@ -34,7 +34,7 @@ class Collaborators extends Component {
Collaboratorsvisibleadmin: false, Collaboratorsvisibleadmin: false,
value: 1, value: 1,
page: 1, page: 1,
Searchadmin: [], Searchadmin: undefined,
allChangechecked: false, allChangechecked: false,
Collaboratorslist: [], Collaboratorslist: [],
Collaboratorslisttype: false, Collaboratorslisttype: false,
@ -434,10 +434,10 @@ class Collaborators extends Component {
height: '30px', height: '30px',
lineHeight: '30px', lineHeight: '30px',
}; };
// console.log(collaboratorList)
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />; const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
console.log(Searchadmin)
return ( return (
<React.Fragment> <React.Fragment>
<p className="clearfix mt30" <p className="clearfix mt30"
@ -533,9 +533,9 @@ class Collaborators extends Component {
<Spin indicator={antIcon} spinning={this.state.spinnings}> <Spin indicator={antIcon} spinning={this.state.spinnings}>
<div className="clearfix"> <div className="clearfix">
<ul className="upload_select_box fl" id="search_not_teachers_list" onScroll={this.contentViewScrolledit}> <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> <span>请试试搜索一下</span>
</li> : Searchadmin.map((item, key) => { </li>:Searchadmin.length === 0 ? "": Searchadmin.map((item, key) => {
return ( return (
<li key={key} style={{display: item.identify === "专业人士" ? "none" : "block"}}> <li key={key} style={{display: item.identify === "专业人士" ? "none" : "block"}}>
<Checkbox className="fl mr20" checked={item.checked} <Checkbox className="fl mr20" checked={item.checked}

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

Loading…
Cancel
Save