PageSourceSearch

https://converge.is/_next/static/chunks/6217-95a96a439be461d3.js

js converge.is collected 2026-10-02 01:08:11 UTC 26,641 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6217],{8634:(e,t,i)=>{"use strict";i.d(t,{AY:()=>v,M3:()=>m,Vr:()=>x,dA:()=>g,ds:()=>A,hQ:()=>w,kq:()=>j,qV:()=>p,rj:()=>h,z5:()=>f});var n=i(12360),r=i(95816),s=i.n(r),o=i(83817),a=i.n(o),l=i(72772),d=i.n(l),c=i(32752),u=i(44803);let h=e=>d()((0,c.Qh)(e||"")).length,g=(e,t)=>`${e}-${t}`,m=(e,t,i,n,r,s)=>s?`course-assignment:${i}:${s.courseAssignmentId}:quiz:${r}`:`${e}__${t}__${i}__${n}__${r}`;function p({currentNetworkPath:e,currentSectionPath:t,scopedLog:i,scopedNetworkPath:n,scopedSectionPath:r,scopedDateMs:s,legacyLog:o,legacyNetworkPath:a,legacySectionPath:l,legacyDateMs:d}){if(!(e&&t))return;let c=i&&n===e&&r===t?i:void 0,u=o&&a===e&&l===t?o:void 0;return c&&u?(d??0)>(s??0)?u:c:c??u}function x(e,t,i){let n={};for(let r of e){let e=t(r),s=n[e];(!s||i(r)>i(s))&&(n[e]=r)}return n}let A=e=>e.questions.filter(e=>(0,n.lk)(e)&&e.signedAt&&!s()(e.signatureName)||(0,n.C7)(e)&&a()(e.answerIndexes?.sort(),e.correctAnswerIndexes.sort())||(0,n.k$)(e)&&!(0,u.M)(e.answerHtml)||(0,n.OT)(e)&&e.answerIndex?.toString()===e.corectAnswerIndex?.toString()),v=e=>e.questions.filter(e=>(0,n.lk)(e)&&e.signedAt||(0,n.C7)(e)&&(e.answerIndexes||[]).length>0||(0,n.k$)(e)&&!(0,u.M)(e.answerHtml)||(0,n.OT)(e)&&!!e.answerIndex?.toString()),j=e=>Math.round(A(e).length/e.questions.length*100),f=e=>n.QQ[e.type]||"",w=e=>(0,n.lk)(e)?e.signedAt&&!s()(e.signatureName):(0,n.C7)(e)?a()(e.answerIndexes?.sort(),e.correctAnswerIndexes.sort()):(0,n.k$)(e)?!(0,u.M)(e.answerHtml):!!(0,n.OT)(e)&&e.answerIndex?.toString()===e.corectAnswerIndex?.toString()},12360:(e,t)=>{"use strict";var i;t.lk=t.OT=t.k$=t.C7=t.QQ=t.OH=void 0,t.OH={MultipleChoice:"MultipleChoice",SingleChoice:"SingleChoice",Written:"Written",Signature:"Signature"},(i={})[t.OH.MultipleChoice]="Multiple Answers",i[t.OH.SingleChoice]="Single Answer",i[t.OH.Written]="Written",i[t.OH.Signature]="Signature",t.QQ=i,t.C7=function(e){return e.type===t.OH.MultipleChoice},t.k$=function(e){return e.type===t.OH.Written},t.OT=function(e){return e.type===t.OH.SingleChoice},t.lk=function(e){return e.type===t.OH.Signature}},14291:(e,t,i)=>{"use strict";i.d(t,{Y:()=>g,d:()=>h});var n=i(72877),r=i(7758),s=i(12482),o=i(61489),a=i(55729),l=i(28902),d=i(68485),c=i(88813);function u(e,t){let i=e[t];if(i)return i;let n={activeMs:0,videos:{}};return e[t]=n,n}function h(e,t,i,n){let r=(0,l.jt)(),{data:a=[],status:u,error:h}=(0,s.I)({queryKey:["courseSectionEngagement",t,e,i,n],enabled:!!(t&&e&&i&&n),staleTime:c.gP,refetchInterval:c.gP,refetchIntervalInBackground:!1,refetchOnMount:"always",queryFn:async()=>(await (0,o.GG)((0,o.P)((0,o.rJ)(r,"profiles",t,"courseSectionEngagement"),(0,o._M)("challengeV2Id","==",e),(0,o._M)("network.id","==",i),(0,o._M)("networkTypeId","==",n)).withConverter(d.m.courseSectionEngagement.read))).docs.map(e=>e.data())});return{engagements:a,engagementsBySectionKey:Object.fromEntries(a.map(e=>[(0,c.Jp)(e.blockId,e.sectionId),e])),status:"pending"===u?"loading":u,error:h}}function g({course:e,block:t,section:i,profile:s,network:h,enabled:m}){let p=(0,l.jt)(),x=(0,a.useRef)({}),A=(0,a.useRef)(void 0),v=(0,a.useRef)(s),j=(0,a.useRef)(h);v.current=s,j.current=h;let f=h?.ref.parent.parent?.id,w=h?.id,b=s?.id,y=b&&w&&f?`${f}:${w}:${b}:${e.id}:${t.id}:${i.id}`:void 0,k=(0,a.useCallback)(e=>{if(!m||!y||"visible"!==document.visibilityState||!document.hasFocus())return;let t=u(x.current,y);t.videos=(0,c.Ml)(t.videos,e)},[m,y]);return(0,a.useEffect)(()=>{let s,a=j.current,l=v.current;if(!m||!a||!w||!f||!l||!b||!y)return;let h=(0,o.H9)(p,"profiles",b,"courseSectionEngagement",(0,c.Xr)(f,w,e.id,t.id,i.id)).withConverter(d.m.courseSectionEngagement.write),g=Date.now(),k=g,M=g,S="visible"===document.visibilityState,C=document.hasFocus(),I=!1,$=(d=!1)=>{if(s)return I||=d,s;let g=u(x.current,y),m=Math.min(Math.round(g.activeMs),c.BD),p=g.videos;if(m<=0&&0===Object.keys(p).length)return Promise.resolve();I=d,g.activeMs=Math.max(0,g.activeMs-m),g.videos={};let A=Object.fromEntries(Object.entries(p).map(([e,t])=>[e,{playedMs:(0,o.GV)(Math.round(t.playedMs)),...t.durationMs>0?{durationMs:Math.round(t.durationMs)}:{},...t.completed?{completed:!0}:{}}])),w=!1,k=j.current?.ref.path===a.ref.path?j.current:a,M=v.current?.id===b?v.current:l;return s=(0,o.BN)(h,{network:(0,n.b)(k),networkTypeId:f,profile:(0,r.EW)(M),challengeV2Id:e.id,blockId:t.id,sectionId:i.id,visits:(0,o.GV)(0),activeMs:(0,o.GV)(m),lastSeenAt:(0,o.O5)(),updatedAt:(0,o.O5)(),...Object.keys(A).length>0?{videos:A}:{}},{merge:!0}).then(()=>{w=!0}).catch(e=>{let t=u(x.current,y);for(let[e,i]of(t.activeMs+=m,Object.entries(p)))t.videos=(0,c.Ml)(t.videos,{uploadId:e,...i});console.error("Failed to record course section engagement",e)}).finally(()=>{s=void 0;let e=I;I=!1;let t=u(x.current,y);w&&e&&(t.activeMs>0||Object.keys(t.videos).length>0)&&$(!0)})},O=()=>{let e=Date.now(),t=u(x.current,y);return t.activeMs+=(0,c.Dc)({nowMs:e,previousSampleMs:g,lastActivityMs:k,isVisible:S,isFocused:C}),g=e,e},E=()=>{let e=Date.now();g=(0,c.oJ)({activityMs:e,lastActivityMs:k,previousSampleMs:g}),k=e},V=0,z=()=>{let e=Date.now();e-V>=c.Ui&&(g=(0,c.oJ)({activityMs:e,lastActivityMs:k,previousSampleMs:g}),k=e,V=e)},L=()=>{let e=Date.now();k=e,g=e},H=()=>{C=!0,L()},T=()=>{A.current!==y&&(A.current=y,(0,o.BN)(h,{network:(0,n.b)(a),networkTypeId:f,profile:(0,r.EW)(l),challengeV2Id:e.id,blockId:t.id,sectionId:i.id,visits:(0,o.GV)(1),activeMs:(0,o.GV)(0),lastSeenAt:(0,o.O5)(),updatedAt:(0,o.O5)()},{merge:!0}
1).catch(e=>{A.current===y&&(A.current=void 0),console.error("Failed to record course section visit",e)}))};T();let W=window.setInterval(()=>{T();let e=O();e-M>=c.gP&&(M=e,$())},c.Ui),_=()=>{M=O(),$(!0)},P=()=>{let e="visible"===document.visibilityState,t=O();S=e,e?L():(M=t,$(!0))},N=()=>{O(),C=!1};return window.addEventListener("focus",H),window.addEventListener("blur",N),window.addEventListener("pagehide",_),window.addEventListener("pointerdown",E,{passive:!0}),window.addEventListener("pointermove",z,{passive:!0}),window.addEventListener("scroll",E,{passive:!0}),window.addEventListener("touchstart",E,{passive:!0}),document.addEventListener("keydown",E),document.addEventListener("visibilitychange",P),()=>{window.clearInterval(W),window.removeEventListener("focus",H),window.removeEventListener("blur",N),window.removeEventListener("pagehide",_),window.removeEventListener("pointerdown",E),window.removeEventListener("pointermove",z),window.removeEventListener("scroll",E),window.removeEventListener("touchstart",E),document.removeEventListener("keydown",E),document.removeEventListener("visibilitychange",P),O(),$(!0)}},[t.id,e.id,m,p,w,f,b,i.id,y]),{recordVideoEngagement:k}}},21386:(e,t,i)=>{"use strict";i.d(t,{A:()=>b});var n=i(6029),r=i(12360),s=i(77370),o=i(8996),a=i(47275),l=i(96918),d=i(50800),c=i(16276),u=i(51149),h=i(65668),g=i(86650),m=i(61263),p=i(95816),x=i.n(p),A=i(83817),v=i.n(A),j=i(31170),f=i(44803),w=i(8634);function b({quiz:e,onStartOver:t,isDisplayOnly:i=!1,authoritativeScore:p,authoritativePassed:A,sx:y}){let k=(0,w.ds)(e),M=p??(0,w.kq)(e),S=A??M>=e.minPassingScore;return(0,n.jsxs)(d.A,{sx:y,children:[(0,n.jsx)(c.A,{variant:i?"body2":"h5",fontWeight:"bold",children:"Quiz Results"}),(0,n.jsxs)(c.A,{variant:"body1",children:["Answered ",k.length," out of ",e.questions.length," correct for a ",(0,n.jsxs)("b",{children:["score of ",M,"%"]})," and the minimum passing score was"," ",(0,n.jsxs)("b",{children:[e.minPassingScore,"%."]}),!i&&(S?" Nice work, you passed!":" Please try again in order to complete this section.")]}),(0,n.jsx)(d.A,{sx:{mt:1}}),!i&&(0,n.jsx)(u.A,{sx:{my:2},variant:"contained",onClick:()=>{t?.()},children:"Retake quiz"}),e.questions.map((e,t)=>(0,n.jsxs)("div",{children:[(0,n.jsxs)(h.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,r.C7)(e)&&(v()(e.answerIndexes?.toSorted(),e.correctAnswerIndexes.toSorted())?(0,n.jsx)(l.A,{color:"success"}):(0,n.jsx)(o.A,{color:"error"})),(0,r.lk)(e)&&(e.signedAt&&!x()(e.signatureName)?(0,n.jsx)(l.A,{color:"success"}):(0,n.jsx)(o.A,{color:"error"})),(0,r.k$)(e)&&((0,f.M)(e.answerHtml)?(0,n.jsx)(o.A,{color:"error"}):(0,n.jsx)(l.A,{color:"success"})),(0,r.OT)(e)&&(e.answerIndex===e.corectAnswerIndex?(0,n.jsx)(l.A,{color:"success"}):(0,n.jsx)(o.A,{color:"error"})),(0,n.jsx)(j._,{html:e.questionHtml}),(0,n.jsx)(g.A,{icon:(0,n.jsx)(a.A,{}),size:"small",label:(0,w.z5)(e)})]}),(0,n.jsxs)(m.A,{elevation:0,sx:{ml:4,p:1,mt:1,mb:2,backgroundColor:"action.hover"},children:[(0,r.k$)(e)&&e.answerHtml&&(0,n.jsx)(j._,{html:e.answerHtml}),(0,r.C7)(e)&&(e.answerIndexes?.length?e.answerIndexes.map(t=>(0,n.jsx)("div",{children:e.choices[t]},t)):"No answer"),(0,r.OT)(e)&&(void 0!==e.answerIndex?e.choices[e.answerIndex]:"No answer"),(0,r.lk)(e)&&(0,n.jsxs)(h.A,{alignItems:"center",direction:"row",justifyContent:"space-between",children:[(0,n.jsx)(c.A,{sx:{lineHeight:"15px",fontWeight:"bold",fontSize:30,fontFamily:"'Cedarville Cursive', cursive"},children:e.signatureName}),(0,n.jsx)(c.A,{variant:"body1",fontWeight:"bold",children:e.signedAt?(0,s.formatDateTime)(e.signedAt):""})]})]})]},`${t}:${e.type}:${e.questionHtml}`))]})}},33742:(e,t,i)=>{"use strict";i.d(t,{d:()=>l});var n=i(6029),r=i(56972),s=i(50800),o=i(96902),a=i(16276);function l(e){let t=`${Math.round(e.value)}%`;return(0,n.jsx)(r.A,{title:e.label,arrow:!0,children:(0,n.jsxs)(s.A,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(s.A,{sx:{width:"100%",mr:1},children:(0,n.jsx)(o.A,{variant:"determinate",...e})}),(0,n.jsx)(s.A,{sx:{minWidth:35},children:(0,n.jsx)(a.A,{variant:"body2",color:"text.secondary",children:t})})]})})}i(55729)},36503:(e,t,i)=>{"use strict";function n(e){return Array.isArray(e)?e[0]:e}function r(e,t,i){let n={};for(let[t,i]of Object.entries(e))"course"!==t&&"user"!==t&&(n[t]=i);return t&&(n.course=t),t&&i&&(n.user=i),n}i.d(t,{C:()=>r,p:()=>n})},47275:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(854),r=i(6029);let s=(0,n.A)([(0,r.jsx)("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4z"},"0"),(0,r.jsx)("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-5.99 13c-.59 0-1.05-.47-1.05-1.05 0-.59.47-1.04 1.05-1.04.59 0 1.04.45 1.04 1.04-.01.58-.45 1.05-1.04 1.05m2.5-6.17c-.63.93-1.23 1.21-1.56 1.81-.13.24-.18.4-.18 1.18h-1.52c0-.41-.06-1.08.26-1.65.41-.73 1.18-1.16 1.63
1-1.8.48-.68.21-1.94-1.14-1.94-.88 0-1.32.67-1.5 1.23l-1.37-.57C11.51 5.96 12.52 5 13.99 5c1.23 0 2.08.56 2.51 1.26.37.61.58 1.73.01 2.57"},"1")],"Quiz")},60200:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(854),r=i(6029);let s=(0,n.A)((0,r.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown")},66781:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(854),r=i(6029);let s=(0,n.A)((0,r.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp")},68307:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(71024);let r=i.n(n)()(()=>Promise.all([i.e(4373),i.e(4834),i.e(4548),i.e(8635),i.e(8213),i.e(1379),i.e(7616),i.e(6563),i.e(5245),i.e(5637),i.e(5062),i.e(9503),i.e(7692),i.e(32),i.e(602),i.e(9849),i.e(1868),i.e(9204),i.e(9145),i.e(5191),i.e(3739),i.e(317),i.e(966),i.e(4640),i.e(9496),i.e(1086),i.e(2622),i.e(5281),i.e(9689),i.e(5238),i.e(5711),i.e(300),i.e(6022),i.e(2187),i.e(1170),i.e(8858),i.e(7083)]).then(i.bind(i,27083)),{loadableGenerated:{webpack:()=>[27083]},ssr:!1})},71501:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(854),r=i(6029);let s=(0,n.A)((0,r.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"Launch")},90436:(e,t,i)=>{var n=i(88165),r=i(48877),s=i(98888),o=Math.ceil,a=Math.max;e.exports=function(e,t,i){t=(i?r(e,t,i):void 0===t)?1:a(s(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var d=0,c=0,u=Array(o(l/t));d<l;)u[c++]=n(e,d,d+=t);return u}},99053:(e,t,i)=>{"use strict";i.d(t,{M:()=>eu});var n=i(6029),r=i(77370),s=i(71501),o=i(66781),a=i(60200),l=i(32782),d=i(97748),c=i(20440),u=i(65668),h=i(62100),g=i(16276),m=i(56972),p=i(33009),x=i(40966),A=i(81278),v=i(55729),j=i(63095),f=i(75311),w=i(91681),b=i(50800),y=i(96902),k=i(66860),M=i(75310),S=i(50497),C=i(61263),I=i(61397),$=i(14081),O=i(51908),E=i(71184),V=i(33742),z=i(47656),L=i(51660),H=i(96918),T=i(89175),W=i(84287),_=i(14291),P=i(47228),N=i(88813),q=i(8634),Q=i(21386);function D({course:e,assignee:t}){let[i,s]=v.useState(!1),o=v.useId(),{blockSections:a}=(0,j.z$)(e),l=(0,E.VG)(),{engagementsBySectionKey:x,status:A,error:f}=(0,_.d)(e.id,t.profile.id,l?.id??"",l?.ref.parent.parent?.id??""),{quizResponses:w}=(0,j.xz)({challengeV2Id:e.id,uid:t.profile.id}),b=(0,q.Vr)(w,e=>e.sectionRef.path,e=>e.date),M=v.useMemo(()=>Object.fromEntries(a.flatMap(e=>e.sections.map(t=>[(0,N.Jp)(e.block.id,t.id),(0,N.XU)(t)]))),[a]),S="loading"===A?"Loading...":"error"===A?"Unavailable":void 0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.A,{in:i,unmountOnExit:!0,children:(0,n.jsxs)(k.A,{id:o,severity:"info",sx:{mx:1.5,my:1},children:[(0,n.jsx)(W.A,{children:"How active time is measured"}),(0,n.jsxs)(g.A,{component:"ul",variant:"body2",sx:{mb:0,maxWidth:"75ch",pl:2},children:[(0,n.jsx)("li",{children:"Time counts only while the learner is viewing a course section, the tab is visible, the browser window is focused, and activity occurred within the last 60 seconds."}),(0,n.jsx)("li",{children:"Activity includes pointer clicks or movement, scrolling, touch, keyboard input, and returning focus to the page."}),(0,n.jsx)("li",{children:"Hidden, unfocused, idle, and course-editing time is excluded. Totals accumulate across visits."}),(0,n.jsx)("li",{children:"Time is sampled every 5 seconds and saved about once per minute, or when the learner hides or leaves the page. The report can lag by up to about one minute during an active visit."})]})]})}),(0,n.jsxs)(I.A,{size:"small",sx:{minWidth:e=>e.breakpoints.values.md},children:[(0,n.jsx)($.A,{sx:{backgroundColor:"action.hover"},children:(0,n.jsxs)(d.A,{children:[(0,n.jsx)(c.A,{children:"Section"}),(0,n.jsx)(c.A,{children:"Status"}),(0,n.jsx)(c.A,{align:"right",children:(0,n.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"flex-end",spacing:.5,children:[(0,n.jsx)("span",{children:"Active Time"}),(0,n.jsx)(m.A,{title:"How active time is measured",children:(0,n.jsx)(h.A,{size:"small","aria-label":"How active time is measured","aria-controls":o,"aria-expanded":i,onClick:()=>s(e=>!e),children:(0,n.jsx)(L.A,{fontSize:"small"})})})]})}),(0,n.jsx)(c.A,{align:"right",children:"Video Watched"}),(0,n.jsx)(c.A,{align:"right",children:"Last Viewed"}),(0,n.jsx)(c.A,{align:"right",children:"Completed At"})]})}),(0,n.jsxs)(O.A,{children:["loading"===A&&(0,n.jsx)(d.A,{children:(0,n.jsx)(c.A,{colSpan:6,children:(0,n.jsx)(y.A,{"aria-label":"Loading course engagement"})})}),"error"===A&&(0,n.jsx)(d.A,{children:(0,n.jsx)(c.A,{colSpan:6,children:(0,n.jsxs)(k.A,{severity:"error",children:["Unable to load engagement data. Refresh to try again.",f?` ${f.message}`:""]})})}),a.map(e=>(0,n.jsx)(v.Fragment,{children:e.sections.map(i=>{let s=x[(0,N.Jp)(e.block.id,i.id)],o=(0,N.w4)(s,M[(0,N.Jp)(e.block.id,i.id)]),a="number"==typeof o.percentWatched?`${o.percentWatched}%`:"percent unavailable",l="number"==typeof o.durationMs?(0,N.fZ)(o.durationMs):"duration unavailable";return(0,n.jsxs)(v.Fragment,{children:[(0,n.jsxs)(d.A,{sx:{"& > *":{borderBottom:b[i.ref.path]?"0 !important":"auto"}},children:[(0,n.jsxs)(c.A,{sx:{minWidth:"40%"},children:[(0,n.jsxs)(g.A,{color:"grey.400",component:"span",children:[e.block.name," "]})," / ",(0,n.jsx)(g.A,{component:"span",fontWeight:"bold",children:i.name})]}),(0,n.jsx)(c.A,{children:Object.hasOwn(t.activityLogsBySectionKey,(0,P.s)(e.block.id,i.id))?(0,n.jsx)(m.A,{title:"Completed",children:(0,n.jsx)(H.A,{color:"primary"})}):(0,n.jsx)(m.A,{title:"Incomplete",children:(0,n.jsx)(T.A,{color:"primary"})})}),(0,n.jsx)(c.A,{align:"right",children:S??(s?(0,N.fZ)(s.activeMs):"-")}),(0,n.jsx)(c.A,{align:"right",children:S??(o.videoCount>0?`${(0,N.fZ)(o.playedMs)} / ${l} (${a}, ${(0,N.b8)(o)})`:"-")}),(0,n.jsx)(c.A,{align:"right",children:S??(s?.lastSeenAt?(0,r.formatDateTime)(s.lastSeenAt):"-")}),(0,n.jsx)(c.A,{align:"right",sx:{width:"20%"},children:t.activityLogsBySectionKey[(0,P.s)(e.block.id,i.id)]?(0,r.formatDateTime)(t.activityLogsBySectionKey[(0,P.s)(e.block.id,i.id)].date):""})]},i.id),b[i.ref.path]&&(0,n.jsx)(d.A,{children:(0,n.jsx)(c.A,{colSpan:6,children:(0,n.jsx)(Q.A,{isDisplayOnly:!0,quiz:b[i.ref.path].quiz})})})]},i.id)})},e.block.id))]})]})]})}function G({course:e,assignee:t,isDefaultOpen:i=!1,isOpen:s,onToggle:l}){let[x,A]=(0,v.useState)(i),j=i||(s??x),f=()=>{if(!i){if(l)return void l();A(e=>!e)}},w=100===t.progress?"success.main":t.progress>0?"warning.main":"error.main",y=100===t.progress?"Completed":t.progress>0?"In Progress":"Not Started";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(d.A,{onClick:f,sx:{"& > *":{borderBottom:"0 !important"}},children:[(0,n.jsxs)(c.A,{sx:{display:"flex",alignItems:"center",columnGap:1},children:[(0,n.jsx)(m.A,{title:`Course progress details for ${t.profile.name}`,children:(0,n.jsx)(h.A,{"aria-expanded":j,"aria-label":`${j?"Collapse":"Expand"} progress details for ${t.profile.name}`,size:"small",onClick:e=>{e.stopPropagation(),f()},children:j?(0,n.jsx)(o.A,{}):(0,n.jsx)(a.A,{})})}),(0,n.jsx)(m.A,{title:y,children:(0,n.jsx)(b.A,{sx:{width:12,height:12,borderRadius:"50%",bgcolor:w,flexShrink:0}})}),(0,n.jsx)(z.A,{profile:t.profile}),(0,n.jsx)(u.A,{direction:"column",children:(0,n.jsx)(g.A,{children:t.profile.name})})]}),(0,n.jsx)(c.A,{children:(0,n.jsx)(V.d,{label:`Completed ${t.sectionsDone} / ${t.sectionsTotal} sections`,value:t.progress})}),(0,n.jsx)(c.A,{align:"right",children:t.assignedAt?(0,r.formatDate)(t.assignedAt):"-"})]},t.profile.id),(0,n.jsx)(d.A,{sx:{borderTop:0},children:(0,n.jsx)(c.A,{sx:{maxWidth:0,py:0},colSpan:5,children:(0,n.jsx)(p.A,{in:j,timeout:"auto",mountOnEnter:!0,unmountOnExit:!0,children:(0,n.jsx)(D,{course:e,assignee:t})})})})]})}var R=i(12360),B=i(51149),F=i(16932),J=i(31560),U=i(84493),K=i(61489),Z=i(90436),X=i.n(Z),Y=i(43552),ee=i.n(Y),et=i(28902),ei=i(32752),en=i(68485),er=i(52123);let es=e=>
1{let t=(0,J.GP)(e,"MM/dd/yyyy, h:mm a"),i=e.toLocaleString("en-US",{timeZoneName:"short"}).split(", ")[1].split(" ")[2];return`${t} ${i}`},eo={Name:"","Sections Completed":"","Overall Progress":"","Assigned On":"",Section:"",Status:"","Completed At":"","Active Time":"","Active Time (Seconds)":"","Video Watched":"","Video Watched (Seconds)":"","Video Duration (Seconds)":"","Video Watched Percent":"","Video Completion":"",Visits:"","Last Viewed":"","Quiz Result":"","Quiz Question":"","Quiz Answer":""};function ea({course:e,assigneesMetrics:t,progressStatus:i}){let{blockSections:r,isLoading:s,status:o}=(0,j.z$)(e),{quizResponses:a,status:l}=(0,j.Eu)({challengeV2Id:e.id}),d=(0,et.jt)(),c=(0,E.VG)(),u=c?.ref.parent.parent?.id,h=(0,q.Vr)(a,e=>`${e.profile.id}__${e.sectionRef.path}`,e=>e.date),g=(0,F.n)({mutationFn:async()=>{if(!c||!u)throw Error("Network context is unavailable");if(s||"loading"===l)throw Error("Course analytics are still loading");if("success"!==i)throw Error("Course progress could not be loaded");if("error"===o)throw Error("Course sections could not be loaded");if("error"===l)throw Error("Quiz responses could not be loaded");let n={};for(let i of X()(t,10))for(let{profileId:t,snapshot:r}of(await Promise.all(i.map(async t=>({profileId:t.profile.id,snapshot:await (0,K.GG)((0,K.P)((0,K.rJ)(d,"profiles",t.profile.id,"courseSectionEngagement"),(0,K._M)("challengeV2Id","==",e.id),(0,K._M)("network.id","==",c.id),(0,K._M)("networkTypeId","==",u)).withConverter(en.m.courseSectionEngagement.read))})))))for(let e of r.docs){let i=e.data();n[`${t}__${(0,N.Jp)(i.blockId,i.sectionId)}`]=i}let a=(0,U.df)({useKeysAsHeaders:!0,filename:ee()(`${e.name}-analytics-${new Date().toISOString().split("T")[0]}`)}),g=Object.fromEntries(r.flatMap(e=>e.sections.map(t=>[(0,N.Jp)(e.block.id,t.id),(0,N.XU)(t)]))),m=t.flatMap(e=>[{...eo,Name:e.profile.name,"Sections Completed":e.sectionsDone,"Overall Progress":e.progress,"Assigned On":e.assignedAt?es(e.assignedAt):""},...r.flatMap(t=>t.sections.flatMap(i=>{let r=Object.hasOwn(e.activityLogsBySectionKey,(0,P.s)(t.block.id,i.id)),s=r?es(e.activityLogsBySectionKey[(0,P.s)(t.block.id,i.id)].date):"",o=h[`${e.profile.id}__${i.ref.path}`],a=`${t.block.name} / ${i.name}`,l=n[`${e.profile.id}__${(0,N.Jp)(t.block.id,i.id)}`],d=(0,N.w4)(l,g[(0,N.Jp)(t.block.id,i.id)]);return[{...eo,Section:a,Status:r?"Completed":"Incomplete","Completed At":s,"Active Time":l?(0,N.fZ)(l.activeMs):"","Active Time (Seconds)":l?Math.round(l.activeMs/1e3):"","Video Watched":d.videoCount>0?(0,N.fZ)(d.playedMs):"","Video Watched (Seconds)":d.videoCount>0?Math.round(d.playedMs/1e3):"","Video Duration (Seconds)":"number"==typeof d.durationMs?Math.round(d.durationMs/1e3):"","Video Watched Percent":d.videoCount>0?d.percentWatched??"":"","Video Completion":(0,N.b8)(d),Visits:l?.visits??"","Last Viewed":l?.lastSeenAt?es(l.lastSeenAt):"","Quiz Result":o?`Score: ${(0,q.kq)(o.quiz)}%`:""},...o?o.quiz.questions.map(e=>{let t=(0,q.hQ)(e),i=(0,ei.Qh)(e.questionHtml||"").trim(),n="";return n=(0,R.lk)(e)?e.signedAt?`Signed: ${e.signatureName||"Unknown"}`:"Not signed":(0,R.k$)(e)?(0,ei.Qh)(e.answerHtml||"").trim()||"No answer":(0,R.OT)(e)?void 0!==e.answerIndex?e.choices[e.answerIndex]||"Invalid":"No answer":(0,R.C7)(e)?(e.answerIndexes||[]).map(t=>e.choices[t]).filter(Boolean).join(", ")||"No answers":"No answer",{...eo,Section:a,"Quiz Result":t?"(Correct)":"(Incorrect)","Quiz Question":i,"Quiz Answer":n}}):[]]}))]),p=(0,U.Y_)(a)(m);(0,U.RG)(a)(p)},onError:e=>{console.error("Failed to export course analytics",e),(0,er.Tj)({message:"Unable to export course analytics. Please try again.",severity:"error"})}});return(0,n.jsx)(B.A,{variant:"contained",size:"small",loading:g.isPending,disabled:!c||!u||s||"loading"===l||"loading"===i,onClick:()=>g.mutate(),children:"Export Course Analytics"})}var el=i(77254);function ed({groupId:e,assigneesMetrics:t,network:i}){let r=i?(0,el.H9)(i.ref,"groups",e).withConverter(en.m.group.read):null,{data:s}=r?(0,et.rt)(r):{data:void 0},o=(0,el.P)((0,el.rJ)(s?.ref||i.ref,s?"groupMembers":"noop").withConverter(en.m.groupMember.read)),{data:a=[]}=(0,et.dg)(o);if(!s)return null;let l=a.map(e=>e.profile.id),d=t.filter(e=>l.includes(e.profile.id)),c=d.filter(e=>100===e.progress).length,u=d.length;if(0===u)return null;let h=Math.round(c/u*100);return(0,n.jsxs)(S.Ay,{children:[h,"% of ",s.name," members have completed the course."]}
1)}function ec({course:e,isDefaultOpen:t=!1,expandedAssigneeId:i,onAssigneeToggle:r}){let{assigneesMetrics:s,status:o}=(0,j.Iq)(e),a=(0,E.VG)(),l=s.filter(e=>100===e.progress).length,h=s.length;return"loading"===o?(0,n.jsx)(b.A,{mx:2,mb:2,p:2,children:(0,n.jsx)(y.A,{"aria-label":"Loading course assignees"})}):"error"===o?(0,n.jsx)(b.A,{mx:2,mb:2,p:2,children:(0,n.jsx)(k.A,{severity:"error",children:"Unable to load course assignees. Refresh to try again."})}):(0,n.jsxs)(b.A,{sx:{border:0,borderColor:"grey.100"},mx:2,mb:2,p:2,children:[(0,n.jsx)(g.A,{mb:1,fontWeight:"bold",children:"Completion Statistics"}),(0,n.jsx)(k.A,{severity:l===h?"success":l>0?"warning":"error",sx:{mb:1},children:(0,n.jsxs)(M.A,{sx:{m:0,p:0,"& .MuiListItem-root":{p:0}},children:[(0,n.jsxs)(S.Ay,{children:[l," out of ",h," assigned users have completed the course."]}),a&&e.assignedGroupIds?.map(e=>(0,n.jsx)(ed,{network:a,groupId:e,assigneesMetrics:s},e))]})}),(0,n.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",my:1,children:[(0,n.jsx)(g.A,{mb:0,fontWeight:"bold",children:"Course Assignees"}),(0,n.jsx)(ea,{assigneesMetrics:s,course:e,progressStatus:o})]}),(0,n.jsx)(C.A,{variant:"outlined",children:(0,n.jsxs)(I.A,{size:"small",sx:{maxWidth:"100%"},children:[(0,n.jsx)($.A,{sx:e=>({bgcolor:e.vars.palette.background.default}),children:(0,n.jsxs)(d.A,{children:[(0,n.jsx)(c.A,{sx:{width:"40%"},children:"Assignee Name"}),(0,n.jsx)(c.A,{children:"Progress"}),(0,n.jsx)(c.A,{align:"right",children:"Assigned On"})]})}),(0,n.jsxs)(O.A,{children:[0===s.length&&(0,n.jsx)(d.A,{children:(0,n.jsx)(c.A,{colSpan:4,children:"No assignees added"})}),s.length>0&&s.map(s=>(0,n.jsx)(G,{assignee:s,course:e,isDefaultOpen:t,isOpen:r?i===s.profile.id:void 0,onToggle:r?()=>r(s.profile.id):void 0},s.profile.id))]})]})})]})}let eu=(0,f.L)(function({network:e,course:t,isDefaultOpen:i=!1,isOpen:f,onToggle:b,expandedAssigneeId:y,onAssigneeToggle:k}){let[M,S]=(0,v.useState)(i),C=i||(f??M),{blocks:I,isLoading:$}=(0,j.qL)(t),O=(0,A.useRouter)(),E=(t.assignees||[]).length>0||(t.assignedGroups||[]).length>0,V={backgroundColor:C?"background.paper":"background.default",transition:"background-color 0.2s ease-out"},z=(0,n.jsx)(l.A,{sx:{bgcolor:t.backgroundColor,width:C?80:40,height:C?80:40,transition:"width 0.2s ease-out, height 0.2s ease-out"},src:t.photoUrls[0],alt:t.name,children:t.name[0]}),L=()=>{if(!i){if(b)return void b();S(e=>!e)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(d.A,{onClick:L,sx:{...V,"& > *":{borderBottom:"0 !important"}},children:[(0,n.jsx)(c.A,{children:(0,n.jsxs)(u.A,{direction:"row",spacing:2,alignItems:"center",children:[i?z:(0,n.jsx)(h.A,{"aria-expanded":C,"aria-label":`${C?"Collapse":"Expand"} analytics for ${t.name}`,onClick:e=>{e.stopPropagation(),L()},size:"small",children:z}),(0,n.jsxs)(u.A,{ml:0,direction:"column",children:[(0,n.jsxs)(g.A,{sx:{fontSize:C?24:18,fontWeight:C?"600":"500",transition:"font-size 0.2s ease-out"},children:[t.name,(0,n.jsx)(m.A,{title:"View Course",children:(0,n.jsx)(h.A,{sx:{ml:1},onClick:i=>{i.stopPropagation(),O.push((0,w.$x)(e.slug,t.slug))},children:(0,n.jsx)(s.A,{})})})]}),(0,n.jsx)(g.A,{variant:"subtitle2",color:"text.secondary",children:$?"loading":`${I.length} ${(0,x.mO)("block",I.length)}`})]})]})}),(0,n.jsx)(c.A,{children:(0,r.formatDateTime)(t.createdAt)}),(0,n.jsxs)(c.A,{align:"right",children:[t.assignees.length," ",(0,x.mO)("user",t.assignees.length),", ",(t.assignedGroups||[]).length," ",(0,x.mO)("group",(t.assignedGroups||[]).length)]}),(0,n.jsx)(c.A,{align:"right",children:!0!==i&&(0,n.jsx)(h.A,{"aria-expanded":C,"aria-label":`${C?"Collapse":"Expand"} analytics for ${t.name}`,size:"small",onClick:e=>{e.stopPropagation(),L()},children:C?(0,n.jsx)(o.A,{}):(0,n.jsx)(a.A,{})})})]}),(0,n.jsx)(d.A,{sx:{...V,borderTop:0},children:(0,n.jsx)(c.A,{sx:{p:0},colSpan:5,children:(0,n.jsx)(p.A,{in:C,timeout:"auto",children:C&&E&&(0,n.jsx)(ec,{course:t,isDefaultOpen:!1,expandedAssigneeId:y,onAssigneeToggle:k})})})})]})})}}]);

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.