diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 02d554806..12e0043d5 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -42,7 +42,7 @@ if (isDev) { // 老师 //debugType="teacher"; // 学生 -debugType="student"; +//debugType="student"; function railsgettimes(proxy) { diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index ed7eb2210..bb1e0bef4 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -32,7 +32,7 @@ import _ from 'lodash' import TPIContext from './TPIContext' import { EDU_ADMIN, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER - , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL, EDU_BUSINESS, CNotificationHOC } from 'educoder' + , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL, EDU_BUSINESS, CNotificationHOC ,getRandomNumber} from 'educoder' import { MuiThemeProvider, createMuiTheme, withStyles } from 'material-ui/styles'; import MUIDialogStyleUtil from '../modules/page/component/MUIDialogStyleUtil' @@ -176,7 +176,7 @@ class TPIContextProvider extends Component { testPath = 'http://test-newweb.educoder.net' } // var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time` - var url = `${testPath}/api/tasks/${ game.identifier }/cost_time` + var url = `${testPath}/api/tasks/${ game.identifier }/cost_time${getRandomNumber()}` window.$.ajax({ type: 'get', url: url, diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index c37b45c84..ba8fe27b0 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -549,6 +549,10 @@ class Coursesleftnav extends Component{ window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`; } + if(positiontype!="course_groups"){ + this.updasaveNavmoda() + } + if(positiontype==="course_groups"){ window.location.href=`/courses/${coursesId}/course_groups/${result.data.group_id}`; } diff --git a/public/react/src/modules/page/layers/TaskResultLayer.js b/public/react/src/modules/page/layers/TaskResultLayer.js index 9e096b7b3..f4ccea8f7 100644 --- a/public/react/src/modules/page/layers/TaskResultLayer.js +++ b/public/react/src/modules/page/layers/TaskResultLayer.js @@ -14,6 +14,7 @@ import passpartImg from '../../../images/tpi/passpart.png' import empiricgreenImg from '../../../images/tpi/empiricgreen.png' import { trigger } from 'educoder'; +import SecondTab from "../../paths/SchoolStatistics/SecondTab"; class TaskResultLayer extends Component { @@ -29,7 +30,7 @@ class TaskResultLayer extends Component { } componentWillReceiveProps(newProps, newContext) { - if (newProps.currentGamePassed && (!this.props.currentGamePassed + if (newProps.currentGamePassed && (!this.props.currentGamePassed || (newProps.currentGamePassed !== this.props.currentGamePassed ))) { // this.fakeRanking = this._fakeRanking() const $ = window.$; @@ -51,10 +52,10 @@ class TaskResultLayer extends Component { } } } - + onStarChange(challenge, index, value) { this.props.onStarChange(challenge, index, value); - + this.setState({ stared: value ? true : false, }) @@ -87,11 +88,11 @@ class TaskResultLayer extends Component { // this.context.router.push('/sample'); if (goNext === true) { if (next_game) { // https://www.trustie.net/issues/18573 - this.goNext = true; + this.goNext = true; } // 隐藏掉效果查看页面 window.$('#picture_display').hide() - } + } this.props.onGamePassed(); this.setState({ stared: false @@ -110,9 +111,9 @@ class TaskResultLayer extends Component { // return; // } // const { showLanguagePictrue } = this.props.challenge; - // if ( prevProps.challenge.showLanguagePictrue != showLanguagePictrue && + // if ( prevProps.challenge.showLanguagePictrue != showLanguagePictrue && // showLanguagePictrue == true ) { - + // } // } initEffectDisplayServerTimer = () => { @@ -128,7 +129,7 @@ class TaskResultLayer extends Component { this.setState({ timeRemain }) }, 1000) }) - + } componentWillUnmount() { this.intervalHandler && clearInterval(this.intervalHandler); @@ -162,7 +163,7 @@ class TaskResultLayer extends Component { // const fakeRanking = this.fakeRanking; return (
{currentPassedGameGainExperience >= 0 ? `+${currentPassedGameGainExperience}` : '+0'}
-
您的评价决定老师的江湖地位~
+
{/*下一关*/}
this.onFinish(true)}>{ next_game ? '下一关' : '完成'}
- { challenge.showLanguagePictrue &&
+ { challenge.showLanguagePictrue &&
this.onFinish()}>
{ `查看效果` }
{/* ${ moment(this.state.timeRemain * 1000).format('mm:ss') } */}
-
+
}
- {/*
-
- (this.state.timeRemain ?
+ {/*
+
+ (this.state.timeRemain ?