Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 6 years ago
commit e01e68d320

@ -478,10 +478,10 @@ pop_box_new(htmlvalue, 480, 182);
resData.myshixun_manager = true
} else if (resData.user.identity === EDU_CERTIFICATION_TEACHER) {
resData.power = 1
resData.is_teacher = true
// resData.is_teacher = true
} else if (resData.user.identity === EDU_TEACHER) {
resData.is_teacher = true
// resData.is_teacher = true
} else if (resData.user.identity === EDU_NORMAL) {
}

@ -121,9 +121,7 @@ class UseBank extends Component{
})
}
onSave = () => {
this.setState({
hometypepvisible:true
})
const { checkBoxValues } = this.state;
const { object_type } = this.props
if(checkBoxValues.length==0){
@ -132,6 +130,9 @@ class UseBank extends Component{
})
return;
}
this.setState({
hometypepvisible:true
})
const courseId = this.props.match.params.coursesId
let url = `/question_banks/save_banks.json`
this.setState({ loading: true })
@ -290,7 +291,7 @@ class UseBank extends Component{
</div>
}
<p style={{height:"20px",lineHeight:"20px;"}}>
<p style={{height:"20px",lineHeight:"20px;", marginTop: '4px'}}>
{
isChecked !="" ? <span className="color-red">{isChecked}</span>:""
}

@ -79,11 +79,9 @@ class TraineetraininginformationModal extends Component {
return str;
}
render() {
var columns;
console.log(83);
console.log(this.props.boolgalist);
if(this.props.boolgalist&&this.props.boolgalist === false) {
columns = [
const columns = [
{
title: '关卡',
dataIndex: 'number',
@ -150,9 +148,8 @@ class TraineetraininginformationModal extends Component {
),
}
]
}
else {
columns = [
const columnss = [
{
title: '关卡',
dataIndex: 'number',
@ -202,7 +199,7 @@ class TraineetraininginformationModal extends Component {
),
}
]
}
return (
<div>
<Modal
@ -246,6 +243,8 @@ class TraineetraininginformationModal extends Component {
</div>
</div>
{this.props.boolgalist === false?
<div>
{
this.props.game_list === undefined?"" : this.props.game_list.length<4?
<div className="edu-table edu-back-white ">
@ -288,6 +287,66 @@ class TraineetraininginformationModal extends Component {
}
</div>
:
<div>
{
this.props.game_list === undefined?"" : this.props.game_list.length<4?
<div className="edu-table edu-back-white ">
<style>
{
` .ant-table-body{
overflow: hidden !important;
}`
}
</style>
<div className={"both"}></div>
{this.props.game_list === undefined ? "" : <Table
className="mt20"
dataSource={this.props.game_list}
columns={columnss}
loading={false}
pagination={false}
onChange={this.TablePagination}
/>}
</div>
:
<div className="edu-table edu-back-white ">
<div className={"both"}></div>
{this.props.game_list === undefined ? "" : <Table
className="mt20"
dataSource={this.props.game_list}
columns={columnss}
pagination={{ //分页
total: this.props.game_list.length, //数据总数量
pageSize: this.props.game_list.length, //一页显示几条
current: 1,
}}
loading={false}
pagination={false}
onChange={this.TablePagination}
scroll={{ y: 300 }}
/>}
</div>
}
</div>
}
</Modal>

@ -91,7 +91,7 @@
}
/* icon */
.fa-check-circle, .fa-exclamation-circle {
margin-top: 6px!important;
margin-top: 2px!important;
}
.fa-unlock-alt, .fa-lock {
margin-right: 3px;
@ -107,10 +107,10 @@
#evaluating_contents {
padding-top: 6px;
padding-top: 8px;
}
#evaluating_contents .-text-danger{
padding-bottom: 6px;
/* padding-bottom: 6px; */
}
#evaluating_contents p.evaluateResult {
margin-bottom: 10px;

@ -180,8 +180,8 @@ class CodeEvaluateView extends Component {
<i className={`fa ${ 'fa-caret-right'} mr8 font-16`}
style={isExpanded ? {transform: 'rotate(90deg)'} : {}}></i>
<span className="font-14">测试集 {index + 1}</span>
{ headIconClass && <i className={`fa ${ headIconClass } fr mt8 ml5 font-16`}></i> }
{ _headLockIconClass && <i className={`fa ${ _headLockIconClass } fr mt8 ml5 font-16`}></i> }
{ headIconClass && <i className={`fa ${ headIconClass } fr mt2 ml5 font-16`}></i> }
{ _headLockIconClass && <i className={`fa ${ _headLockIconClass } fr mt2 ml5 font-16`}></i> }
</p>
</div>

@ -73,7 +73,7 @@ class LeftView extends Component {
// /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88
render() {
let { challenge, shixun, tabIndex, tabIndexChange, loading, discusses_count
, dialogOpen, handleDialogClose, handleDialogReadAnswer, gameAnswer, loadingComments, st, is_teacher,
, dialogOpen, handleDialogClose, handleDialogReadAnswer, gameAnswer, loadingComments, st, user,
classes, onDrawerButtonClick, lockedAnswers, unlockedAnswers, isMultiLevelAnswer } = this.props
let propaedeutics = shixun ? shixun.propaedeutics : null;
@ -95,7 +95,7 @@ class LeftView extends Component {
// TODO TEST
// isMultiLevelAnswer = true
// is_teacher = true;
const is_teacher = user.is_teacher
let contentText = is_teacher ?
<React.Fragment>
@ -113,15 +113,16 @@ class LeftView extends Component {
if (isMultiLevelAnswer) {
// power === 0 &&
contentText = ( is_teacher ) ?
           <React.Fragment>
            <p>{`已经过职业认证的教师可以免金币查看答案哟~`}</p><p><a
style={{textDecoration: 'underline'}} onClick={()=>this.goToCertification()}>立即认证</a></p>
            <React.Fragment>
             <p>{`已经过职业认证的教师可以免金币查看答案哟~`}</p>
<p><a style={{textDecoration: 'underline'}} onClick={()=>this.goToCertification()}
style={{ color: '#1890ff', 'margin-top': '6px', display: 'inline-block'}}>立即认证</a></p>
<CodeEvaluateMultiLevelAnswerUnlock
ref="answerUnlock" lockedAnswers={lockedAnswers} unlockedAnswers={unlockedAnswers}
challenge={challenge}
>
</CodeEvaluateMultiLevelAnswerUnlock>
           </React.Fragment>
            </React.Fragment>
              :
            <React.Fragment>
<p>{`先查看参考答案,再通过评测的学生,实训作业将被扣分`}</p>
@ -300,7 +301,7 @@ class LeftView extends Component {
{ lockedAnswers && lockedAnswers.map((item, index) => {
return <div class="anwserSection">
<div className="df">
<div className="level">级别{index + 1}</div>
<div className="level">级别{index + 1 + (unlockedAnswers ? unlockedAnswers.length : 0)}</div>
<div className="name">{item.name}</div>
<div
className="status" onClick={ () => { this.props.showUnlockAnswerDialog(item) } }

@ -46,7 +46,6 @@ class LeftViewContainer extends Component {
dialogOpen: false,
gameAnswer: '',
is_teacher: false,
// 评论
// comments: [],
@ -316,10 +315,8 @@ class LeftViewContainer extends Component {
lockedAnswers.push(item)
}
})
const is_teacher = this.props.user.identity === EDU_TEACHER
this.setState({
is_teacher,
tabIndex: 2,
lockedAnswers,
unlockedAnswers,
@ -360,9 +357,6 @@ class LeftViewContainer extends Component {
继续查看 立即认证新开页
*/
const is_teacher = response.data.is_teacher
// this.props.user.identity === EDU_TEACHER
// response.data.is_teacher;
// 答案测试 TODO
// if (false && response.data.view_answer === true) {
@ -370,15 +364,6 @@ class LeftViewContainer extends Component {
this.showAnswer(response.data.answer)
} else {
// 三个角色 普通用户、未认证教师、已认证教师,这里要区分普通用户和未认证教师用户
if (is_teacher) {
this.setState({
is_teacher: true
})
} else {
this.setState({
is_teacher: false
})
}
this.setState({
dialogOpen: true,
})

@ -130,7 +130,7 @@ button.buttonHoverColor:hover a {
right: inherit;
margin-left: 24px;
display: inline-block;
top: 10px;
top: 12px;
height: 32px;
padding: 3px 15px
}
@ -229,6 +229,9 @@ body>div[role=dialog]>div {
/* padding-bottom: 10px; */
}
/* tpi 窗口宽度*/
body>div[role=dialog]>div[role=document] {
border-radius: 10px;
}
#tpi-dialog>div[role=document] {
border-radius: 10px;
}

@ -948,7 +948,7 @@ class Newshixuns extends Component {
</Upload>
:
<Upload disabled={true} >
<Upload {...uploadProps} disabled={true} >
<Icon type="upload" className="fl mt5" > </Icon>
<span className="color-grey-c fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>

Loading…
Cancel
Save