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

video_transcode
caicai8 5 years ago
commit 48a5bd1b57

@ -1,7 +1,7 @@
class HackSet < ApplicationRecord class HackSet < ApplicationRecord
validates_length_of :input, maximum: 1000, message: "不能超过1000个字符" validates_length_of :input, maximum: 1000, message: "不能超过1000个字符"
validates_length_of :output, maximum: 1000, message: "不能超过1000个字符" validates_length_of :output, maximum: 1000, message: "不能超过1000个字符"
validates :input, presence: { message: "测试集输入不能为空" } #validates :input, presence: { message: "测试集输入不能为空" }
validates :output, presence: { message: "测试集输出不能为空" } validates :output, presence: { message: "测试集输出不能为空" }
validates_uniqueness_of :input, scope: [:hack_id, :input], message: "多个测试集的输入不能相同" validates_uniqueness_of :input, scope: [:hack_id, :input], message: "多个测试集的输入不能相同"
# 编程题测试集 # 编程题测试集

@ -221,7 +221,7 @@ function generateNewIndexJsp() {
// <script type="text/javascript" src="/js/js_min_all.js"></script> // <script type="text/javascript" src="/js/js_min_all.js"></script>
var result = data var result = data
.replace(jsMinAllRegex, code) .replace(jsMinAllRegex, code)
.replace(flvMinAllRegex) .replace(flvMinAllRegex,'')
// .replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`) // .replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`)
// .replace('/js/js_min_all_2.js', `${cdnHost}/react/build/js/js_min_all_2.js?v=${newVersion}`) // .replace('/js/js_min_all_2.js', `${cdnHost}/react/build/js/js_min_all_2.js?v=${newVersion}`)

@ -807,16 +807,16 @@ class App extends Component {
render={ render={
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />) (props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
} /> } />
<Route path="/question/edit/:id" <Route path="/problemset/edit/:id"
render={ render={
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />) (props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
} /> } />
<Route path="/question/newitem" <Route path="/problemset/newitem"
render={ render={
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />) (props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
} /> } />
<Route path="/question/:type" <Route path="/problemset/:type"
render={ render={
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />) (props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
} /> } />
@ -835,7 +835,7 @@ class App extends Component {
(props) => (<Developer {...this.props} {...props} {...this.state} />) (props) => (<Developer {...this.props} {...props} {...this.state} />)
}/> }/>
<Route path="/question" <Route path="/problemset"
render={ render={
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />) (props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
}/> }/>

@ -121,7 +121,7 @@ const NewOrEditTask = (props) => {
// 清空描述信息 // 清空描述信息
toStore('oj_description', ''); toStore('oj_description', '');
// props.history.push('/problems'); // props.history.push('/problems');
props.history.push(`/question?${props.searchParams}`); props.history.push(`/problemset?${props.searchParams}`);
} }
// 发布 // 发布

@ -129,7 +129,7 @@ function StudentStudy (props) {
changeShowOrHideControl(false); changeShowOrHideControl(false);
props.saveEditorCodeForDetail(''); props.saveEditorCodeForDetail('');
// props.history.push('/problems'); // props.history.push('/problems');
props.history.push(`/question?${searchParams}`); props.history.push(`/problemset?${searchParams}`);
} }
return ( return (

@ -12,11 +12,15 @@ class Bottomsubmit extends Component {
cannelfun = () => { cannelfun = () => {
// window.location.href= // window.location.href=
try {
if(this.props.Cohetepaperbool===true){ if(this.props.Cohetepaperbool===true){
this.props.setCohetepaperbool(false); this.props.setCohetepaperbool(false);
}else { }else {
this.props.history.replace(this.props.url); this.props.history.replace(this.props.url);
} }
}catch (e) {
this.props.history.replace(this.props.url);
}
} }

@ -236,7 +236,9 @@ class Paperreview extends Component {
.then((result) => { .then((result) => {
if (result.data.status === 0) { if (result.data.status === 0) {
// this.props.showNotification(`组卷成功`); // this.props.showNotification(`组卷成功`);
this.props.history.replace('/paperlibrary'); // console.log(result.data.exam_id);
//本来调试卷库首页的
this.props.history.replace('/paperlibrary/see/'+result.data.exam_id);
} }
}).catch((error) => { }).catch((error) => {
//console.log(error); //console.log(error);
@ -418,7 +420,7 @@ class Paperreview extends Component {
artificialtype==="artificial"? artificialtype==="artificial"?
<Breadcrumb separator=">"> <Breadcrumb separator=">">
<Breadcrumb.Item >试题库</Breadcrumb.Item> <Breadcrumb.Item >试题库</Breadcrumb.Item>
<Breadcrumb.Item className={"xiaoshou"} href="/question">人工组卷</Breadcrumb.Item> <Breadcrumb.Item className={"xiaoshou"} href="/problemset">人工组卷</Breadcrumb.Item>
<Breadcrumb.Item className={"xiaoshout"}>试卷预览</Breadcrumb.Item> <Breadcrumb.Item className={"xiaoshout"}>试卷预览</Breadcrumb.Item>
</Breadcrumb> </Breadcrumb>
: :
@ -429,7 +431,7 @@ class Paperreview extends Component {
</Breadcrumb> </Breadcrumb>
: :
<Breadcrumb separator=">"> <Breadcrumb separator=">">
<Breadcrumb.Item href="/question">试题库</Breadcrumb.Item> <Breadcrumb.Item href="/problemset">试题库</Breadcrumb.Item>
<Breadcrumb.Item className={"xiaoshou"}>新增试卷</Breadcrumb.Item> <Breadcrumb.Item className={"xiaoshou"}>新增试卷</Breadcrumb.Item>
</Breadcrumb> </Breadcrumb>
} }
@ -461,7 +463,8 @@ class Paperreview extends Component {
<Bottomsubmit {...this.props} {...this.state} bottomvalue={Cohetepaperbool===false?"保存组卷":"完成"} <Bottomsubmit {...this.props} {...this.state} bottomvalue={Cohetepaperbool===false?"保存组卷":"完成"}
setCohetepaperbool={(bool)=>this.setCohetepaperbool(bool)} setCohetepaperbool={(bool)=>this.setCohetepaperbool(bool)}
onSubmits={() => this.preservation()} url={ artificialtype==="artificial"?'/question':'/paperlibrary'}></Bottomsubmit> Cohetepaperbool={this.state.Cohetepaperbool}
onSubmits={() => this.preservation()} url={ artificialtype==="artificial"?'/problemset':'/paperlibrary'}></Bottomsubmit>
</div> </div>
) )

@ -463,7 +463,7 @@ class Paperreview_item extends Component {
} }
jixuxuantioncli = () => { jixuxuantioncli = () => {
this.props.history.replace("/question"); this.props.history.replace("/problemset");
} }
showparagraphs = (e,name) => { showparagraphs = (e,name) => {

@ -940,6 +940,15 @@ class Question extends Component {
return ( return (
<div className="newMain clearfix" ref={this.saveContainer}> <div className="newMain clearfix" ref={this.saveContainer}>
<style>{
`
.newHeaders{
position: fixed;
top: 0px;
z-index: 999 !important;
}
`
}</style>
{ {
mydisplay===true? mydisplay===true?
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.mydisplayHidedel} /> <Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.mydisplayHidedel} />
@ -966,11 +975,7 @@ class Question extends Component {
<style> <style>
{ {
` `
.newHeaders{
position: fixed;
top: 0px;
z-index: 999 !important;
}
.ant-drawer { .ant-drawer {
z-index: 800 !important; z-index: 800 !important;
} }
@ -988,13 +993,11 @@ class Question extends Component {
</style> </style>
:"" :""
} }
{
visible===true?
<div <div
style={{ style={{
marginTop: "81px" marginTop: "81px"
}}></div> }}></div>
:""}
{ {
modalsTypes===true? modalsTypes===true?
<QuestionModals {...this.props}{...this.state} modalsTypes={modalsTypes} modalCancels={() => this.modalCancels()} <QuestionModals {...this.props}{...this.state} modalsTypes={modalsTypes} modalCancels={() => this.modalCancels()}

@ -312,7 +312,7 @@ class Questionitem_banks extends Component {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`新增单选题成功`); // this.props.showNotification(`新增单选题成功`);
this.restricte=true; this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/problemset');
} }
}).catch((error) => { }).catch((error) => {
@ -324,7 +324,7 @@ class Questionitem_banks extends Component {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`编辑单选题成功`); // this.props.showNotification(`编辑单选题成功`);
this.restricte=true; this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/problemset');
} }
@ -392,7 +392,7 @@ class Questionitem_banks extends Component {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`新增多选题成功`); // this.props.showNotification(`新增多选题成功`);
this.restricte=true; this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/problemset');
} }
@ -406,7 +406,7 @@ class Questionitem_banks extends Component {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`编辑多选题成功`); // this.props.showNotification(`编辑多选题成功`);
this.restricte=true; this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/problemset');
} }
@ -461,7 +461,7 @@ class Questionitem_banks extends Component {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`新增判断题成功`); // this.props.showNotification(`新增判断题成功`);
this.restricte=true; this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/problemset');
} }
}).catch((error) => { }).catch((error) => {
@ -474,7 +474,7 @@ class Questionitem_banks extends Component {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`编辑判断题成功`); // this.props.showNotification(`编辑判断题成功`);
this.restricte=true; this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/problemset');
} }
}).catch((error) => { }).catch((error) => {
@ -561,7 +561,7 @@ class Questionitem_banks extends Component {
<div className="w1200mss"> <div className="w1200mss">
<div className="w100s mt30"> <div className="w100s mt30">
<Breadcrumb separator=">"> <Breadcrumb separator=">">
<Breadcrumb.Item href="/question">试题库</Breadcrumb.Item> <Breadcrumb.Item href="/problemset">试题库</Breadcrumb.Item>
<Breadcrumb.Item>{JSON.stringify(params) === "{}" ? "新增" : "编辑"}试题</Breadcrumb.Item> <Breadcrumb.Item>{JSON.stringify(params) === "{}" ? "新增" : "编辑"}试题</Breadcrumb.Item>
</Breadcrumb> </Breadcrumb>
</div> </div>
@ -627,7 +627,7 @@ class Questionitem_banks extends Component {
"" ""
: :
<Bottomsubmit {...this.props} {...this.state} bottomvalue={item_type === "PROGRAM" ? "创建" : "保存"} <Bottomsubmit {...this.props} {...this.state} bottomvalue={item_type === "PROGRAM" ? "创建" : "保存"}
onSubmits={() => this.preservation()} url={'/question'}></Bottomsubmit> onSubmits={() => this.preservation()} url={'/problemset'}></Bottomsubmit>
} }
</div> </div>
) )

@ -201,7 +201,7 @@ class Contentpart extends Component {
} }
this.props.history.push("/question/newitem?pages="+this.props.pages+urls); this.props.history.push("/problemset/newitem?pages="+this.props.pages+urls);
} }
render() { render() {

@ -518,7 +518,7 @@ class Listjihe extends Component {
this.props.Isitapopup&&this.props.Isitapopup==="true"? this.props.Isitapopup&&this.props.Isitapopup==="true"?
"" ""
: :
<a onClick={()=>this.seturls(`/question/edit/${items.id}`)}> <a onClick={()=>this.seturls(`/problemset/edit/${items.id}`)}>
<p className="viewparsings xiaoshou mr25"> <p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i> <i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span> <span>编辑</span>

@ -117,7 +117,7 @@ class SiderBars extends Component {
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?<div> {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?<div>
{ {
mypath&&mypath==="/question"&&swsilan===true? mypath&&mypath==="/problemset"&&swsilan===true?
<Tooltip placement="left" title={"试题库"}> <Tooltip placement="left" title={"试题库"}>
<div className="feedback feedbackdivcolor xiaoshou shitikus" onClick={()=>this.props.showDrawer()} > <div className="feedback feedbackdivcolor xiaoshou shitikus" onClick={()=>this.props.showDrawer()} >

@ -419,10 +419,10 @@
color: #4CACFF; color: #4CACFF;
} }
.xiaoshou{ .xiaoshou{
cursor:pointer; cursor:pointer !important;
} }
.xiaoshout{ .xiaoshout{
cursor:default; cursor:default !important;
} }
.mt40{ .mt40{
margin-top: 40px; margin-top: 40px;

@ -73,7 +73,7 @@ class Contentpart extends Component {
} }
//跳转人工组卷 //跳转人工组卷
Mantegeneration=()=>{ Mantegeneration=()=>{
this.props.history.push('/question'); this.props.history.push('/problemset');
} }
@ -368,18 +368,24 @@ class Contentpart extends Component {
<div className="xaxisreverseorder" style={{ <div className="xaxisreverseorder" style={{
width:"50%" width:"50%"
}}> }}>
<a onClick={()=>this.xinzenw('/problemset')}>
<a onClick={()=>this.xinzenw('/Integeneration')}>
<div className="newbutoonss"> <div className="newbutoonss">
<p className="newbutoontess" >智能组卷</p>
</div>
</a>
<a onClick={()=>this.xinzenw('/question')}>
<div className="newbutoons mr39">
<p className="newbutoontess" >人工组卷</p> <p className="newbutoontess" >人工组卷</p>
</div> </div>
</a> </a>
{/*<a onClick={()=>this.xinzenw('/Integeneration')}>*/}
{/* <div className="newbutoonss">*/}
{/* <p className="newbutoontess" >智能组卷</p>*/}
{/* </div>*/}
{/*</a>*/}
{/*<a onClick={()=>this.xinzenw('/problemset')}>*/}
{/* <div className="newbutoons mr39">*/}
{/* <p className="newbutoontess" >人工组卷</p>*/}
{/* </div>*/}
{/*</a>*/}
</div> </div>
:"" :""
} }

@ -286,7 +286,7 @@ class Paperreview_item extends Component {
} }
jixuxuantioncli = () => { jixuxuantioncli = () => {
this.props.history.replace("/question"); this.props.history.replace("/problemset");
} }
showparagraphs = (e,name) => { showparagraphs = (e,name) => {

@ -361,7 +361,7 @@ class Paperlibraryseeid_itemss extends Component {
} }
jixuxuantioncli = () => { jixuxuantioncli = () => {
this.props.history.replace("/question"); this.props.history.replace("/problemset");
} }
showparagraphs = (e,name) => { showparagraphs = (e,name) => {

@ -26,7 +26,7 @@ class Seeoagertit extends Component {
onChange=(e)=> { onChange=(e)=> {
} }
jixuxuantioncli = () => { jixuxuantioncli = () => {
this.props.history.replace("/question"); this.props.history.replace("/problemset");
} }
render() { render() {

@ -400,13 +400,13 @@
color: #4CACFF; color: #4CACFF;
} }
.xiaoshou{ .xiaoshou{
cursor:pointer; cursor:pointer !important;
} }
.xiaoshout{ .xiaoshout{
cursor:default; cursor:default !important;
} }
.shubiao{ .shubiao{
cursor:default; cursor:default !important;
} }
.mt40{ .mt40{
margin-top: 40px; margin-top: 40px;

@ -769,7 +769,7 @@ export function TPMIndexHOC(WrappedComponent) {
{...this.dialogObj} {...this.dialogObj}
/>:""} />:""}
{ {
mypath&&mypath==="/question"? mypath&&mypath==="/problemset"?
"" ""
: :
<SiderBar <SiderBar

@ -50,7 +50,7 @@ export const startProgramQuestion = (id, props) => {
// console.log(path); // console.log(path);
// props.history.push(`/myproblems/${identifier}`); // props.history.push(`/myproblems/${identifier}`);
props.history.push({ props.history.push({
pathname: `/myproblems/${identifier}?${searchParams}`, pathname: `/myproblems/${identifier}.json?${searchParams}`,
}); });
} }
} }

Loading…
Cancel
Save