1"use strict";(self["webpackChunkfmf_website"]=self["webpackChunkfmf_website"]||[]).push([[598],{56022:function(t,e,s){s.r(e),s.d(e,{default:function(){return c}});var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"fill vcontainer exam"},[t.showCelebration?e("div",{staticClass:"celebration-container"},[t._l(80,function(t){return e("div",{key:t,staticClass:"confetti",style:{left:100*Math.random()+"%",backgroundColor:["#FF5252","#FFD740","#40C4FF","#69F0AE","#EA80FC","#FF8A65","#9C27B0"][Math.floor(7*Math.random())],animationDelay:1.5*Math.random()+"s",animationDuration:1.5+1.5*Math.random()+"s",transform:`rotate(${360*Math.random()}deg)`}})}),t._m(0)],2):t._e(),e("div",{staticClass:"hcontainer vcenter flex-between header"},[e("span",[t._v("Exam Details")]),e("span",{staticClass:"tip"},[t._v("Do not refresh the page while taking the exam")]),e("div",{staticClass:"exit-btn",on:{click:t.closeClick}},[t._v("Exit")])]),e("div",{staticClass:"fill vcontainer content"},[e("div",{staticClass:"content-scroll"},[e("span",{staticClass:"title"},[t._v(t._s(t.title))]),t.isExamFinish?e("div",{staticClass:"vcontainer content-top"},[e("span",{class:["result-message",t.isExamPass?"mb-10 correct":"mb-20 error"]},[t._v(" "+t._s(t.isExamPass?"Congratulations on completing all lessons in this course and successfully passing the examination!":"Unfortunately, you did not pass this exam, Keep pushing forward!")+" ")]),t.isExamPass?[e("span",{staticClass:"pass-tip"},[t._v("We will award you a Course Completion Certificate and add your name to the global list of course graduates.")]),e("span",{staticClass:"pass-tip mb-20"},[t._v("Please "),e("a",{staticClass:"download-link",attrs:{href:"#"},on:{click:t.downloadClick}},[t._v("click here")]),t._v(" to download your certificate")])]:t._e(),e("el-descriptions",{attrs:{title:"",direction:"vertical",column:t.resultDescColumns,border:!0,"label-style":{backgroundColor:"#DCE4EA",color:"#1E2224",fontWeight:"bold",textAlign:"center",border:0},"content-style":{color:"#1E2224",fontWeight:"bold",textAlign:"center"}}},[e("el-descriptions-item",{attrs:{label:"Total"}},[t._v(t._s(t.resultData.total))]),e("el-descriptions-item",{attrs:{label:"Correct","content-style":{color:"#00BB5E",fontWeight:"bold",textAlign:"center"}}},[t._v(t._s(t.resultData.correct))]),e("el-descriptions-item",{attrs:{label:"Incorrect","content-style":{color:"#C40000",fontWeight:"bold",textAlign:"center"}}},[t._v(t._s(t.resultData.incorrect))]),e("el-descriptions-item",{attrs:{label:"PassingStandard"}},[t._v(t._s(t._f("percentF")(t.resultData.passingStandard)))]),e("el-descriptions-item",{attrs:{label:"answerAccuracy"}},[t._v(t._s(t._f("percentF")(t.resultData.answerAccuracy)))]),e("el-descriptions-item",{attrs:{label:"ExamResults","content-style":{color:t.isExamPass?"#00BB5E":"#C40000",fontWeight:"bold",textAlign:"center"}}},[t._v(t._s(t.isExamPass?"Pass":"Failed"))])],1)],2):e("div",{staticClass:"hcontainer vcenter flex-between content-top"},[e("div",{staticClass:"hcontainer vcenter timer"},[e("i",{staticClass:"el-icon-time"}),e("span",[t._v(t._s(t.timeStr))])])]),e("div",{staticClass:"vcontainer content-container"},t._l(t.listData,function(s,a){return e("div",{key:s.id,staticClass:"vcontainer item-container"},[e("div",{staticClass:"hcontainer vcenter flex-between"},[e("div",{staticClass:"hcontainer flex-start"},[e("span",[t._v(t._s(a+1)+".")]),e("div",{staticClass:"ml-5",domProps:{innerHTML:t._s(s.question||"")}})]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isExamFinish,expression:"isExamFinish"}]},[t.resultData.userQuestionSaveReqVOList&&t.resultData.userQuestionSaveReqVOList[a]?.correctAnswer==t.selectedAnswers[a]?e("i",{staticClass:"el-icon-check correct"}):e("i",{staticClass:"el-icon-close error"})])]),e("el-radio-group",{attrs:{disabled:t.isExamFinish},model:{value:t.selectedAnswers[a],callback:function(e){t.$set(t.selectedAnswers,a,e)},expression:"selectedAnswers[index]"}},["true_or_false"==s.questionType?[e("el-radio",{staticClass:"item-option",attrs:{label:"A"}},[e("div",{staticClass:"hcontainer flex-start"},[e("span",{staticClass:"item-option-question"},[t._v("A.")]),e("div",{staticClass:"ml-5"},[t._v("True")])])]),e("el-radio",{staticClass:"item-option",attrs:{label:"B"}},[e("div",{staticClass:"hcontainer flex-start"},[e("span",{staticClass:"item-option-question"},[t._v("B.")]),e("div",{staticClass:"ml-5"},[t._v("False")])])])]:t._l(s.questionOptionRespVO||[],function(s){return e("el-radio",{key:s.questionOption,staticClass:"item-option",attrs:{label:s.questionOption}},[e("div",{staticClass:"hcontainer flex-start"},[e("span",{staticClass:"item-option-question"},[t._v(t._s(s.questionOption)+".")]),e("div",{staticClass:"ml-5",domProps:{innerHTML:t._s(s.optionContent||"")}})])])}
1)],2),t.isExamFinish?e("div",{staticClass:"vcontainer result-section"},[e("span",{class:[t.resultData.userQuestionSaveReqVOList&&t.resultData.userQuestionSaveReqVOList[a]?.correctAnswer==t.selectedAnswers[a]?"correct":"error"]},[t._v("Correct Answer: "+t._s(t.resultData.userQuestionSaveReqVOList[a]?.correctAnswer))]),e("span",{staticClass:"explanation"},[e("p",{staticClass:"tip"},[t._v("Explanation: ")]),t._v(t._s(t.resultData.userQuestionSaveReqVOList&&t.resultData.userQuestionSaveReqVOList[a]?.explanation||""))])]):t._e()],1)}),0)]),e("div",{staticClass:"hcontainer hcenter vcenter footer"},[t.listData.length&&!t.isExamFinish?e("el-button",{staticClass:"footer-btn w-180",on:{click:t.submitExam}},[t._v("Done")]):t._e(),t.isExamFinish?e("el-button",{class:["w-200","mr-50",t.isExamPass?"footer-btn":""],on:{click:t.goToEducation}},[t._v("Back to education")]):t._e(),t.isExamFinish&&!t.isExamPass?e("el-button",{staticClass:"footer-btn w-180",on:{click:t.webuserCourseExaminationFn}},[t._v("Retake test")]):t._e()],1)])])},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"celebration-text"},[e("span",[t._v("Congratulations! You have passed the test!")])])}],n=(s(44114),s(18111),s(7588),{name:"ExamPage",data(){return{title:localStorage.getItem("courseTitle")||"Education Exam",leftTime:1800,timer:null,resultData:{total:void 0,correct:void 0,incorrect:void 0,passingStandard:"",answerAccuracy:"",examResults:""},listData:[],selectedAnswers:[],isExamFinish:!1,showCelebration:!1,resultDescColumns:6}},filters:{percentF(t){if(!t||0==t||isNaN(t))return"-";const e=Math.round(100*t);return`${e}%`}},computed:{timeStr(){const t=String(Math.floor(this.leftTime/60)).padStart(2,"0"),e=String(this.leftTime%60).padStart(2,"0");return`${t}:${e}`},isExamPass(){return 1===this.resultData.examResults}},methods:{startTimer(){this.timer&&clearInterval(this.timer),this.leftTime=1800,this.timer=setInterval(()=>{this.leftTime<=0?(clearInterval(this.timer),this.leftTime=0,this.submitExam()):this.leftTime--},1e3)},submitExam(){let t=[];this.listData.forEach((e,s)=>{t.push({id:e.id,userAnswer:this.selectedAnswers[s]})});const e={coursesId:localStorage.getItem("courseId"),userQuestionSaveReqVOList:t};this.$api.webuserSubmitCourseExamination(e).then(t=>{200!==t.code&&0!==t.code||!t.data||(this.resultData=t.data,this.isExamFinish=!0,this.timer&&(clearInterval(this.timer),this.timer=null),1===this.resultData.examResults&&(this.showCelebration=!0,setTimeout(()=>{this.showCelebration=!1},4e3)))}).catch(t=>{this.$message.error("Error submitting exam: "+t.message)})},closeClick(){localStorage.removeItem("courseId"),localStorage.removeItem("courseTitle"),localStorage.removeItem("examLanguage"),window.close()},goToEducation(){this.$router.push("/course?categoryName=Education")},downloadClick(){const t=localStorage.getItem("courseId"),e="/app-api/fmf/webuser/courseCompletionCertificate/"+t;this.$utils.downloadUrl(e,this.title)},updateResultDescColumns(){if("undefined"===typeof window)return;const t=window.innerWidth;this.resultDescColumns=t<=480?1:t<=640?2:t<=900?3:t<=1100?4:6},webuserCourseExaminationFn(){this.isExamFinish=!1;const t=localStorage.getItem("courseId"),e=localStorage.getItem("examLanguage")||"";t?this.$api.webuserCourseExamination({courseId:t,language:e}).then(t=>{200!==t.code&&0!==t.code||!Array.isArray(t.data)?(this.listData=[],this.selectedAnswers=[]):(this.listData=t.data,this.selectedAnswers=new Array(this.listData.length).fill(""),this.startTimer())}).catch(t=>{console.log("err:",t),this.listData=[],this.selectedAnswers=[]}):this.$message.warning("Please start new exam from main page!")}},created(){this.webuserCourseExaminationFn()},mounted(){this.updateResultDescColumns(),window.addEventListener("resize",this.updateResultDescColumns)},beforeDestroy(){window.removeEventListener("resize",this.updateResultDescColumns),this.timer&&(clearInterval(this.timer),this.timer=null)}}),r=n,o=s(81656),l=(0,o.A)(r,a,i,!1,null,"076a9cee",null),c=l.exports}}]); 2//# sourceMappingURL=Exam.8b28e620.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.