Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/react/src/AppConfig.js
dev_forum
杨树林 5 years ago
commit 1b247f8f49

@ -78,6 +78,7 @@ class BoardsNew extends Component{
if (data) {
this.editTopic = data;
this.props.form.setFieldsValue({
sticky: !!data.sticky,
content: data.content,
subject: data.subject,
select_board_id: data.board_id // TODO 没返回给前端
@ -309,6 +310,14 @@ class BoardsNew extends Component{
label="标题"
className="topicTitle "
>
{getFieldDecorator('sticky', {
valuePropName: 'checked',
})(
<Checkbox style={{ right: '0px',
top: '-50px',
position: 'absolute'
}}>置顶</Checkbox>
)}
{getFieldDecorator('subject', {
rules: [{
required: true, message: '请输入标题',
@ -347,7 +356,7 @@ class BoardsNew extends Component{
)}
</Form.Item>
{ isAdmin && <Form.Item
{/* { isAdmin && <Form.Item
label=""
style={{ display: 'inline-block', marginLeft: "14px" }}
>
@ -355,7 +364,7 @@ class BoardsNew extends Component{
})(
<Checkbox>置顶</Checkbox>
)}
</Form.Item> }
</Form.Item> } */}
</div>
<style>{`
@ -380,6 +389,7 @@ class BoardsNew extends Component{
<Form.Item
label="内容"
className="mdInForm"
>
{getFieldDecorator('content', {
rules: [{

@ -1028,9 +1028,11 @@ class CommonWorkSetting extends Component{
<React.Fragment>
<div className={"h20 mb30 ml30"}>
<span>发布时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":publish_time_type===true?"发布时间已过,则不能修改":""}>
<span>
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":publish_time_type===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_publish_time) < moment()} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
@ -1051,17 +1053,18 @@ class CommonWorkSetting extends Component{
// return publish_time && publish_time < moment().add(-1, 'days'); }
// }
/>
</ConditionToolTip>
</span>
</Tooltip>
</ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生收到作业的时间</span>
</div>
<div className={"h20 mb30 ml30"}>
<span>截止时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":end_time_type===true?"截止时间已过,则不能修改":""}>
<span>
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":end_time_type===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_end_time) < moment()} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }}
@ -1087,9 +1090,9 @@ class CommonWorkSetting extends Component{
// return end_time.valueOf() < moment(publish_time, dateFormat).valueOf(); }
// }
/>
</ConditionToolTip>
</span>
</Tooltip>
</ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生按时提交作品的时间截点</span>
</div>
@ -1133,6 +1136,7 @@ class CommonWorkSetting extends Component{
<div className={" mb10 ml30"}>
<span>结束时间</span>
<ConditionToolTip condition={moment(init_late_time) < moment()} title={"时间已过,不能再修改"}>
<span>
<DatePicker
showToday={false}
dropdownClassName="hideDisable"
@ -1153,6 +1157,7 @@ class CommonWorkSetting extends Component{
// return late_time < moment(end_time, dateFormat).add(-1, 'days'); }
// }
/>
</span>
</ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生延时提交作品的时间截点</span>
{<div className={"latetimetype color-red "}>{latetimetype}</div>}
@ -1178,8 +1183,8 @@ class CommonWorkSetting extends Component{
<div className={"h20 mb30 ml60"}>
<span>开启时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}>
<span>
<ConditionToolTip condition={moment(init_evaluation_start) < moment()} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }}
@ -1200,16 +1205,17 @@ class CommonWorkSetting extends Component{
// return evaluation_start.valueOf() < moment(end_time, dateFormat).valueOf(); }
// }
/>
</ConditionToolTip>
</span>
</ConditionToolTip>
</Tooltip>
<span className={"font-14 color-grey-9 ml10"}>匿评开始时间之前提交作品的学生参与匿评</span>
</div>
<div className={"h20 mb30 ml60"}>
<span>结束时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}>
<span>
<ConditionToolTip condition={moment(init_evaluation_end) < moment()} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }}
@ -1230,15 +1236,18 @@ class CommonWorkSetting extends Component{
// return evaluation_end.valueOf() < moment(evaluation_start, dateFormat).valueOf(); }
// }
/>
</span>
</ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生匿评TA人作品的时间截点</span>
</span>
</Tooltip>
<span className={"font-14 color-grey-9 ml10"}></span>
</div>
{<div className={" anonymous_comment_time_tip color-red ml60"} style={{marginTop: '-6px'}}>{anonymous_comment_time_tip}</div>}
{/* marginTop: '-6px' */}
{<div className={" anonymous_comment_time_tip color-red ml60"} style={{}}>{anonymous_comment_time_tip}</div>}
{/* 匿评数量 */}
<div className={"h20 mb30 ml60"}>
@ -1301,9 +1310,10 @@ class CommonWorkSetting extends Component{
{/* 启用匿评申述 结束时间: */}
<div className={"h20 mb30 ml60"}>
<span>结束时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}>
<span>
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(init_appeal_time) < moment()} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }}
@ -1318,9 +1328,9 @@ class CommonWorkSetting extends Component{
onChange={this.appeal_time_change}
disabled={ (anonymous_appeal && !noAuth ? false : true) || moment(init_appeal_time) < moment()}
/>
</ConditionToolTip>
</span>
</Tooltip>
</ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生提交匿评申诉的时间截点</span>
</div>

@ -41,13 +41,20 @@ class CheckAllGroup extends Component{
const { checkAll, checkedValues } = this.state;
return (
<li className="clearfix">
<style>{`
.groupList .ant-checkbox-group-item{
margin-bottom:5px;
}
`}</style>
<span className="fl mr10 color-grey-8">{label}</span>
<span className="fl mr25">
<a href="javascript:void(0);" id="comment_no_limit" className={`pl10 pr10 ${checkAll ? 'check_on' : ''}`} onClick={this.onCheckAll}>不限</a>
</span>
<div className="fl groupList" style={{maxWidth:"990px"}}>
{
options.length > 1 && <CheckboxGroup options={options} onChange={this.onChange} value={checkedValues} style={checkboxGroupStyle}/>
}
</div>
</li>
)
}

@ -945,11 +945,20 @@ a.white-btn.use_scope-btn:hover{
font-size: 12px !important;
}
/* md编辑器在form中时使用这个样式可以把错误信息绝对定位 */
/* 去掉form下边距 */
.mdInForm.ant-form-item {
margin-bottom: 0px;
}
.mdInForm .has-error .ant-form-explain {
position: absolute;
margin-top: -2px;
margin-left: -7px;
}
/* 课堂下统一的form样式前缀 courseForm */
.courseForm .ant-select-selection--single, .courseForm .ant-select-selection__rendered{
height: 40px;
line-height: 40px;
}
/*新建课堂*/

@ -1,7 +1,7 @@
import React,{ Component } from "react";
import {Form,Checkbox,DatePicker,Button,Input,Select,Tooltip} from "antd";
import { handleDateString } from 'educoder';
import { handleDateString,ConditionToolTip } from 'educoder';
import PollDetailTabForthRules from './PollDetailTabForthRules'
import HomeworkModal from "../coursesPublic/HomeworkModal";
@ -586,6 +586,8 @@ class PollDetailTabForth extends Component{
<div className="clearfix mb5">
<span className="font-16 mr15 fl mt6">发布时间</span>
<div className="fl">
<Tooltip placement="bottom" title={un_change_unified ? "发布时间已过,不能再修改":""}>
<span>
<DatePicker
showToday={false}
dropdownClassName="hideDisable"
@ -600,6 +602,8 @@ class PollDetailTabForth extends Component{
value={publish_time && moment(publish_time,dataformat)}
disabled={un_change_unified == true ? true : !flagPageEdit }
></DatePicker>
</span>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>:""
@ -611,6 +615,8 @@ class PollDetailTabForth extends Component{
<div className="clearfix">
<span className="mr15 fl mt10 font-16">截止时间</span>
<div className="fl">
<Tooltip placement="bottom" title={un_change_end ? "截止时间已过,不能再修改":""}>
<span>
<DatePicker
showToday={false}
dropdownClassName="hideDisable"
@ -627,6 +633,8 @@ class PollDetailTabForth extends Component{
disabled={un_change_end == true ? true : !flagPageEdit }
>
</DatePicker>
</span>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span>:""

@ -390,6 +390,8 @@ class PollDetailTabForthRules extends Component{
</div>
</div>
<div className="fl pr20 with25">
<Tooltip placement="bottom" title={rule.e_timeflag ? "发布时间已过,不能再修改":""}>
<span>
<DatePicker
showToday={false}
dropdownClassName="hideDisable"
@ -404,6 +406,8 @@ class PollDetailTabForthRules extends Component{
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px",width:'100%'}}
></DatePicker>
</span>
</Tooltip>
<p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}>
{
rule.publish_flag && rule.publish_flag!=""?<span className="fl color-red mt10">{rule.publish_flag}</span>:""
@ -411,6 +415,8 @@ class PollDetailTabForthRules extends Component{
</p>
</div>
<div className="fl mr20">
<Tooltip placement="bottom" title={rule.e_timeflag ? "截止时间已过,不能再修改":""}>
<span>
<DatePicker
showToday={false}
dropdownClassName="hideDisable"
@ -425,6 +431,8 @@ class PollDetailTabForthRules extends Component{
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px"}}
></DatePicker>
</span>
</Tooltip>
<p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}>
{
rule.end_flag && rule.end_flag!=""?<span className="fl color-red mt10">{rule.end_flag}</span>:""

@ -70,9 +70,9 @@ class PollDetailTabThird extends Component{
<div className="previewList">
<p className="pl30 pr30 pt30 pb15 font-16 clearfix">
<span className="color-blue mr8 fl">{item.question.question_number}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10">必答</span>:"" }
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10">必答</span>:<span className="mustAnswer fl ml10 mr10"></span> }
{ item.question.question_type == 2 ?
<span className="color-grey-9">
<span className="color-grey-9 font-14 fl mt2">
{
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
"可选"+item.question.min_choices+"-"+item.question.max_choices+"项"

@ -185,10 +185,12 @@ class PollInfo extends Component{
flag=answers.indexOf(a_id) > -1?true:false;
answers= type == 1 ? answers[0] : answers;
}else{
flag=answers==a_id?true:false;
flag = answers==a_id?true:false;
}
if(answers && (answers.length>0 || answers !="")){
this.postAnswer(q_id,answers,flag ? inputs.text : "",key);
}
}
//提交主观题
commitText=(key,q_id)=>{
@ -379,13 +381,21 @@ class PollInfo extends Component{
<div className="previewList" id={'Anchor_'+`${key}`}>
<div className="pl30 pr30 mt30 mb10 clearfix">
<span className="color-blue fl font-16">{item.question.question_number}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mt5">必答</span>:"" }
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10 mt5">必答</span>:<span className="mustAnswer fl ml10 mr10 mt5"></span> }
{ item.question.question_type == 2 ?
<span className="color-grey-9 font-14 fl mt2">
{
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
"可选"+item.question.min_choices+"-"+item.question.max_choices+"项"
}
</span>:""
}
</div>
<li className="pl30 pr30 mb10 lineh-20">{item.question.question_title}</li>
{
//单选
item.question.question_type==1 &&
<Radio.Group disabled={isAdmin?true:false} className="answerList" defaultValue={item.question.poll_answer_ids[0]} name={[item.question.id,key]} onChange={this.ChangeOptionSingle}>
<Radio.Group disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false} className="answerList" defaultValue={item.question.poll_answer_ids[0]} name={[item.question.id,key]} onChange={this.ChangeOptionSingle}>
{
item.question.answers && item.question.answers.map((i,k)=>{
return(
@ -422,7 +432,12 @@ class PollInfo extends Component{
{
//多选
item.question.question_type==2 &&
<Checkbox.Group onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)} disabled={isAdmin?true:false} defaultValue={item.question.poll_answer_ids} className="answerList" name={key}>
<Checkbox.Group
onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)}
disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false}
defaultValue={item.question.poll_answer_ids}
className="answerList"
name={key}>
{
item.question.answers && item.question.answers.map((i,k)=>{
return(
@ -466,14 +481,13 @@ class PollInfo extends Component{
<React.Fragment>
{
j.id == item.question.id ?
<textarea placeholder="在此填入答案" disabled={isAdmin?true:false} value={j.text && j.text} className="winput-100-130" name={key} onInput={this.blurTxt} onBlur={()=>this.commitText(key,item.question.id)}></textarea>
<textarea placeholder="在此填入答案" disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1) ? true:false} value={j.text && j.text} className="winput-100-130" name={key} onInput={this.blurTxt} onBlur={()=>this.commitText(key,item.question.id)}></textarea>
: ""
}
</React.Fragment>
)
})
}
</div>
}

@ -45,6 +45,10 @@ class PollListItem extends Component{
item.lock_status === 0 ? <Tooltip title="私有属性,非课堂成员不能访问"><i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i></Tooltip>:""
}
<CoursesListType typelist={[polls_status[`${item.polls_status}`]]} typesylename={""}></CoursesListType>
{
isStudent && ((item.polls_status == 1 && (item.current_status ==0 ||item.current_status ==2)) || (item.polls_status==3 && item.current_status==2)) ?
<span className="edu-filter-btn edu-filter-btn-84B6EB ml15 fl typestyle">未提交</span>:""
}
</p>
<p className="color-grey-9 clearfix">
{

@ -33,8 +33,10 @@ if (!window['indexHOCLoaded']) {
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`));
// index.html有加载
// $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`));
// $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/css_min_all.css?1525440977`));

@ -302,8 +302,8 @@ export default class TPMMDEditor extends Component {
</div>
</div>
<div className={"fr rememberTip"}>
{noStorage == true ? '' : <p id={`e_tip_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
{noStorage == true ? '' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
{noStorage == true ? ' ' : <p id={`e_tip_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
{noStorage == true ? ' ' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
</div>
</React.Fragment>
)

Loading…
Cancel
Save