PageSourceSearch

https://app.puef.ai/assets/review-assignment.page-zo8qfXau.js

js puef.ai collected 2026-10-05 15:01:38 UTC 5,716 bytes, 1 lines download raw bytes

1import{bf as C,bL as I,r as g,bM as S,j as e,ak as A,B as d,am as q}from"./index-B4_lKB0j.js";import{B as i,S as B,Q,c as k}from"./question-answer-gHDdcCpm.js";import{Q as R}from"./question-skeleton-jNIZm9f5.js";import{s as E}from"./search_icon-CSlyrV_Y.js";import{B as P}from"./back-button-kneAgyKO.js";import{Q as z}from"./question-navigator-BEs0-vIC.js";import{S as D}from"./arrow_left-C0ADZkFO.js";import{S as O}from"./arrow_right-Bw3fXVy3.js";import{a as T}from"./marker_icon-C2eBNoGY.js";import{S as _}from"./square_minus_icon-nHXaoDwv.js";import"./queries-Bb_Y_seP.js";import"./tooltip-wrapper--2PwgTMl.js";import"./instruction-html-Bc4py9-C.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"3b04a436aaa09b871bbc9aaf912981fe6a3097f5"};var r=new n.Error().stack;r&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[r]="f778a612-e207-47cd-a9e0-1d9cc8d374f7",n._sentryDebugIdIdentifier="sentry-dbid-f778a612-e207-47cd-a9e0-1d9cc8d374f7")}catch{}})();const ee=()=>{const{assignmentId:n}=C(),{data:r,status:s}=I(n),[a,o]=g.useState(0),f=r?.questions[a]?.id??null,x=a===0,m=!r||a===r.questions.length-1,b=g.useMemo(()=>(r?.questions??[]).map(t=>t.id),[r]),u=S(n,b),c=(r?.questions??[]).map((t,l)=>{const v=!t.userAnswer,p=u.byQuestionId.get(t.id);return{id:t.id,label:t.questionNo,isCurrent:l===a,state:v?"blank":p?.isCorrectnessReleased?p.isCorrect?"correct":"incorrect":"answered"}}),j=c.filter(t=>t.state==="correct").length,w=u.isComplete&&c.some(t=>t.state==="correct"||t.state==="incorrect"),y=()=>{x||o(t=>t-1)},N=()=>{m||o(t=>t+1)};return s==="pending"?e.jsxs("div",{children:[e.jsx("div",{className:"h-[52px]"}),e.jsx("section",{className:"max-w-(--width-question-panel) mx-auto px-4 lg:px-0",children:e.jsx(h,{})})]}):s==="error"?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx("span",{className:"text-error",children:"Error loading assignment"})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"py-4 px-4 lg:px-0",children:[e.jsx(P,{to:"/assignments",className:"mb-1"}),e.jsxs("nav",{className:"flex items-center gap-2 text-sm",children:[e.jsx(A,{to:"/assignments",className:"text-secondary/50 hover:text-secondary cursor-pointer",children:"Assignments"}),e.jsx("span",{className:"text-secondary/50",children:"/"}),e.jsx("span",{children:r.title})]})]}),e.jsxs("div",{className:"mx-auto pb-24 px-4 lg:px-0 lg:max-w-[1250px] w-full flex gap-5",children:[e.jsx("section",{className:"flex-1 min-w-0 max-w-(--width-question-panel)",children:e.jsx(L,{assignmentId:r.id,currentQuestionId:f})}),e.jsx("aside",{className:"hidden lg:block w-[280px] shrink-0 ml-auto",children:e.jsx("div",{className:"sticky top-[103px] mt-12",children:e.jsx(z,{title:"Questions",items:c,summary:w?`${j} correct`:void 0,onSelect:t=>o(r.questions.findIndex(l=>l.id===t))})})})]}),e.jsx("div",{className:"fixed bottom-0 left-0 right-0 border-t bg-bg-default py-5",children:e.jsx("div",{className:"w-full lg:max-w-[1250px] mx-auto px-4 lg:px-0",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs(d,{variant:"text",onClick:y,disabled:x,className:"text-[13px] lg:text-[15px]",children:[e.jsx(D,{className:"size-3 lg:size-4 mr-2"}),"Previous"]}),e.jsxs("div",{className:"text-[13px] lg:text-base text-secondary font-medium rounded-lg py-[11px] px-[13px] lg:py-[14px] lg:px-[17px]",style:{background:"linear-gradient(0deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.06) 100%), rgba(203, 220, 242, 0.05)"},children:["Question ",a+1," of ",r.questions.length]}),e.jsxs(d,{onClick:N,disabled:m,className:"w-[82px] lg:w-[108px] h-[42px] lg:h-[48px] text-[13px] lg:text-base",children:["Next",e.jsx(O,{className:"size-4 ml-2"})]})]})})})]})},L=({assignmentId:n,currentQuestionId:r})=>{const{data:s,status:a}=q({examId:n,questionId:r,type:"assignment"});return a==="pending"?e.jsx(h,{}):a==="error"?e.jsx("div",{className:"text-center text-error",children:"Error fetching question"}):e.jsxs("div",{className:"py-5",children:[e.jsx("div",{className:"mb-4",children:e.jsx("span",{className:"text-secondary/50 text-sm",children:s.topic})}),e.jsxs("div",{className:"flex items-center justify-between gap-2 mb-6",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(d,{color:"subject",style:E(s.subject),className:"h-8 px-2.5 rounded-lg text-sm",children:["Question ",s.questionNo]})}
1),s.userAnswer?s.correctAnswer?.length?s.isCorrectlyAnswered?e.jsxs(i,{variant:"success",children:["Correct ",e.jsx(T,{className:"size-4"})]}):e.jsxs(i,{variant:"error",children:["Incorrect ",e.jsx(B,{className:"size-4"})]}):e.jsx(i,{className:"bg-[#B2B9C8]/10 text-[#B2B9C8]",children:"Answered"}):e.jsxs(i,{className:"bg-[#B2B9C8]/10 text-[#B2B9C8]",children:["Omitted",e.jsx(_,{className:"size-4"})]})]}),e.jsx(Q,{questionId:s.id,prompt:s.prompt,body:s.body,isHighlightOpen:!1,isVocabularyOpen:!1,difficultWords:[]}),e.jsx("div",{className:"p-4"}),s.answerKeyChangedSinceAttempt?e.jsx("div",{className:"mt-2 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900",children:"This question's correct answer was updated after you answered it. The answer shown below is the current one; your result is the one you were given at the time."}):null,e.jsx(k,{subject:s.subject,type:s.type,choices:s.choices,correctAnswers:s.correctAnswer,isCorrect:s.isCorrectlyAnswered,isAnswered:!0,answer:s.userAnswer,isRegulationsOpen:!1,setIsRegulationsOpen:()=>{},showControls:!1})]})},h=()=>e.jsxs("div",{className:"py-5",children:[e.jsx("div",{className:"h-4 bg-gray-200 rounded-sm w-1/2 mb-4"}),e.jsx(R,{})]});export{ee as ReviewAssignmentPage};

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.