dev_forum
hjm 5 years ago
parent 33dec0ccdb
commit ddaa4b91d4

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

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

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

@ -73,7 +73,7 @@ class LeftView extends Component {
// /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88 // /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88
render() { render() {
let { challenge, shixun, tabIndex, tabIndexChange, loading, discusses_count 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 classes, onDrawerButtonClick, lockedAnswers, unlockedAnswers, isMultiLevelAnswer } = this.props
let propaedeutics = shixun ? shixun.propaedeutics : null; let propaedeutics = shixun ? shixun.propaedeutics : null;
@ -95,7 +95,7 @@ class LeftView extends Component {
// TODO TEST // TODO TEST
// isMultiLevelAnswer = true // isMultiLevelAnswer = true
// is_teacher = true; const is_teacher = user.is_teacher
let contentText = is_teacher ? let contentText = is_teacher ?
<React.Fragment> <React.Fragment>
@ -113,24 +113,25 @@ class LeftView extends Component {
if (isMultiLevelAnswer) { if (isMultiLevelAnswer) {
// power === 0 && // power === 0 &&
contentText = ( is_teacher ) ? contentText = ( is_teacher ) ?
           <React.Fragment>             <React.Fragment>
            <p>{`已经过职业认证的教师可以免金币查看答案哟~`}</p><p><a              <p>{`已经过职业认证的教师可以免金币查看答案哟~`}</p>
style={{textDecoration: 'underline'}} onClick={()=>this.goToCertification()}>立即认证</a></p> <p><a style={{textDecoration: 'underline'}} onClick={()=>this.goToCertification()}
<CodeEvaluateMultiLevelAnswerUnlock style={{ color: '#1890ff', 'margin-top': '6px', display: 'inline-block'}}>立即认证</a></p>
ref="answerUnlock" lockedAnswers={lockedAnswers} unlockedAnswers={unlockedAnswers} <CodeEvaluateMultiLevelAnswerUnlock
challenge={challenge} ref="answerUnlock" lockedAnswers={lockedAnswers} unlockedAnswers={unlockedAnswers}
> challenge={challenge}
</CodeEvaluateMultiLevelAnswerUnlock> >
           </React.Fragment> </CodeEvaluateMultiLevelAnswerUnlock>
            </React.Fragment>
              :               :
            <React.Fragment>             <React.Fragment>
<p>{`先查看参考答案,再通过评测的学生,实训作业将被扣分`}</p> <p>{`先查看参考答案,再通过评测的学生,实训作业将被扣分`}</p>
{/* { MultiLevelUnlockTable } */} {/* { MultiLevelUnlockTable } */}
<CodeEvaluateMultiLevelAnswerUnlock <CodeEvaluateMultiLevelAnswerUnlock
ref="answerUnlock" lockedAnswers={lockedAnswers} unlockedAnswers={unlockedAnswers} ref="answerUnlock" lockedAnswers={lockedAnswers} unlockedAnswers={unlockedAnswers}
challenge={challenge} challenge={challenge}
> >
</CodeEvaluateMultiLevelAnswerUnlock> </CodeEvaluateMultiLevelAnswerUnlock>
            </React.Fragment>;             </React.Fragment>;
} }

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

@ -229,6 +229,9 @@ body>div[role=dialog]>div {
/* padding-bottom: 10px; */ /* padding-bottom: 10px; */
} }
/* tpi 窗口宽度*/ /* tpi 窗口宽度*/
body>div[role=dialog]>div[role=document] {
border-radius: 10px;
}
#tpi-dialog>div[role=document] { #tpi-dialog>div[role=document] {
border-radius: 10px; border-radius: 10px;
} }

Loading…
Cancel
Save