dev_tj
cxt 5 years ago
commit 59b9930e2a

@ -42,7 +42,7 @@ if (isDev) {
// 老师
//debugType="teacher";
// 学生
debugType="student";
//debugType="student";
function railsgettimes(proxy) {

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

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

@ -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 (
<div>
{currentGamePassed ?
{currentGamePassed ?
<div className="taskResultLayer">
<div className="pr passTaskContent" style={{display:'none'}} >
<i className="far fa-times-circle closeIcon" onClick={closeTaskResultLayer} title="关闭"></i>
@ -174,52 +175,60 @@ class TaskResultLayer extends Component {
<p className="inline inlines exp">
<img src={empiricgreenImg} className="mr8 mt5 fl"/>
{currentPassedGameGainExperience >= 0 ? `+${currentPassedGameGainExperience}` : '+0'}
</p>
</p>
</div>
<div className="winPanel">
<style>
{
`
.page--body{
z-index: 0 !important;
}
`
}
</style>
<div className="cl"></div>
{ !game.star ?
{ !game.star ?
<React.Fragment>
<p className="rateLabel ">您的评价决定老师的江湖地位~</p>
<Rate
defaultValue={0}
allowClear={false}
onChange={(value) => this.onStarChange(this.props.game, this.props.challenge.position, value)}
/>
/>
</React.Fragment>
: ''}
<p>
<p>
{/*<a href="javascript:void(0)" className="passNext">下一关</a>*/}
<a href="javascript:void(0)" className={`passed ${ stared || game.star ? 'stared' : '' }`}
{...titleObj} onClick={()=>this.onFinish(true)}>{ next_game ? '下一关' : '完成'}</a>
{ challenge.showLanguagePictrue &&
{ challenge.showLanguagePictrue &&
<a href="javascript:void(0)" className={`passed ${ stared || game.star ? 'stared' : '' }`}
{...titleObj} onClick={()=>this.onFinish()}>
{ `查看效果` }
{/* ${ moment(this.state.timeRemain * 1000).format('mm:ss') } */}
</a>
}
{/*
(this.state.timeRemain ?
{/*
(this.state.timeRemain ?
<Tooltip title={"注意效果查看服务只会保留5分钟"} disableFocusListener={true}>
</Tooltip>
</Tooltip>
:
<Tooltip title={"效果查看服务已被终止运行,需要重新评测后才能查看"} disableFocusListener={true}>
<a href="javascript:void(0)" className={`passed ${ stared || game.star ? 'stared' : '' }`}
{...titleObj} onClick={()=>{}} style={{ backgroundColor: 'gray'}}>
{ `查看效果` }
</a>
</Tooltip>
</Tooltip>
)
*/}
{/*
{/*
注意效果查看服务只会保留5分钟
效果查看服务已被终止运行需要重新评测后才能查看
*/}

Loading…
Cancel
Save