You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
p6tsc84h5/static/js/173.aea3a9eb.chunk.js

1 line
41 KiB

5 years ago
webpackJsonp([173],{4037:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a(165),n=(a.n(s),a(164)),g=a.n(n),i=a(1536),o=(a.n(i),a(1535)),w=a.n(o),l=a(46),r=(a.n(l),a(47)),k=a.n(r),c=a(178),u=(a.n(c),a(179)),N=a.n(u),p=a(168),d=(a.n(p),a(167)),m=a.n(d),h=a(296),f=(a.n(h),a(291)),v=a.n(f),y=a(0),_=a.n(y),x=a(45),b=a(12),M=a.n(b),E=a(5),q=a(341),j=(a.n(q),a(4038)),I=a(4039),S=a(4040),R=function(e,t,a){return t&&D(e.prototype,t),a&&D(e,a),e};function D(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}Object(E.Q)(),Object(E.Q)("/editormd/lib/");for(var C=window.$,O=v.a.Option,T=(m.a.Group,[]),P=65,G=0;P<91;P++,G++)T[G]=String.fromCharCode(P);var H=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(V,y.Component),R(V,[{key:"componentDidMount",value:function(){var i=this;this.props.status;var s=this.props.match.params.shixunId,n=this.props.match.params.checkpointId;this.setState({mancheckpointId:s});var o="/shixuns/"+s+"/challenges/newquestion",l="/shixuns/"+s+"/challenges/new",r="/shixuns/"+s+"/challenges";if(void 0===this.props.match.params.choose_id)if(void 0===n){var e="/shixuns/"+s+"/challenges/new.json";M.a.get(e).then(function(e){403===e.data.status||401===e.data.status||500===e.data.status||(i.setState({choice_url:o,practice_url:l,go_back_url:r,position:e.data.position,task_pass_default:e.data.task_pass_default,submit_url:e.data.submit_url,power:!0,activetype:"first"}),403===e.data.status||401===e.data.status||500===e.data.status?i.setState({contentMdRefval:""}):(i.setState({contentMdRefval:e.data.task_pass_default}),i.contentMdRef.current.setValue(e.data.task_pass_default||"")),i.shixunsautoHeight())}).catch(function(e){console.log(e)})}else{var t="/shixuns/"+s+"/challenges/"+n+"/edit.json?st=1";M.a.get(t).then(function(e){if(403!==e.data.status&&401!==e.data.status&&500!==e.data.status){var t=e.data.prev_challenge,a=e.data.next_challenge;null!=t&&(t=0===t.st?"/shixuns/"+s+"/challenges/"+t.id+"/editcheckpoint":"/shixuns/"+s+"/challenges/"+t.id+"/editquestion"),null!=a&&(a=0===a.st?"/shixuns/"+s+"/challenges/"+a.id+"/editcheckpoint":"/shixuns/"+s+"/challenges/"+a.id+"/editquestion"),i.setState({questionaddtype:!1,newquestionaddtype:!1,activetype:"first",prev_challenge:t,next_challenge:a,questionsInputvalue:e.data.subject,questionaddarray:e.data.chooses,challenge_id:e.data.id,mancheckpointId:n,position:e.data.position,choice_url:o,practice_url:l,go_back_url:r,power:e.data.power,answer:e.data.answer}),i.setState({contentMdRefval:e.data.task_pass}),e.data.chooses.length,i.shixunsautoHeight()}}).catch(function(e){console.log(e)})}else{C("html").animate({scrollTop:10},500),this.state.challenge_id;var c=this.props.match.params.shixunId,a="/shixuns/"+c+"/challenges/"+n+"/edit.json?st=1";M.a.get(a).then(function(e){if(403!==e.data.status&&401!==e.data.status&&500!==e.data.status){var t=e.data.prev_challenge,a=e.data.next_challenge;null!=t&&(t=0===t.st?"/shixuns/"+c+"/challenges/"+t.id+"/editcheckpoint":"/shixuns/"+c+"/challenges/"+t.id+"/editquestion"),null!=a&&(a=0===a.st?"/shixuns/"+c+"/challenges/"+a.id+"/editcheckpoint":"/shixuns/"+c+"/challenges/"+a.id+"/editquestion"),i.setState({questionaddtype:!1,newquestionaddtype:!1,prev_challenge:t,next_challenge:a,questionsInputvalue:e.data.subject,questionaddarray:e.data.chooses,challenge_id:e.data.id,mancheckpointId:n,position:e.data.position,choice_url:o,practice_url:l,go_back_url:r,power:e.data.power}),i.setState({contentMdRefval:e.data.task_pass}),0===e.data.chooses.length&&i.questionadd(),i.shixunsautoHeight()}}).catch(function(e){console.log(e)});var u="/shixuns/"+this.props.match.params.shixunId+"/challenges/"+this.props.match.params.checkpointId+"/edit_choose_question.json?ch