Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

issues25489
daiao 5 years ago
commit 15d7164b09

@ -1,6 +1,11 @@
class Competitions::CertificatesController < Competitions::BaseController
def personal
prize_user = CompetitionPrizeUser.find_by!(user: current_user, id: params[:id])
prize_user =
if current_user.admin_or_business?
CompetitionPrizeUser.find(params[:id])
else
CompetitionPrizeUser.find_by!(user: current_user, id: params[:id])
end
return render_not_found unless prize_user.certificate_exist?
team = prize_user.competition_team
@ -12,7 +17,7 @@ class Competitions::CertificatesController < Competitions::BaseController
def team
team = CompetitionTeam.find(params[:id])
return render_forbidden unless team.team_members.exists?(user_id: current_user.id)
return render_forbidden unless current_user.admin_or_business? || team.team_members.exists?(user_id: current_user.id)
return render_not_found unless team.certificate_exists?
prize = team.competition_prize_users.first.competition_prize

@ -1,4 +1,4 @@
import { from } from '_array-flatten@2.1.2@array-flatten';
//import { from } from '_array-flatten@2.1.2@array-flatten';
// export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil';

@ -240,17 +240,17 @@ class CompetitionCommon extends Component{
if(signupdata.enrolled===true){
this.props.history.replace(`/courses/${data.course_id}`);
}else{
if(data.member_of_course===true){
if (data.member_of_course === true) {
this.props.history.replace(`/courses/${data.course_id}`);
}else{
} else {
// 以学生身份调用加入课堂 进入课堂首页
let url="/courses/apply_to_join_course.json"
let url = "/courses/apply_to_join_course.json"
axios.post(url, {
invite_code: data.invite_code,
student:1
invite_code: data.invite_code,
student: 1
}
).then((response) => {
if(response.data.status===0){
if (response.data.status === 0) {
this.props.history.replace(`/courses/${data.course_id}`);
}
})

@ -421,7 +421,7 @@ class Selectresource extends Component{
<Radio style={radioStyle} value={0}>
立即发布
</Radio>
<Tooltip placement="bottom" title={"不支持学生延迟发布"} visible={this.props.isStudent()}>
<Tooltip placement="bottom" title={this.props.isStudent()===true?"不支持学生延迟发布":""} >
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延期发布</span>
<DatePicker

@ -529,7 +529,7 @@ class Selectsetting extends Component{
<Radio style={radioStyle} value={0}>
立即发布
</Radio>
<Tooltip placement="bottom" title={"不支持学生延迟发布"} visible={this.props.isStudent()}>
<Tooltip placement="bottom" title={this.props.isStudent()===true?"不支持学生延迟发布":""}>
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延期发布</span>
<DatePicker

@ -398,7 +398,7 @@ class Sendresource extends Component{
<Radio style={radioStyle} value={0}>
立即发布
</Radio>
<Tooltip placement="bottom" title={"不支持学生延迟发布"} visible={this.props.isStudent()}>
<Tooltip placement="bottom" title={this.props.isStudent()===true?"不支持学生延迟发布":""}>
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延期发布</span>
<DatePicker

@ -675,22 +675,24 @@ class LoginDialog extends Component {
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./WeChat.png')} alt="微信登录"/>
</a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./qq.png')} alt="qq登录"/>
</a>
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
</div>
</p>:<p className="clearfix mt20">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()} className={"ml10"}>
<img src={require('./qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</p>:""}
{/*<p className="clearfix mt20">*/}
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/}
{/*<div className={"mt10"}>*/}
{/*/!*<a onClick={()=>this.openweixinlogin()}>*!/*/}
{/*/!*<img src={require('./WeChat.png')} alt="微信登录"/>*!/*/}
{/*/!*</a>*!/*/}
{/*<a onClick={()=>this.openphoneqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
{/*</div>*/}
{/*</p>*/}
</form>}
{weixinlogin===true?<iframe

@ -1,5 +1,5 @@
state说明
tasks详情接口
顶层state--tasks详情接口
allowed_unlock 为true时才允许非管理员用户解锁隐藏测试集
discusses_count 总评论数
@ -124,6 +124,28 @@ state说明
user 当前关卡所属用户的信息
user_praise 当前用户是否点赞
/MainContentContainer 里的state
repositoryCode: '',
open: false, // 繁忙等级等提示用Dialog考虑重构封装到根组件
gameBuilding: false, // 评测中标志
codeStatus: SAVED, // 0 已修改 1 保存中 2 已保存 3 保存失败
codeLoading: true, // code加载中
readRepoTimeout: false, // 加载代码轮训超时
resetCodeDialogOpen: false, // 重新加载初始代码弹框的bool控制
resetPassedCodeDialogOpen: false, // 重新加载上次通过的代码的bool控制
isEditablePath: true // 当前文件是否可编辑
CodeRepositoryViewContainer 里的state
drawerOpen: false, // 代码目录Drawer的bool控制 repoFilesDrawer
loadingFirstRepoFiles: false, // 代码目录树加载中的bool控制
fileTreeData: "", // 目录树节点数据[]
fileTreeSelectedKeys: [], // 目录树被选择的节点的key
codeRepositoryViewExpanded: false, --
tabIndex: 0, // tab值
settingDrawerOpen: false // 设置面板Drawer的bool控制
-------------- -------------- -------------- -------------- -------------- -------------- -------------- -------------- --------------
TPIContextProvider

@ -1161,16 +1161,16 @@ export default class TPMevaluation extends Component {
placeholder="输入"
value={item.input}
id={"textareavalue"+key}
autoHeight="true"
autoSize={{ minRows: 3, maxRows: 5 }}
// autoHeight="true"
rows={3}
onInput={(e)=>this.evaluationoninputvalue(e,key,"sr")}
></TextArea>
<TextArea className="textareavalue" name="test_set[output][]"
placeholder="预期输出"
value={item.output}
id={key+"textareavalue"}
autoHeight="true"
autoSize={{ minRows: 3, maxRows: 5 }}
// autoHeight="true"
rows={5}
onInput={(e)=>this.evaluationoninputvalue(e,key,"yq")}
></TextArea>
<div className="clearfix lineh-30">

@ -1057,26 +1057,26 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/>
</a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</p>:""}
</div>
}
{/*<p className="clearfix mb10 textcenter">*/}
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/}
{/*<div className={"mt10"}>*/}
{/*/!*<a onClick={()=>this.openweixinlogin()}>*!/*/}
{/*/!*<img src={require('./WeChat.png')} alt="微信登录"/>*!/*/}
{/*/!*</a>*!/*/}
{/*<a onClick={()=>this.openphoneqqlogin()}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
{/*</div>*/}
{/*</p>*/}
@ -1237,24 +1237,29 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/>
</a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</p>:""}
</div>
}
{/*<p className="clearfix mb10 textcenter">*/}
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/}
{/*<div className={"mt10"}>*/}
{/*/!*<a onClick={()=>this.openweixinlogin()}>*!/*/}
{/*/!*<img src={require('./WeChat.png')} alt="微信登录"/>*!/*/}
{/*/!*</a>*!/*/}
{/*<a onClick={()=>this.openphoneqqlogin()}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
{/*</div>*/}
{/*</p>*/}
{/**/}
{weixinlogin===true?<iframe
className={"weixinheight390 mt20"}
frameBorder="0"

Loading…
Cancel
Save