PageSourceSearch

https://ruler.online/_next/static/chunks/pages/assessment/[slug]-3f6cc30104ddccec.js

js ruler.online collected 2026-10-02 00:13:03 UTC 19,499 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3861],{64841:function(e,t,s){"use strict";s.d(t,{Z:function(){return b}});var r,n=s(92777),i=s(82262),a=s(10748),o=s(45959),c=s(63553),l=s(37247),u=s(95627),d=s.n(u),p=s(67294),h=s(94184),m=s.n(h),f=s(2664),x=s(41664),g=s.n(x),v=s(17348),y=s(66131),j=s(85893);function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var s,r=(0,l.Z)(e);if(t){var n=(0,l.Z)(this).constructor;s=Reflect.construct(r,arguments,n)}else s=r.apply(this,arguments);return(0,c.Z)(this,s)}}var b=(0,f.$j)((function(e){return{pageScrollPercentage:e.root.pageScrollPercentage}}),(function(e){return{calculateScrollProgress:function(){return e((0,y.Pz)())}}}))(r=function(e){(0,o.Z)(s,e);var t=w(s);function s(){var e;return(0,n.Z)(this,s),(e=t.call(this)).state={style:{visibility:"hidden",opacity:0,marginTop:"0"}},e.handleScroll=e.handleScroll.bind((0,a.Z)(e)),e}return(0,i.Z)(s,[{key:"componentDidMount",value:function(){this.$offsetTop=jQuery("#header-wrapper").outerHeight()}},{key:"handleScroll",value:function(){window.scrollY>this.$offsetTop?this.setState({isStuck:!0,style:{visibility:"visible",marginTop:this.$offsetTop,opacity:1}}):this.setState({isStuck:!1,style:{visibility:"hidden",marginTop:0,opacity:0}}),this.props.calculateScrollProgress()}},{key:"render",value:function(){return(0,j.jsxs)(v.Z,{onWindowScroll:this.handleScroll,children:[(0,j.jsx)(d(),{id:"1566375415",children:[".breadcrumb-container.jsx-1566375415{-webkit-transition:'all 0.2s';transition:'all 0.2s';top:0;}"]}),(0,j.jsxs)("div",{style:this.state.style,className:"jsx-1566375415 "+(m()("breadcrumb-container",{"is-stuck":this.state.isStuck})||""),children:[(0,j.jsx)("div",{className:"jsx-1566375415 breadcrumb-content",children:(0,j.jsx)("div",{className:"jsx-1566375415 grid-container",children:(0,j.jsx)("div",{className:"jsx-1566375415 grid-x padding-x",children:(0,j.jsxs)("div",{className:"jsx-1566375415 small-12 cell",children:[(0,j.jsx)(g(),{href:this.props.subtitle.href,children:(0,j.jsx)("a",{className:"jsx-1566375415 course-link",children:this.props.subtitle.title})}),this.props.title.route?(0,j.jsx)("p",{className:"jsx-1566375415",children:(0,j.jsx)(g(),{href:this.props.title.href,children:(0,j.jsx)("a",{className:"jsx-1566375415",children:this.props.title.title})})}):(0,j.jsx)("p",{className:"jsx-1566375415",children:this.props.title.title})]})})})}),this.props.children,(0,j.jsx)("div",{id:"module-progress",role:"progressbar",tabIndex:"0","aria-valuenow":this.props.pageScrollPercentage,"aria-valuetext":"".concat(this.props.pageScrollPercentage," percent"),"aria-valuemin":"0","aria-valuemax":"100",className:"jsx-1566375415 progress",children:(0,j.jsx)("div",{style:{width:"".concat(this.props.pageScrollPercentage,"%")},className:"jsx-1566375415 progress-meter"})})]})]})}}]),s}(p.Component))||r},71026:function(e,t,s){"use strict";s.d(t,{Z:function(){return m}});var r=s(92777),n=s(82262),i=s(45959),a=s(63553),o=s(37247),c=s(59499),l=s(67294),u=s(2450),d=s(85893);function p(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var s,r=(0,o.Z)(e);if(t){var n=(0,o.Z)(this).constructor;s=Reflect.construct(r,arguments,n)}else s=r.apply(this,arguments);return(0,a.Z)(this,s)}}function m(e){var t=function(t){(0,i.Z)(a,t);var s=h(a);function a(){return(0,r.Z)(this,a),s.apply(this,arguments)}return(0,n.Z)(a,[{key:"render",value:function(){var t=this.props.errorHOCProps,s=t.notFound,r=t.notAllowed,n=t.t
1itle;return s||r?(0,d.jsx)(u.Z,{title:n}):(0,d.jsx)(e,function(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?p(Object(s),!0).forEach((function(t){(0,c.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):p(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}({},this.props))}}],[{key:"getInitialProps",value:function(t){return e.getInitialProps&&e.getInitialProps(t)}}]),a}(l.Component);return(0,c.Z)(t,"defaultProps",{errorHOCProps:{}}),t}},2450:function(e,t,s){"use strict";s(67294);var r=s(41664),n=s.n(r),i=s(15182),a=s(32152),o=s(87411),c=s(85893);t.Z=function(e){var t=e.title;return(0,c.jsxs)(i.Z,{children:[(0,c.jsx)(a.Z,{title:t||o.Z.errors.not_found.title}),(0,c.jsx)("div",{className:"content grid-container",children:(0,c.jsx)("div",{className:"inner-content grid-x grid-padding-x",children:(0,c.jsx)("main",{className:"main small-12 cell",role:"main",children:(0,c.jsx)("div",{className:"content-not-found",children:(0,c.jsxs)("section",{className:"entry-content text-center",children:[(0,c.jsx)("h1",{children:o.Z.errors.not_found.title}),(0,c.jsx)("p",{className:"lead",children:o.Z.errors.not_found.description}),(0,c.jsx)("p",{children:(0,c.jsx)(n(),{href:"/dashboard",className:"button hollow home",children:o.Z.dashboard.name})})]})})})})})]})}},17372:function(e,t,s){"use strict";s.d(t,{Z:function(){return h}});var r=s(92777),n=s(82262),i=s(45959),a=s(63553),o=s(37247),c=s(59499),l=s(67294),u=s(54250),d=s(85893);function p(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var s,r=(0,o.Z)(e);if(t){var n=(0,o.Z)(this).constructor;s=Reflect.construct(r,arguments,n)}else s=r.apply(this,arguments);return(0,a.Z)(this,s)}}var h=function(e){(0,i.Z)(s,e);var t=p(s);function s(){return(0,r.Z)(this,s),t.apply(this,arguments)}return(0,n.Z)(s,[{key:"componentDidUpdate",value:function(e){e.loading&&!this.props.loading&&this.props.onLoadingEnd&&this.props.onLoadingEnd()}},{key:"render",value:function(){return this.props.loading?(0,d.jsx)("div",{className:"loading-container",children:(0,d.jsx)(u.Z,{})}):this.props.render()}}]),s}(l.Component);(0,c.Z)(h,"defaultProps",{loading:!0})},54250:function(e,t,s){"use strict";s.d(t,{Z:function(){return n}});s(67294);var r=s(85893);function n(){return(0,r.jsx)("svg",{className:"ruler-loading",height:"100",width:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{className:"ldl-scale",children:(0,r.jsxs)("g",{className:"ldl-ani",children:[(0,r.jsx)("g",{className:"ldl-layer",children:(0,r.jsx)("g",{className:"ldl-ani red",children:(0,r.jsx)("rect",{fillRule:"nonzero",x:"0",y:"0",width:"48",height:"48"})})}),(0,r.jsx)("g",{className:"ldl-layer",children:(0,r.jsx)("g",{className:"ldl-ani yellow",children:(0,r.jsx)("rect",{fillRule:"nonzero",x:"50",y:"0",width:"48",height:"48"})})}),(0,r.jsx)("g",{className:"ldl-layer",children:(0,r.jsx)("g",{className:"ldl-ani blue",children:(0,r.jsx)("rect",{fillRule:"nonzero",x:"0",y:"50",width:"48",height:"48"})})}),(0,r.jsx)("g",{className:"ldl-layer",children:(0,r.jsx)("g",{className:"ldl-ani green",children:(0,r.jsx)("rect",{fillRule:"nonzero",x:"50",y:"50",width:"48",height:"48"})})})]})})})}},20024:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return D}});var r=s(50029),n=s(92777),i=s(82262),a=s(45959),o=s(63553),c=s(37247),l=s(87794),u=s.n(l),d=s(96486),p=s.n(d),h=s(25935),m=s(67294),f=s(2664),x=s(66261),g=function(e,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},g(e,t)};function v(e){var t=e.className,s=e.counterClockwise,r=e.dashRatio,n=e.pathRadius,i=e.strokeWidth,a=e.style;return(0,m.createElement)("path",{className:t,style:Object.assign({},a,j({pathRadius:n,dashRatio:r,counterClockwise:s})),d:y({pathRadius:n,counterClockwise:s}),strokeWidth:i,fillOpacity:0})}function y(e){var t=e.pathRadius,s=e.counterClockwise?1:0;return"\n      M 50,50\n      m 0,-"+t+"\n      a "+t+","+t+" "+s+" 1 1 0,"+2*t+"\n      a "+t+","+t+" "+s+" 1 1 0,-"+2*t+"\n    "}
1function j(e){var t=e.counterClockwise,s=e.dashRatio,r=e.pathRadius,n=2*Math.PI*r,i=(1-s)*n;return{strokeDasharray:n+"px "+n+"px",strokeDashoffset:(t?-i:i)+"px"}}var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function s(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}(t,e),t.prototype.getBackgroundPadding=function(){return this.props.background?this.props.backgroundPadding:0},t.prototype.getPathRadius=function(){return 50-this.props.strokeWidth/2-this.getBackgroundPadding()},t.prototype.getPathRatio=function(){var e=this.props,t=e.value,s=e.minValue,r=e.maxValue;return(Math.min(Math.max(t,s),r)-s)/(r-s)},t.prototype.render=function(){var e=this.props,t=e.circleRatio,s=e.className,r=e.classes,n=e.counterClockwise,i=e.styles,a=e.strokeWidth,o=e.text,c=this.getPathRadius(),l=this.getPathRatio();return(0,m.createElement)("svg",{className:r.root+" "+s,style:i.root,viewBox:"0 0 100 100","data-test-id":"CircularProgressbar"},this.props.background?(0,m.createElement)("circle",{className:r.background,style:i.background,cx:50,cy:50,r:50}):null,(0,m.createElement)(v,{className:r.trail,counterClockwise:n,dashRatio:t,pathRadius:c,strokeWidth:a,style:i.trail}),(0,m.createElement)(v,{className:r.path,counterClockwise:n,dashRatio:l*t,pathRadius:c,strokeWidth:a,style:i.path}),o?(0,m.createElement)("text",{className:r.text,style:i.text,x:50,y:50},o):null)},t.defaultProps={background:!1,backgroundPadding:0,circleRatio:1,classes:{root:"CircularProgressbar",trail:"CircularProgressbar-trail",path:"CircularProgressbar-path",text:"CircularProgressbar-text",background:"CircularProgressbar-background"},counterClockwise:!1,className:"",maxValue:100,minValue:0,strokeWidth:8,styles:{root:{},trail:{},path:{},text:{},background:{}},text:""},t}(m.Component);var b,N=s(43927),k=s(87411),Z=s(15182),R=s(32152),P=s(88901),_=s(64870),S=s(51057),O=s(85893);function q(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var s,r=(0,c.Z)(e);if(t){var n=(0,c.Z)(this).constructor;s=Reflect.construct(r,arguments,n)}else s=r.apply(this,arguments);return(0,o.Z)(this,s)}}var C,A,E=(0,f.$j)((function(e,t){return{selectedAnswer:e.assessment.answers[t.question.id]||{},correctAnswer:p().find(e.assessment.requests.postAssessmentResult.item.correct_choices,{id:t.question.id})||{}}}),(function(e){return{answerQuestion:function(t,s){return e((0,S.Tl)(t,s))}}}))(b=function(e){(0,a.Z)(s,e);var t=q(s);function s(){return(0,n.Z)(this,s),t.apply(this,arguments)}return(0,i.Z)(s,[{key:"createAnswerHandler",value:function(){var e=this;return function(t){e.props.answerQuestion(e.props.question,t.target.value)}}},{key:"renderChoices",value:function(){var e=this;if(!p().isEmpty(this.props.correctAnswer))return null;var t=null;return"true_false"===this.props.question.question_type&&(t=(0,O.jsx)("div",{className:"grid-x grid-margin-x",children:p().map(this.props.question.assessment_choices,(function(t){return(0,O.jsx)("div",{className:"small-12 medium-6 large-4 cell",children:(0,O.jsxs)("div",{className:"radio",children:[(0,O.jsx)("input",{type:"radio",id:"question-".concat(e.props.question.id,"-choice-").concat(t.id),value:t.id,onClick:e.createAnswerHandler(),checked:t.id===e.props.selectedAnswer.choiceId}),(0,O.jsx)("label",{htmlFor:"question-".concat(e.props.question.id,"-choice-").concat(t.id),children:t.title})]})},t.id)}))})),"single_choice"===this.props.question.question_type&&(t=p().map(this.props.question.assessment_choices,(function(t){return(0,O.jsxs)("div",{className:"radio",children:[(0,O.jsx)("input",{type:"radio",id:"question-".concat(e.props.question.id,"-choice-").concat(t.id),value:t.id,onClick:e.createAnswerHandler(),checked:t.id===e.props.selectedAnswer.choiceId}),(0,O.jsx)("label",{htmlFor:"question-".concat(e.props.question.id,"-choice-").concat(t.id),children:t.title})]},t.id)}))),t}},{key:"renderScenario",value:function(){return this.props.question.scenario_content?(0,O.jsx)("div",{className:"scenario-content",dangerouslySetInnerHTML:{__html:this.props.question.scenario_content}}):null}},{key:"renderFeedback",value:function(){if(p().isEmpty(this.props.correctAnswer))return null;var e=null;return e=null===this.props.selectedAnswer.choiceId?(0,O.jsxs)("div",{className:"incorrect-answer",children:[(0,O.jsx)("i",{className:"icon-remove"}
1)," ",k.Z.page.assessment.noAnswerProvided]}):this.props.selectedAnswer.choiceId===this.props.correctAnswer.choice_id?(0,O.jsxs)("div",{className:"correct-answer",children:[(0,O.jsx)("i",{className:"icon-check"})," ",k.Z.page.assessment.correctAnswer]}):(0,O.jsxs)("div",{className:"incorrect-answer",children:[(0,O.jsx)("i",{className:"icon-remove"})," ",k.Z.page.assessment.incorrectAnswer]}),(0,O.jsx)("div",{className:"small-12 cell",children:(0,O.jsxs)("div",{className:"answer-container",children:[e,(0,O.jsx)("div",{className:"answer-explanation",dangerouslySetInnerHTML:{__html:this.props.correctAnswer.explanation_content}})]})})}},{key:"render",value:function(){return(0,O.jsxs)(O.Fragment,{children:[this.renderScenario(),(0,O.jsx)("div",{className:"assessment-question",children:(0,O.jsxs)("fieldset",{id:"assessment-question-".concat(this.props.number,"-wrapper"),className:"assessment-question-wrapper",children:[(0,O.jsxs)("legend",{children:[this.props.number,"."," ",(0,O.jsx)("span",{dangerouslySetInnerHTML:{__html:this.props.question.title}})]}),this.renderChoices(),this.renderFeedback()]})})]})}}]),s}(m.Component))||b,B=s(71026),T=s(64841),H=s(17372);s(86422);function I(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var s,r=(0,c.Z)(e);if(t){var n=(0,c.Z)(this).constructor;s=Reflect.construct(r,arguments,n)}else s=r.apply(this,arguments);return(0,o.Z)(this,s)}}var L=x.NY,D=(C=(0,f.$j)((function(e){return{assessment:e.assessment.details.item,assessmentLoading:e.assessment.details.loading,answers:e.assessment.answers,answersResults:e.assessment.requests.postAssessmentResult.item,errorHOCProps:{notFound:!e.assessment.details.loading&&p().isEmpty(e.assessment.details.item)},course:e.course.item,courseLoading:e.course.loading}}),(function(e){return{submitAnswers:function(t){return e(_.S.actions.request(t))},resetCorrectAnswers:function(){return e(_.S.actions.requestSuccess({}))},resetSelectedAnswers:function(){return e((0,S.N3)())}}})),(0,P.Z)(A=C(A=(0,B.Z)(A=function(e){(0,a.Z)(s,e);var t=I(s);function s(){return(0,n.Z)(this,s),t.apply(this,arguments)}return(0,i.Z)(s,[{key:"createSubmitAnswersHandler",value:function(){var e=this;return function(){L.scrollToTop({duration:400}),e.props.submitAnswers({data:{assessment_id:e.props.assessment.id,choices:p().compact(p().map(p().values(e.props.answers),"choiceId"))}})}}},{key:"createStartOverHandler",value:function(){var e=this;return function(){L.scrollToTop({duration:400}),e.props.resetSelectedAnswers(),e.props.resetCorrectAnswers()}}},{key:"renderQuestions",value:function(){if(!p().isEmpty(this.props.assessment.assessment_questions))return p().map(this.props.assessment.assessment_questions,(function(e,t){return(0,O.jsx)(E,{question:e,number:t+1},e.id)}))}},{key:"renderResult",value:function(){return p().isEmpty(this.props.answersResults)?null:(0,O.jsxs)("div",{className:"grid-x grid-padding-x align-center align-middle assessment-score",children:[(0,O.jsx)("div",{className:"assessment-score-text large-3 medium-4 small-6 cell",children:k.Z.page.assessment.yourScore}),(0,O.jsx)("div",{className:"assessment-chart large-3 medium-4 small-6 cell",children:(0,O.jsx)(w,{className:"circular-chart orange",value:this.props.answersResults.assessment_score.assessment_score,text:"".concat(this.props.answersResults.assessment_score.assessment_score,"%"),strokeWidth:"7",styles:{path:{stroke:"#33A650",strokeLinecap:"butt"},text:{fill:"#000000",fontSize:"1.55em",fontWeight:600,textAnchor:"middle"},trail:{stroke:"#EBEFF3"}}})})]})}},{key:"renderSubmitButton",value:function(){return p().isEmpty(this.props.answersResults)?(0,O.jsx)("button",{className:"button submit",type:"submit",onClick:this.createSubmitAnswersHandler(),children:k.Z.page.assessment.checkAnswersButton}):(0,O.jsx)("button",{className:"button submit",type:"submit",onClick:this.createStartOverHandler(),children:k.Z.page.asse
1ssment.startOverButton})}},{key:"render",value:function(){var e=this,t=this.props,s=t.course,r=t.courseLoading,n=t.assessment,i=t.assessmentLoading;return(0,O.jsxs)(Z.Z,{children:[(0,O.jsx)(R.Z,{title:n.title||k.Z.page.courseDetails.assessmentTitle}),(0,O.jsx)(H.Z,{loading:i||r||p().isEmpty(n)||p().isEmpty(s),render:function(){return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(T.Z,{title:{title:n.title},subtitle:{title:p().get(s,"name"),href:N.jk.courseDetails(p().get(s,"slug"))}}),(0,O.jsx)("div",{className:"content",children:(0,O.jsx)("main",{role:"main",children:(0,O.jsxs)("article",{className:"assessments type-assessments status-publish hentry",itemScope:!0,itemType:"http://schema.org/BlogPosting",children:[(0,O.jsx)("header",{className:"single-post-header",children:(0,O.jsx)("div",{className:"grid-container",children:(0,O.jsx)("div",{className:"grid-x align-center",children:(0,O.jsxs)("div",{className:"small-12 medium-12 large-7 cell",children:[(0,O.jsxs)("h1",{className:"page-title",children:[(0,O.jsxs)("span",{children:[k.Z.page.assessment.testYourKnowledge,":"]}
1),(0,h.ZP)(n.title)]}),(0,O.jsx)("div",{dangerouslySetInnerHTML:{__html:n.content}})]})})})}),(0,O.jsx)("div",{id:"assessment-questions",className:"grid-container assessment-questions-container",children:(0,O.jsx)("div",{className:"grid-x align-center",children:(0,O.jsxs)("div",{className:"small-12 large-7 cell",children:[e.renderResult(),e.renderQuestions(),e.renderSubmitButton()]})})})]})})})]})}})]})}}],[{key:"getInitialProps",value:function(){var e=(0,r.Z)(u().mark((function e(t){var s,r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=t.store,r=t.req,n=t.query,s.dispatch((0,S.T7)({req:r,assessmentSlug:n.slug}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),s}(m.Component))||A)||A)||A)},56701:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/assessment/[slug]",function(){return s(20024)}])},86422:function(){}},function(e){e.O(0,[4186,1445,1111,5999,4885,1845,3253,1664,174,7296,8901,9774,2888,179],(function(){return t=56701,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
2//# sourceMappingURL=[slug]-3f6cc30104ddccec.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.