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

dev_cs_new
hjm 6 years ago
commit 39705d9688

@ -39,6 +39,7 @@ class ApplicationController < ActionController::Base
@user_course_identity = current_user.course_identity(@course) @user_course_identity = current_user.course_identity(@course)
if @user_course_identity > Course::STUDENT && @course.is_public == 0 if @user_course_identity > Course::STUDENT && @course.is_public == 0
tip_exception(401, "..") unless User.current.logged? tip_exception(401, "..") unless User.current.logged?
check_account
tip_exception(409, "您没有权限进入") tip_exception(409, "您没有权限进入")
end end
uid_logger("###############user_course_identity:#{@user_course_identity}") uid_logger("###############user_course_identity:#{@user_course_identity}")

@ -498,13 +498,13 @@ class CoursesBanner extends Component {
</style> </style>
<Breadcrumb separator="|" className={"mt5"}> <Breadcrumb separator="|" className={"mt5"}>
<Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/teachers"}> <Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/teachers"}>
<span className="color-grey-c font-16">教师 {coursedata.teacher_count}</span> <span className="color-grey-c font-16"><span className={"mr10"}>教师</span> <span className={"mr10"}>{coursedata.teacher_count}</span></span>
</Breadcrumb.Item> </Breadcrumb.Item>
<Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/students"}> <Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/students"}>
<span className="color-grey-c font-16">学生 {coursedata.student_count}</span> <span className="color-grey-c font-16"><span className={"mr10 ml10"}>学生</span> <span className={"mr10"}>{coursedata.student_count}</span></span>
</Breadcrumb.Item> </Breadcrumb.Item>
<Breadcrumb.Item>{coursedata.credit===null?"": <Breadcrumb.Item>{coursedata.credit===null?"":
<span className="color-grey-c font-16">学分 {coursedata.credit}</span> <span className="color-grey-c font-16"><span className={"mr10 ml10"}>学分</span> <span className={"mr10"}>{coursedata.credit}</span></span>
}</Breadcrumb.Item> }</Breadcrumb.Item>
</Breadcrumb> </Breadcrumb>

@ -1112,16 +1112,20 @@ export default class TPMsettings extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
// this.props.showNotification('提交成功!'); // this.props.showNotification('提交成功!');
@ -1154,16 +1158,20 @@ export default class TPMsettings extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
} }

@ -178,7 +178,9 @@ export default class TPMchallengesnew extends Component {
} }
CreatePracticesend = () => { CreatePracticesend = () => {
this.setState({
this.setState({
CreatePracticesendtype:true CreatePracticesendtype:true
}) })
@ -237,14 +239,15 @@ export default class TPMchallengesnew extends Component {
exec_time:exec_time exec_time:exec_time
}).then((response) => { }).then((response) => {
if (response.data.status === 1) { if (response.data.status === 1) {
$("html").animate({ scrollTop: 0 }) // $("html").animate({ scrollTop: 0 })
this.setState({ window.location.href=`/shixuns/${id}/challenges/${response.data.challenge_id}/editcheckpoint`;
setopen: true, // this.setState({
CreatePracticesendtype:false, // setopen: true,
tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2", // CreatePracticesendtype:false,
tab3url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=3", // tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2",
}) // tab3url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=3",
// })
} }
this.props.showSnackbar(response.data.messages); this.props.showSnackbar(response.data.messages);

@ -635,16 +635,20 @@ class Newshixuns extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
// this.props.showNotification('提交成功!'); // this.props.showNotification('提交成功!');
@ -676,16 +680,20 @@ class Newshixuns extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
} }
@ -754,7 +762,8 @@ class Newshixuns extends Component {
handleChange = (info) => { handleChange = (info) => {
console.log("handleChange1"); console.log("handleChange1");
let fileList = info.fileList; let fileList = info.fileList;
this.setState({ fileList:fileList, this.setState({
fileList:fileList,
deleteisnot:false}); deleteisnot:false});
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {

Loading…
Cancel
Save