|
|
|
@ -239,7 +239,7 @@ class Challenges extends Component {
|
|
|
|
|
|
|
|
|
|
<p className="clearfix mb30">
|
|
|
|
|
<span className="font-16 fl">简介</span>
|
|
|
|
|
<a style={{ display: this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
|
|
|
|
|
<a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
|
|
|
|
|
href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr"
|
|
|
|
|
data-tip-down="编辑">
|
|
|
|
|
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
|
|
|
|
@ -262,7 +262,7 @@ class Challenges extends Component {
|
|
|
|
|
|
|
|
|
|
<p className="clearfix mb10">
|
|
|
|
|
<span className="font-16 fl">全部任务</span>
|
|
|
|
|
{this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
|
|
|
|
|
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
|
|
|
|
|
<Link to={"/shixuns/" + id + "/challenges/new"}
|
|
|
|
|
className="white-btn edu-greenline-btn fr"
|
|
|
|
|
// data-tip-down="新增代码编辑类型任务"
|
|
|
|
@ -275,7 +275,7 @@ class Challenges extends Component {
|
|
|
|
|
|
|
|
|
|
</Link> : ""
|
|
|
|
|
}
|
|
|
|
|
{this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
|
|
|
|
|
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
|
|
|
|
|
<Link to={"/shixuns/" + id + "/challenges/newquestion"}
|
|
|
|
|
className="white-btn edu-greenline-btn fr mr20"
|
|
|
|
|
// data-tip-down="新增选择题类型任务"
|
|
|
|
@ -333,7 +333,7 @@ class Challenges extends Component {
|
|
|
|
|
</span>
|
|
|
|
|
<span className="mr15 font-16 fl">第{key+1}关</span>
|
|
|
|
|
|
|
|
|
|
{this.props.identity<4?
|
|
|
|
|
{this.props.identity<5?
|
|
|
|
|
item.st === 1 ?
|
|
|
|
|
<a onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editquestion")}
|
|
|
|
|
className="font-16 color05101a">{item.name}</a>
|
|
|
|
@ -359,7 +359,7 @@ class Challenges extends Component {
|
|
|
|
|
{item.delete_url != undefined &&
|
|
|
|
|
<Tooltip placement="bottom" title={"删除"}>
|
|
|
|
|
<a onClick={() => this.delOperations(item.challenge_id)}
|
|
|
|
|
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
|
|
|
|
|
style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
|
|
|
|
|
className="fl ring-op-green mr25">
|
|
|
|
|
<img src={getImageUrl("images/educoder/icon/close.svg")}
|
|
|
|
|
className="fl mt5 ml5" />
|
|
|
|
@ -371,7 +371,7 @@ class Challenges extends Component {
|
|
|
|
|
{item.up_url != undefined &&
|
|
|
|
|
<Tooltip placement="bottom" title={"向上移动"}>
|
|
|
|
|
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "up")}
|
|
|
|
|
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
|
|
|
|
|
style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
|
|
|
|
|
className="fl ring-op-green mr25">
|
|
|
|
|
<img src={getImageUrl("images/educoder/icon/moveup.svg")}
|
|
|
|
|
className="fl mt2 ml4" />
|
|
|
|
@ -381,7 +381,7 @@ class Challenges extends Component {
|
|
|
|
|
{item.down_url != undefined &&
|
|
|
|
|
<Tooltip placement="bottom" title={"向下移动"}>
|
|
|
|
|
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "down")}
|
|
|
|
|
style={{ display: this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status=== 0 ? "block" : 'none' }}
|
|
|
|
|
style={{ display: this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status=== 0 ? "block" : 'none' }}
|
|
|
|
|
className="fl ring-op-green mr25">
|
|
|
|
|
<img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4" />
|
|
|
|
|
</a>
|
|
|
|
@ -393,7 +393,7 @@ class Challenges extends Component {
|
|
|
|
|
item.st === 1 ?
|
|
|
|
|
<Tooltip placement="bottom" title={"编辑"}>
|
|
|
|
|
<a
|
|
|
|
|
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status< 3 ? "block" : 'none' }}
|
|
|
|
|
style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status< 3 ? "block" : 'none' }}
|
|
|
|
|
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editquestion"}
|
|
|
|
|
className="fl ring-green">
|
|
|
|
|
<img src={getImageUrl("images/educoder/icon/edit.svg")}
|
|
|
|
@ -403,7 +403,7 @@ class Challenges extends Component {
|
|
|
|
|
:
|
|
|
|
|
<Tooltip placement="bottom" title={"编辑"}>
|
|
|
|
|
<a
|
|
|
|
|
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
|
|
|
|
|
style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
|
|
|
|
|
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editcheckpoint"}
|
|
|
|
|
className="fl ring-green">
|
|
|
|
|
<img src={getImageUrl("images/educoder/icon/edit.svg")}
|
|
|
|
@ -451,9 +451,9 @@ class Challenges extends Component {
|
|
|
|
|
</Tooltip>
|
|
|
|
|
|
|
|
|
|
: item.status === 1 && newstatus === 1 ?
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.identity<4?"直接挑战":"请先完成前序关卡"}>
|
|
|
|
|
<a className={this.props.identity<4&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"}
|
|
|
|
|
onClick={this.props.identity<4&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""}
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.identity<5?"直接挑战":"请先完成前序关卡"}>
|
|
|
|
|
<a className={this.props.identity<5&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"}
|
|
|
|
|
onClick={this.props.identity<5&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""}
|
|
|
|
|
style={{marginTop: '-2px'}}>直接挑战</a>
|
|
|
|
|
</Tooltip> : "" : ""
|
|
|
|
|
|
|
|
|
@ -462,9 +462,9 @@ class Challenges extends Component {
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
item.status === 0 ?
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.identity<4&&item.open_game!=""?"直接挑战":"请先完成前序关卡"}>
|
|
|
|
|
<a className={this.props.identity<4&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"}
|
|
|
|
|
onClick={this.props.identity<4&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""}
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.identity<5&&item.open_game!=""?"直接挑战":"请先完成前序关卡"}>
|
|
|
|
|
<a className={this.props.identity<5&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"}
|
|
|
|
|
onClick={this.props.identity<5&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""}
|
|
|
|
|
style={{marginTop: '-2px'}}>直接挑战</a>
|
|
|
|
|
</Tooltip>: ""
|
|
|
|
|
}
|
|
|
|
|