webpackJsonp([233],{3715:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(162),l=(a.n(n),a(161)),D=a.n(l),i=a(284),s=(a.n(i),a(282)),G=a.n(s),r=a(30),c=(a.n(r),a(31)),R=a.n(c),o=a(65),u=(a.n(o),a(66)),q=a.n(u),p=a(166),m=(a.n(p),a(165)),W=a.n(m),h=a(287),d=(a.n(h),a(283)),F=a.n(d),f=a(0),L=a.n(f),$=a(45),v=a(12),x=a.n(v),z=a(5),g=a(335),b=(a.n(g),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:s,imageUpload:!0,imageFormats:["jpg","jpeg","gif","png","bmp","webp","JPG","JPEG","GIF","PNG","BMP","WEBP"],imageUploadURL:r,onload:function(){N("#"+n+' [type="latex"]').bind("click",function(){o.cm.replaceSelection("```latex"),o.cm.replaceSelection("\n"),o.cm.replaceSelection("\n"),o.cm.replaceSelection("```");var e=o.cm.getDoc().getCursor();o.cm.setCursor(e.line-1,0)}),N("#"+n+' [type="inline"]').bind("click",function(){o.cm.replaceSelection("`$$$$`");var e=o.cm.getDoc().getCursor();o.cm.setCursor(e.line,e.ch-3),o.cm.focus()}),N('[type="inline"]').attr("title","行内公式"),N('[type="latex"]').attr("title","多行公式"),window.md_elocalStorage(o,"exercise__"+n,"Memochallengesnew"),c&&c()}}));this.exercise_editormd=u,window.exercise_editormd=u}},{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";x.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){console.log(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,M="/shixuns/"+r+"/challenges/"+c+"/editcheckpoint",P="/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(z.M)("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($.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($.b,{to:void 0===n?"":n,className:"fr color-blue mr15 mt4",style:{display:4