webpackJsonp([186],{3465:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(291),l=(a.n(n),a(289)),D=a.n(l),i=a(288),s=(a.n(i),a(286)),G=a.n(s),r=a(36),c=(a.n(r),a(37)),q=a.n(c),o=a(64),u=(a.n(o),a(65)),W=a.n(u),p=a(166),m=(a.n(p),a(162)),F=a.n(m),h=a(290),d=(a.n(h),a(287)),J=a.n(d),f=a(0),L=a.n(f),R=a(45),v=a(26),g=a.n(v),$=a(8),b=a(340),x=(a.n(b),function(e,t,a){return t&&E(e.prototype,t),a&&E(e,a),e});function E(e,t){for(var a=0;a
',testIcon1:'
'},saveHTMLToTextarea:!0,dialogMaskOpacity:.6,placeholder:n,imageUpload:!0,imageFormats:["jpg","jpeg","gif","png","bmp","webp","JPG","JPEG","GIF","PNG","BMP","WEBP"],imageUploadURL:l,onload:function(){N("#"+e+' [type="latex"]').bind("click",function(){s.cm.replaceSelection("```latex"),s.cm.replaceSelection("\n"),s.cm.replaceSelection("\n"),s.cm.replaceSelection("```");var e=s.cm.getDoc().getCursor();s.cm.setCursor(e.line-1,0)}),N("#"+e+' [type="inline"]').bind("click",function(){s.cm.replaceSelection("$$$$");var e=s.cm.getDoc().getCursor();s.cm.setCursor(e.line,e.ch-2),s.cm.focus()}),N('[type="inline"]').attr("title","行内公式"),N('[type="latex"]').attr("title","多行公式"),window.md_elocalStorage(s,"exercise__"+e,"Memochallengesnew"),i&&i()}});return s}(t,"100%",400,"","/api/attachments.json",function(){setTimeout(function(){n.resize(),n.cm&&n.cm.refresh()},500),null!=e&&n.setValue(e),n.cm.on("change",function(e,t){a.contentChanged=!0})});this.exercise_editormd=n,window.exercise_editormd=n}},{key:"componentDidMount",value:function(){var l=this,i=this.props.match.params.shixunId,e=this.props.match.params.checkpointId;this.setState({shixunId:i,checkpointId:e});var s="/shixuns/"+i+"/challenges/newquestion",r="/shixuns/"+i+"/challenges/new",c="/shixuns/"+i+"/challenges",t="/shixuns/"+i+"/challenges/"+e+"/edit.json?tab=1";g.a.get(t).then(function(e){var t=e.data.prev_challenge,a=e.data.next_challenge;null!=t&&(t=0===t.st?"/shixuns/"+i+"/challenges/"+t.id+"/editcheckpoint":"/shixuns/"+i+"/challenges/"+t.id+"/editquestion"),null!=a&&(a=0===a.st?"/shixuns/"+i+"/challenges/"+a.id+"/editcheckpoint":"/shixuns/"+i+"/challenges/"+a.id+"/editquestion");var n=[];n=0===e.data.test_sets.length?[{hidden:0,input:"",output:"",score:50},{hidden:0,input:"",output:"",score:50}]:e.data.test_sets,l.setState({power:e.data.power,evaluationlist:n,shixunfilepath:e.data.path,shixunfilepathplay:e.data.exec_path,pathoptionvalue:e.data.show_type,shixunfileexpectpicturepath:e.data.original_picture_path,shixunfilestandardpicturepath:e.data.expect_picture_path,shixunfilepicturepath:e.data.picture_path,prev_challenge:t,next_challenge:a,choice_url:s,practice_url:r,go_back_url:c,position:e.data.position,scorevalue:e.data.test_set_score,markvalue:e.data.test_set_average,web_route:e.data.web_route,has_web_route:e.data.has_web_route}),l.evaluationoninputvalueonload(),!1===e.data.power&&l.props.showSnackbar("你没有权限修改"),void 0===e.data.answer?l.answerMD("","answerMD"):l.answerMD(e.data.answer,"answerMD")}).catch(function(e){})}},{key:"render",value:function(){var a=this,e=this.state,t=e.choice_url,n=e.practice_url,l=e.go_back_url,i=e.position,s=e.evaluationlist,r=e.shixunId,c=e.checkpointId,o=e.power,u=e.shixunfileexpectpicturepath,p=e.shixunfilestandardpicturepath,m=e.shixunfilepicturepath,h=e.shixunfilepath,d=e.evaluationvisible,f=e.trees,v=e.path,g=e.main,b=e.selectpath,x=e.shixunfilepathplay,E=e.pathoptionvalue,y=e.showrepositoryurltiptype,_=e.prev_challenge,N=e.next_challenge,k=e.StudentTaskPapers,w=e.StudentTaskDocs,S=e.web_route,C=e.scorevalue,I=e.markvalue,j=e.scoretype,T=e.has_web_route,P="/shixuns/"+r+"/challenges/"+c+"/editcheckpoint",M="/shixuns/"+r+"/challenges/"+c+"/tab=2",O="/shixuns/"+r+"/challenges/"+c+"/tab=3",H={display:"block",height:"30px",lineHeight:"30px",marginLeft:"20px"};return L.a.createElement(L.a.Fragment,null,L.a.createElement("div",{className:"educontent mt30 mb30"},L.a.createElement("div",{className:"padding10-20 mb10 edu-back-white clearfix"},L.a.createElement("span",{className:"fl ring-blue mr10 mt7"},L.a.createElement("img",{src:Object($.J)("images/educoder/icon/code.svg"),"data-tip-down":"实训任务",className:"fl mt2 ml2"})),L.a.createElement("span",{className:"font-16 task-hide fl TPMtaskName"},"第",i,"关"),L.a.createElement(R.b,{to:void 0===l?"":l,className:"color-grey-6 fr font-15 mt3"},"返回"),void 0===_?"":L.a.createElement("a",{href:_,className:"fr color-blue mr15 mt4"},"上一关"),void 0===N?"":L.a.createElement("a",{href:N,className:"fr color-blue mr15 mt4"},"下一关"),L.a.createElement(R.b,{to:void 0===n?"":n,className:"fr color-blue mr15 mt4",style:{display:4