Merge branches 'dev_aliyun' and 'dev_cs' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_cs

dev_cs
杨树明 5 years ago
commit 41e6106275

@ -431,7 +431,6 @@ class GamesController < ApplicationController
# params[:status] 1: 目录树点击的请求 0正常自动加载
# 返回参数status -1 系统统一报错提示;-3 需要轮训重试带retry参数-4 立即重试
def rep_content
raise("666")
challenge_path = @game.challenge.try(:path)
if challenge_path.blank?
tip_exception("代码获取异常,请检查实训模板的评测设置是否正确")

@ -113,13 +113,13 @@
}
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus()
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus()
return false;
}]
}

@ -83,9 +83,9 @@ export function initAxiosInterceptors(props) {
}
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`
config.url = `${config.url}?debug=${'student'}`
} else {
config.url = `${config.url}&debug=${debugType}`
config.url = `${config.url}&debug=${'student'}`
}
} else {
// 加api前缀

@ -32,11 +32,16 @@ class Fileslistitem extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
if(list.is_history_file===false){
// this.props.DownloadFileA(list.title,list.url)

@ -14,11 +14,16 @@ class BoardsListItem extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
const isAdminOrStudent = this.props.isAdminOrStudent();
if (!isAdminOrStudent && discussMessage.is_public == false) {

@ -21,11 +21,16 @@ class CommonWorkItem extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
const isStudent = this.props.isStudent()
if (isStudent) {

@ -58,11 +58,16 @@ class ExerciseListItem extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.props.history.push(url);
}

@ -1278,20 +1278,6 @@ class Studentshavecompletedthelist extends Component {
}catch (e) {
}
try {
if(this.props.Commonheadofthetestpaper.exercise_status !== undefined){
this.setState({
exercise_status:this.props.Commonheadofthetestpaper.exercise_status,
})
}else{
this.setState({
exercise_status:0,
})
}
}catch (e) {
}
}
componentWillReceiveProps = (nextProps) => {
@ -1330,7 +1316,7 @@ class Studentshavecompletedthelist extends Component {
})
if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) {
// 学生未截止
// console.log("试卷学生未截止");
this.Generatenewdatas(response.data.exercise_users);
if (response.data.exercise_types.subjective === 0) {
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
@ -1377,6 +1363,7 @@ class Studentshavecompletedthelist extends Component {
}
} else {
//学生已截止
// console.log("试卷学生已截止");
if (response.data.exercise_types.subjective === 0) {
if (this.state.loadingstate === false) {
var arr =[];
@ -1458,7 +1445,7 @@ class Studentshavecompletedthelist extends Component {
else if (response.data.exercise_types.user_permission === 0) {
// console.log(response.data.exercise_users)
// console.log(response)
// console.log("试卷老师加载中");
if (thiss.state.loadingstate === false) {
thiss.setState({
loadingstate: true,
@ -1469,7 +1456,9 @@ class Studentshavecompletedthelist extends Component {
thiss.Generatenewdatasy(response.data.exercise_users, response);
}
}).catch((error) => {
console.log(error)
console.log(error);
console.log("其实数据加载失败了");
console.log("1111");
});
@ -2490,16 +2479,22 @@ class Studentshavecompletedthelist extends Component {
let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable,exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state;
// console.log("Studentshavecompletedthelist");
// console.log(this.props.current_status);
// console.log("获取到的数据");
// console.log(datas);
// console.log(data);
// console.log("this.props.Commonheadofthetestpaper.exercise_status");
// console.log(this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status);
// console.log(exercise_status);
return (
isAdmin === true ?
(
<div style={{
"margin": "0 auto",
" min-width": " 1200px",
minWidth: " 1200px",
}}>
{/*老师*/}
{
exercise_status===0 || exercise_status===1 ?
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===1 ?
<div className="edu-back-white">
<NoneData></NoneData>
</div>
@ -2598,9 +2593,9 @@ class Studentshavecompletedthelist extends Component {
{course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" :
<li className="clearfix mt10">
<tr>
<td className="w80" style={{"vertical-align": "top"}}><span
<td className="w80" style={{verticalAlign: "top"}}><span
className=" mr10 color-grey-8 ">分班情况</span></td>
<td className="w70" style={{"vertical-align": "top"}}><span><a
<td className="w70" style={{verticalAlign: "top"}}><span><a
id="graduation_comment_no_limit"
className={unlimitedtwo === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
onClick={() => this.funtaskstatustwos()}>不限</a></span>
@ -2714,9 +2709,9 @@ class Studentshavecompletedthelist extends Component {
Teacherliststudentlist === undefined || Teacherliststudentlist.current_answer_user === undefined || Teacherliststudentlist.current_answer_user === null ?
<div>
<div className=" clearfix "
style={{"margin": "0 auto", "padding-bottom": "100px", " min-width": " 1200px"}}>
style={{"margin": "0 auto", "padding-bottom": "100px", minWidth: " 1200px"}}>
{
exercise_status === 0 || exercise_status === 1 ?
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white">
<NoneData></NoneData>
</div>
@ -2794,10 +2789,10 @@ class Studentshavecompletedthelist extends Component {
<div className="clearfix" style={{
"margin": "0 auto",
"padding-bottom": "100px",
" min-width": " 1200px"
minWidth: " 1200px"
}}>
{
exercise_status === 0 || exercise_status === 1 ?
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white">
<NoneData></NoneData>
</div>

@ -436,22 +436,22 @@ class Testpapersettinghomepage extends Component{
/>
{
// 教师列表
parseInt(tab[0])==0 && <Studentshavecompletedthelist {...this.props} {...this.state} triggerRef={this.bindRef} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}></Studentshavecompletedthelist>
parseInt(tab[0])==0 ? <Studentshavecompletedthelist {...this.props} {...this.state} triggerRef={this.bindRef} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}></Studentshavecompletedthelist>:""
}
{/*统计结果*/}
{
parseInt(tab[0])==1 && <Exercisestatisticalresult {...this.props} {...this.state} triggerRef={this.bindRef}></Exercisestatisticalresult>
parseInt(tab[0])==1 ? <Exercisestatisticalresult {...this.props} {...this.state} triggerRef={this.bindRef}></Exercisestatisticalresult>:""
}
{
parseInt(tab[0])==2 && <ExerciseDisplay {...this.props} {...this.state} triggerRef={this.bindRef}></ExerciseDisplay>
parseInt(tab[0])==2 ? <ExerciseDisplay {...this.props} {...this.state} triggerRef={this.bindRef}></ExerciseDisplay>:""
}
{
parseInt(tab[0])==3 && <WrappedExercisesetting {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting>
parseInt(tab[0])==3 ? <WrappedExercisesetting {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting>:""
}
</div>
</div>

@ -140,11 +140,16 @@ class GraduateTaskItem extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.props.history.push(url);
}

@ -17,14 +17,19 @@ class GraduateTopicItem extends Component{
toDetailPage=(topicId)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog("iscancel")
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
let courseId=this.props.match.params.coursesId;
this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`);

@ -21,11 +21,16 @@ class PollListItem extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.props.history.push(url);
}

@ -150,11 +150,16 @@ class ShixunhomeWorkItem extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.props.history.push(url);

@ -199,11 +199,16 @@ class DetailCards extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
let url = "/shixuns/" + id + "/shixun_exec.json";

@ -248,11 +248,16 @@ class DetailTop extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.setState({
@ -267,11 +272,16 @@ class DetailTop extends Component{
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.setState({
Modalstype:true,

@ -167,12 +167,20 @@ class TPMBanner extends Component {
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
//
// if(this.props.checkIfProfessionalCertification()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/search_user_courses.json";
this.setState({
@ -390,13 +398,20 @@ class TPMBanner extends Component {
return
}
if(this.props.checkIfProfileCompleted()===false){
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
// if(this.props.checkIfProfessionalCertification()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
let {shixunsDetails} = this.props
if( shixunsDetails.shixun_status>1){
this.setState({

@ -227,7 +227,6 @@ class Challenges extends Component {
return
}
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
@ -235,6 +234,13 @@ class Challenges extends Component {
return
}
// if(this.props.checkIfProfessionalCertification()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
let { ChallengesDataList } = this.state;
// let id = this.props.match.params.shixunId;

Loading…
Cancel
Save