资源调整 课堂设置提示调整

competitions
杨树明 6 years ago
parent 451cb163ba
commit c9f69cae9b

@ -21,16 +21,16 @@ let hashTimeout
// TODO 开发期多个身份切换 // TODO 开发期多个身份切换
let debugType ="" let debugType =""
// if (isDev) { if (isDev) {
// const _search = window.location.search; const _search = window.location.search;
// let parsed = {}; let parsed = {};
// if (_search) { if (_search) {
// parsed = queryString.parse(_search); parsed = queryString.parse(_search);
// } }
// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
// window.location.search.indexOf('debug=s') != -1 ? 'student' : window.location.search.indexOf('debug=s') != -1 ? 'student' :
// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
// } }
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {
initOnlineOfflineListener() initOnlineOfflineListener()
@ -84,9 +84,9 @@ export function initAxiosInterceptors(props) {
} }
config.url = `${proxy}${url}`; config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) { if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`; config.url = `${config.url}?debug=${'teacher'}`;
} else { } else {
config.url = `${config.url}&debug=${debugType}`; config.url = `${config.url}&debug=${'teacher'}`;
} }
} else { } else {
// 加api前缀 // 加api前缀

@ -1217,7 +1217,7 @@ class CommonWorkSetting extends Component{
{/* 开启时间 */} {/* 开启时间 */}
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>
<span>开启时间</span> <span>开启时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}> <Tooltip placement="bottom" title={starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}>
<ConditionToolTip condition={moment(init_evaluation_start) < this.fetchMoment} title={this.props.isAdmin()?"时间已过,不能再修改":""}> <ConditionToolTip condition={moment(init_evaluation_start) < this.fetchMoment} title={this.props.isAdmin()?"时间已过,不能再修改":""}>
<span> <span>
<DatePicker <DatePicker
@ -1290,7 +1290,7 @@ class CommonWorkSetting extends Component{
{/* 匿评数量 */} {/* 匿评数量 */}
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>
<span>匿评数量</span> <span>匿评数量</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}> <Tooltip placement="bottom" title={starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}>
<span> <span>
<Input type="number" className="mr10" style={{width:"100px" }} value={evaluation_num} onInput={this.evaluation_num_change} <Input type="number" className="mr10" style={{width:"100px" }} value={evaluation_num} onInput={this.evaluation_num_change}
disabled={anonymous_comment && !noAuth? false : true} min={0} max={100} disabled={anonymous_comment && !noAuth? false : true} min={0} max={100}
@ -1303,7 +1303,7 @@ class CommonWorkSetting extends Component{
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>
<span>缺评扣分</span> <span>缺评扣分</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}> <Tooltip placement="bottom" title={starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}>
<span> <span>
<Input type="number" className="mr10" style={{width:"100px" }} value={absence_penalty} onInput={this.absence_penalty_change} <Input type="number" className="mr10" style={{width:"100px" }} value={absence_penalty} onInput={this.absence_penalty_change}
disabled={ anonymous_comment && !noAuth ? false : true} min={0} max={100} disabled={ anonymous_comment && !noAuth ? false : true} min={0} max={100}
@ -1378,7 +1378,7 @@ class CommonWorkSetting extends Component{
{/* 违规匿评扣分: */} {/* 违规匿评扣分: */}
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>
<span>违规匿评扣分</span> <span>违规匿评扣分</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}> <Tooltip placement="bottom" title={starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}>
<span> <span>
<Input type="number" className="mr10" style={{width:"100px" }} value={appeal_penalty} onInput={this.appeal_penalty_change} <Input type="number" className="mr10" style={{width:"100px" }} value={appeal_penalty} onInput={this.appeal_penalty_change}
disabled={ anonymous_appeal && !noAuth ? false : true} min={0} max={100} disabled={ anonymous_appeal && !noAuth ? false : true} min={0} max={100}
@ -1400,7 +1400,7 @@ class CommonWorkSetting extends Component{
</div> </div>
<div className={"mb30 ml60"}> <div className={"mb30 ml60"}>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}> <Tooltip placement="bottom" title={starttimetype===true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}>
<RadioGroup onChange={this.ta_mode_change} value={ta_mode}> <RadioGroup onChange={this.ta_mode_change} value={ta_mode}>
<Radio style={radioStyle} value={1} disabled={noAuth}> <Radio style={radioStyle} value={1} disabled={noAuth}>
普通模式<span className={"font-14 color-grey-9 ml10"}>选中则取各助教最终评分的平均分</span> 普通模式<span className={"font-14 color-grey-9 ml10"}>选中则取各助教最终评分的平均分</span>

@ -162,17 +162,7 @@ class CoursesBanner extends Component {
return json; return json;
}; };
showeditmenu = () => {
this.setState({
show: true,
})
}
hideeditmenu = () => {
this.setState({
show: false
})
}
tojoinclass = (val) => { tojoinclass = (val) => {
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.current_user&&this.props.current_user.profile_completed===false){
@ -201,13 +191,14 @@ class CoursesBanner extends Component {
yslJointhe:true yslJointhe:true
}) })
} }
showActionPoll=(i,s,ss)=>{ showActionPoll=(i,s,ss,trs)=>{
this.setState({ this.setState({
modalsType: true, modalsType: true,
modalsTopval: s, modalsTopval: s,
loadtype: false, loadtype: false,
metype: i, metype: i,
modalsBottomval: ss, modalsBottomval: ss,
modalstrsvalue:trs,
}) })
} }
ActionPoll = (i) => { ActionPoll = (i) => {
@ -248,9 +239,10 @@ class CoursesBanner extends Component {
} }
} }
if (i ===5) { if (i ===5) {
s = "复制”功能将会为您创建一个新的课堂旧课堂的作业、资源、试卷"; s = `“复制”功能将会为您创建一个新的课堂`;
ss = "都将被复制到新的课堂里面请问是否继续??"; ss = "请问是否继续?";
this.showActionPoll(i,s,ss) let mid="旧课堂的作业、资源、试卷都将被复制到新的课堂里面 ";
this.showActionPoll(i,s,ss,mid)
} }
} }
@ -261,7 +253,8 @@ class CoursesBanner extends Component {
modalsTopval: "", modalsTopval: "",
modalsBottomval:"", modalsBottomval:"",
loadtype: false, loadtype: false,
antIcon:false antIcon:false,
modalstrsvalue:undefined
}) })
} }
@ -483,7 +476,7 @@ class CoursesBanner extends Component {
render() { render() {
let { Addcoursestypes, coursedata,excellent, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide,AccountProfiletype} = this.state; let { Addcoursestypes, coursedata,excellent, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide,AccountProfiletype,modalstrsvalue} = this.state;
const isCourseEnd = this.props.isCourseEnd() const isCourseEnd = this.props.isCourseEnd()
document.title=coursedata===undefined || coursedata.status===401 || coursedata.status===407?"":coursedata.name; document.title=coursedata===undefined || coursedata.status===401 || coursedata.status===407?"":coursedata.name;
return ( return (
@ -513,6 +506,7 @@ class CoursesBanner extends Component {
modalsTopval={modalsTopval} modalsTopval={modalsTopval}
loadtype={loadtype} loadtype={loadtype}
modalsBottomval={modalsBottomval} modalsBottomval={modalsBottomval}
modalsMidval={modalstrsvalue}
modalCancel={this.modalCancel} modalCancel={this.modalCancel}
modalSave={this.ModalAction} modalSave={this.ModalAction}
antIcon={antIcon} antIcon={antIcon}

@ -242,7 +242,7 @@ class Selectsetting extends Component{
} }
delectcousedelectfils=(id)=>{ delectcousedelectfils=(id)=>{
const url = `/attachments/${id}.json`; const url = `/attachments/${id}.json?type=history`;
axios.delete(url) axios.delete(url)
.then((response) => { .then((response) => {

@ -652,6 +652,7 @@ class Exercisesetting extends Component{
<div className="clearfix" id={"publishtimeid"}> <div className="clearfix" id={"publishtimeid"}>
<span className="font-16 mr15 fl mt6">发布时间</span> <span className="font-16 mr15 fl mt6">发布时间</span>
<div className="fl"> <div className="fl">
<Tooltip placement="bottom" title={publish_timetype===true?this.props.isAdmin()? "发布时间已过,不能再修改":"":""}>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
placeholder="请选择发布时间" placeholder="请选择发布时间"
@ -666,6 +667,7 @@ class Exercisesetting extends Component{
value={publish_time && moment(publish_time,"YYYY-MM-DD HH:mm")} value={publish_time && moment(publish_time,"YYYY-MM-DD HH:mm")}
disabled={ publish_timetype===true?true:!flagPageEdit } disabled={ publish_timetype===true?true:!flagPageEdit }
></DatePicker> ></DatePicker>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}> <p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{ {
unit_p_tip !="" ? <span className="fl">{unit_p_tip}</span>:"" unit_p_tip !="" ? <span className="fl">{unit_p_tip}</span>:""

@ -1076,7 +1076,7 @@ debugger
<div className={"mt10 ml30"} > <div className={"mt10 ml30"} >
<span>截止时间</span> <span>截止时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()===true?"":this.props.isAdmin()===true?endtimetype===true?"时间已过,不能再修改":"":""}> <Tooltip placement="bottom" title={this.props.isAdmin()===true?endtimetype===true?"时间已过,不能再修改":"":""}>
<span> <span>
<DatePicker <DatePicker
showToday={false} showToday={false}

@ -555,7 +555,7 @@ class PollDetailTabForth extends Component{
<div className="clearfix mb5"> <div className="clearfix mb5">
<span className="font-16 mr15 fl mt6">发布时间</span> <span className="font-16 mr15 fl mt6">发布时间</span>
<div className="fl"> <div className="fl">
<Tooltip placement="bottom" title={un_change_unified ?this.props.isAdmin()? "发布时间已过,不能再修改":"":""}> <Tooltip placement="bottom" title={un_change_unified == true?this.props.isAdmin()? "发布时间已过,不能再修改":"":""}>
<span> <span>
<DatePicker <DatePicker
showToday={false} showToday={false}

@ -2190,7 +2190,7 @@ class Trainingjobsetting extends Component {
<div> <div>
<div className="clearfix mb5 ml15"> <div className="clearfix mb5 ml15">
<span className="font-16 fl mt3" style={{color:"#999999"}}>发布时间</span> <span className="font-16 fl mt3" style={{color:"#999999"}}>发布时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true && publish_timebool === true?this.props.isAdmin()?"发布时间已过,则不能修改":"": ""}> <Tooltip placement="bottom" title={!flagPageEditstwo === true && publish_timebool === true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}>
<div className="fl yskspickers"> <div className="fl yskspickers">
<DatePicker <DatePicker
showToday={false} showToday={false}

@ -35,6 +35,7 @@ render() {
<Spin indicator={antIcons} spinning={this.props.antIcon===undefined?false:this.props.antIcon} > <Spin indicator={antIcons} spinning={this.props.antIcon===undefined?false:this.props.antIcon} >
<div className="task-popup-content"> <div className="task-popup-content">
<p className="task-popup-text-center font-16">{this.props.modalsTopval}</p> <p className="task-popup-text-center font-16">{this.props.modalsTopval}</p>
{this.props.modalsMidval===undefined?"":<p className="task-popup-text-center font-16 mt5">{this.props.modalsMidval}</p>}
<p className="task-popup-text-center font-16 mt5">{this.props.modalsBottomval}</p> <p className="task-popup-text-center font-16 mt5">{this.props.modalsBottomval}</p>
{this.props.loadtype===true? {this.props.loadtype===true?
<div className="clearfix edu-txt-center mt20"> <div className="clearfix edu-txt-center mt20">

Loading…
Cancel
Save