PageSourceSearch

https://familiesforlife.sg/assets/CourseSectionContent.d8169f54.js

js familiesforlife.sg collected 2026-10-03 20:18:08 UTC 4,762 bytes, 1 lines download raw bytes

1import{b as e}from"./element-plus.80abf16b.js";import{c1 as s,bM as o,bK as t,bR as n,cn as a,c2 as c,c3 as l,ca as m,cf as r,bP as p,ce as i,cd as u,c7 as d,c8 as y,bI as b,ep as v,eq as f}from"./commonmodules.b9c1dd40.js";import{u as k}from"./vue-router.5e13d197.js";import C from"./Render.bd0f30dd.js";import{C as g,A as S}from"./model.a6a58c89.js";import{a as T}from"./Assessment.3870574c.js";import j from"./CourseScorm.8ddbd565.js";import{_ as R,u as A,m as I,a as w}from"./index.d3bd9396.js";import _ from"./Loading.a0456e43.js";import"./lodash-es.480d1bd8.js";import"./axios.1263d4b1.js";import"./Grids.fbca83e9.js";import"./Grid.79860c92.js";import"./RenderHtml.81f5c09a.js";import"./MappingDraggable.e454ae97.js";import"./OrderDraggable.f5e5035d.js";import"./MatchingLines.1adcad3d.js";import"./Sliders.ec9170e0.js";const L=e=>(v("data-v-13211e50"),e=e(),f(),e),h={class:"camps-section-content"},x={class:"camps-section-content-top"},N={id:"focus-title",tabindex:"0"},U={class:"camps-section-content-top-right"},B={key:0,class:"score-box"},F=L((()=>m("span",null,"Score: ",-1))),M=L((()=>m("i",{"aria-label":"hidden",class:"icon-ffl icon-ffl-a-Iconmaterial-access-time"},null,-1))),O={class:"camps-section-content-mid"},D={class:"camps-section-content-btm",id:"button-panel"};var P=R(s({__name:"CourseSectionContent",props:{courseUrl:null,pageUrl:null,componentName:null,componentUrl:null,componentType:null,estimatedTime:null,isFirst:{type:Boolean},isLast:{type:Boolean},callback:{type:Function},loadedCallback:{type:Function},submitCallback:{type:Function},completeCallback:{type:Function},componentId:null,percent:null,currentComplete:{type:Boolean},isOrder:{type:Boolean},programmeUrl:null,courseId:null},setup(s,{expose:v}){const f=s,R=A(),L=o();k();const P=t((()=>f.percent)),G=t((()=>R.state.course.assessmentType)),q=t((()=>!!w.getQuery("preview"))),E=t((()=>R.state.course.assessmentData)),H=o(!1),K=o(!1),Q=()=>{f.callback(!1,!0)},z=()=>{q.value||f.componentType!=g.SCORM||f.currentComplete||!f.isOrder?f.callback(!0,!1):R.commit(I.render.setShowScormDialog,!0)},J=async()=>{await L.value.onSubmitClick(),R.state.course.assessmentSubmitSuccess&&(await f.submitCallback(),f.componentType===g.Survey&&(f.isLast?(100==P.value&&f.completeCallback(),100!==P.value&&(H.value=!0,await R.dispatch("course/getAssementById",{assessmentId:f.componentId,isRetry:!1}))):z())),K.value=!1},V=()=>{L.value.onRetryClick()},W=()=>{f.completeCallback()},X=()=>{K.value=!0};return n((()=>{"true"===sessionStorage.getItem("focusAfterNav")&&a((()=>{const e=document.getElementById("focus-title");null==e||e.focus(),sessionStorage.removeItem("focusAfterNav")}))})),v({clearAllLines:()=>{L.value.clearAllLines()},assessmentRef:L}),(s,o)=>{var t,n;const a=e;return c(),l(b,null,[m("div",h,[m("div",x,[m("h4",N,r(f.componentName),1),m("div",U,[f.componentType===p(g).Assessment&&p(G)===p(S).Review?(c(),l("div",B,[F,i(r((null==(t=p(E))?void 0:t.userScore)+"/"+(null==(n=p(E))?void 0:n.totalScore)),1)])):u("",!0),m("em",null,[M,m("span",null,r(" "+f.estimatedTime+" min"),1)])])]),m("div",O,[f.componentType==p(g).Page?(c(),d(C,{key:0,"page-name":f.pageUrl,"page-type":"Course","call-back":f.loadedCallback},null,8,["page-name","call-back"])):u("",!0),f.componentType==p(g).SCORM?(c(),d(j,{key:1,"component-name":f.componentName,"course-url":f.courseUrl,"component-url":f.componentUrl},null,8,["component-name","course-url","component-url"])):f.componentType===p(g).Assessment||f.componentType===p(g).Survey?(c(),d(T,{key:2,ref_key:"assessmentRef",ref:L,"assessment-id":f.componentId,"component-type":f.componentType,showLoading:X},null,8,["assessment-id","component-type"])):u("",!0)]),m("div",D,[f.isFirst?u("",!0):(c(),d(a,{key:0,type:"primary",plain:"",onClick:Q},{default:y((()=>[i("Previous")])),_:1})),p(q)?u("",!0):(c(),l(b,{key:1},[f.componentType!==p(g).Assessment&&f.componentType!==p(g).Survey||p(G)!==p(S).New||p(H)?u("",!0):(c(),d(a,{key:0,type:"primary",onClick:J},{default:y((()=>[i("Submit")])),_:1})),f.componentType===p(g).Assessment&&p(G)===p(S).Review?(c(),d(a,{key:1,type:"primary",onClick:V},{default:y((()=>[i("Retry")])),_:1})):u("",!0)],64)),f.isLast||(f.componentType!==p(g).Assessment&&f.componentType!==p(g).Survey||p(G)!==p(S).Review&&!p(q))&&f.componentType!==p(g).Page&&f.componentType!==p(g).SCORM?u("",!0):(c(),d(a,{key:2,type:"primary",onClick:z},{default:y((()=>
1[i(r("Next"))])),_:1})),p(q)?u("",!0):(c(),l(b,{key:3},[f.isLast&&100===p(P)&&(f.componentType!==p(g).Survey||f.componentType===p(g).Survey&&p(G)===p(S).Review)?(c(),d(a,{key:0,type:"primary",onClick:W},{default:y((()=>[i("Complete Course")])),_:1})):u("",!0)],64))])]),p(K)?(c(),d(_,{key:0})):u("",!0)],64)}}}),[["__scopeId","data-v-13211e50"]]);export{P as default};

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.