diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index 0b764202f..b332c50a8 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -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) { } diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index a6ea333c6..7bddb9979 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -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{ } -

+

{ isChecked !="" ? {isChecked}:"" } diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index ace1ebe7b..bc51a273d 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -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 (

- { - this.props.game_list === undefined?"" : this.props.game_list.length<4? -
- +
+ {this.props.game_list === undefined ? "" : } + + : +
+
+ {this.props.game_list === undefined ? "" :
} + + } + + + + + + + : + + +
+ { + this.props.game_list === undefined?"" : this.props.game_list.length<4? +
+ -
- {this.props.game_list === undefined ? "" :
+
+ {this.props.game_list === undefined ? "" :
} - - : -
-
- {this.props.game_list === undefined ? "" :
} + + : +
+
+ {this.props.game_list === undefined ? "" :
} - - } + />} + + } + + + + + + + + } + + diff --git a/public/react/src/modules/page/main/CodeEvaluateView.css b/public/react/src/modules/page/main/CodeEvaluateView.css index 14f1ac3db..9deee0fb2 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.css +++ b/public/react/src/modules/page/main/CodeEvaluateView.css @@ -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; diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js index 8f28a8c63..cb5a40793 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.js +++ b/public/react/src/modules/page/main/CodeEvaluateView.js @@ -180,8 +180,8 @@ class CodeEvaluateView extends Component { 测试集 {index + 1} - { headIconClass && } - { _headLockIconClass && } + { headIconClass && } + { _headLockIconClass && }

diff --git a/public/react/src/modules/page/main/LeftView.js b/public/react/src/modules/page/main/LeftView.js index c198f488b..b2469ec44 100644 --- a/public/react/src/modules/page/main/LeftView.js +++ b/public/react/src/modules/page/main/LeftView.js @@ -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 ? @@ -113,24 +113,25 @@ class LeftView extends Component { if (isMultiLevelAnswer) { // power === 0 && contentText = ( is_teacher ) ? -            -            

{`已经过职业认证的教师可以免金币查看答案哟~`}

this.goToCertification()}>立即认证

- - -           
+            +             

{`已经过职业认证的教师可以免金币查看答案哟~`}

+

this.goToCertification()} + style={{ color: '#1890ff', 'margin-top': '6px', display: 'inline-block'}}>立即认证

+ + +           
              :              -

{`先查看参考答案,再通过评测的学生,实训作业将被扣分`}

- {/* { MultiLevelUnlockTable } */} - - +

{`先查看参考答案,再通过评测的学生,实训作业将被扣分`}

+ {/* { MultiLevelUnlockTable } */} + +             
; } @@ -300,7 +301,7 @@ class LeftView extends Component { { lockedAnswers && lockedAnswers.map((item, index) => { return
-
级别{index + 1}:
+
级别{index + 1 + (unlockedAnswers ? unlockedAnswers.length : 0)}:
{item.name}
{ this.props.showUnlockAnswerDialog(item) } } diff --git a/public/react/src/modules/page/main/LeftViewContainer.js b/public/react/src/modules/page/main/LeftViewContainer.js index f96c8e55b..2462872f2 100644 --- a/public/react/src/modules/page/main/LeftViewContainer.js +++ b/public/react/src/modules/page/main/LeftViewContainer.js @@ -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, }) diff --git a/public/react/src/modules/page/tpiPage.css b/public/react/src/modules/page/tpiPage.css index 4fc4e3062..55e75059d 100644 --- a/public/react/src/modules/page/tpiPage.css +++ b/public/react/src/modules/page/tpiPage.css @@ -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; } diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index 3dca1ad2b..8d38ac24d 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -948,7 +948,7 @@ class Newshixuns extends Component { : - + 上传附件 (单个文件50M以内)