diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index 3f40b8d1b..26f44a2e5 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -122,7 +122,7 @@ export function getUploadActionUrlOfAuth(id) { export function getRandomNumber(type) { Railsgettimes() let anewopens=md5(newopens+newtimestamp); - return type===true?`&randomcode=${newtimestamp}&client_key=${anewopens}`:`?randomcode=${newtimestamp}&client_key=${anewopens}` + return type===true?`randomcode=${newtimestamp}&client_key=${anewopens}`:`?randomcode=${newtimestamp}&client_key=${anewopens}` } export function test(path) { diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js index eba637bd1..43f651527 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js @@ -315,12 +315,13 @@ class GraduationTaskDetail extends Component{ CodeReview=()=>{ this.props.showNotification("正在导出中..."); const task_Id = this.props.match.params.task_Id; - window.open(`https://test-newweb.educoder.net/api/graduation_tasks/${task_Id}/sonar? + window.open(`/api/graduation_tasks/${task_Id}/sonar? ${this.state.taskdatas.teacher_comment===undefined||this.state.taskdatas.teacher_comment===null?"":"teacher_comment="+this.state.taskdatas.teacher_comment} ${this.state.taskdatas.task_status===undefined||this.state.taskdatas.task_status===null?"":"&task_status="+this.state.taskdatas.task_status} ${this.state.taskdatas.course_group===undefined||this.state.taskdatas.course_group===null?"":"&course_group="+this.state.taskdatas.course_group} ${this.state.taskdatas.cross_comment===undefined||this.state.taskdatas.cross_comment===null?"":"&cross_comment="+this.state.taskdatas.cross_comment} ${this.state.taskdatas.search===undefined||this.state.taskdatas.search===null?"":"&search="+this.state.taskdatas.search+"&"}${getRandomNumber(true)}`) + } getsonars=(teacher_comment,task_status,course_group,cross_comment,search)=>{ @@ -543,7 +544,7 @@ class GraduationTaskDetail extends Component{ { this.props.isAdmin() ? questionslist.status===0 ? { this.publish()} }>立即发布 : "" : "" } { this.props.isAdmin() && questionslist.cross_comment ? 交叉评阅设置 : "" } { this.props.isAdmin() ? 编辑任务 : "" } - { this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? this.CodeReview()}>代码评测 : "" } + {/*{ this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? this.CodeReview()}>代码评测 : "" }*/}