dev_forum
hjm 5 years ago
parent 33dec0ccdb
commit ddaa4b91d4

@ -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) {
}

@ -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;
@ -110,7 +110,7 @@
padding-top: 6px;
}
#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,24 +113,25 @@ 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>
<CodeEvaluateMultiLevelAnswerUnlock
ref="answerUnlock" lockedAnswers={lockedAnswers} unlockedAnswers={unlockedAnswers}
challenge={challenge}
>
</CodeEvaluateMultiLevelAnswerUnlock>
           </React.Fragment>
            <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>
<p>{`先查看参考答案,再通过评测的学生,实训作业将被扣分`}</p>
{/* { MultiLevelUnlockTable } */}
<CodeEvaluateMultiLevelAnswerUnlock
ref="answerUnlock" lockedAnswers={lockedAnswers} unlockedAnswers={unlockedAnswers}
challenge={challenge}
>
</CodeEvaluateMultiLevelAnswerUnlock>
<p>{`先查看参考答案,再通过评测的学生,实训作业将被扣分`}</p>
{/* { MultiLevelUnlockTable } */}
<CodeEvaluateMultiLevelAnswerUnlock
ref="answerUnlock" lockedAnswers={lockedAnswers} unlockedAnswers={unlockedAnswers}
challenge={challenge}
>
</CodeEvaluateMultiLevelAnswerUnlock>
            </React.Fragment>;
}

@ -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,
})

@ -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;
}

Loading…
Cancel
Save