PageSourceSearch

https://www.methodlearning.com/build/assets/Index-1I3AEXNz.js

js methodlearning.com collected 2026-09-28 11:03:57 UTC 3,155 bytes, 1 lines download raw bytes

1import{C as c,o,c as a,a as t,t as r,k as i,n as d,l as u}from"./instance-CaiqpZWj.js";import{_ as h}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./___vite-browser-external_commonjs-proxy-Dtmx4hP1.js";const _={name:"QuizAttemptIndex",props:["attempts","timers","quiz","testTime"],data(){return{attemptIndex:this.attempts.length-1,attempt:null,timer:typeof this.timers[0]<"u"?this.timers[0]:null,csrf:document.querySelector('meta[name="csrf-token"]').getAttribute("content")}},computed:{canDecrement(){return this.attempts.length>1&&this.attemptIndex!==0},canIncrement(){return this.attempts.length>1&&this.attemptIndex!==this.attempts.length-1}},methods:{incrementAttempt(){this.attemptIndex+1<this.attempts.length&&(this.attemptIndex++,this.setAttempt())},decrementAttempt(){this.attemptIndex-1>=0&&(this.attemptIndex--,this.setAttempt())},setAttempt(){this.attempt=this.attempts[this.attemptIndex],this.timer=this.timers[this.attemptIndex]}},mounted(){this.setAttempt()}},f={class:"card shadow-sm text-center"},z={class:"border-bottom d-flex justify-content-between align-items-center"},x={class:"p-3"},v=["href"],k={class:"me-2"},q={class:"d-flex justify-content-end align-items-center"},b={class:"me-3"},g={key:0,class:"border-top p-3 text-center"},I=["href"],y={key:1,class:"d-flex justify-content-between border-top p-3"},A=["action"],C=["value"],w=["href"],j={key:2,class:"border-top p-3 text-end"},B=["action"],D=["value"];function N(Q,e,n,S,s,m){const l=c("quiz-attempts-show");return o(),a("div",f,[t("div",z,[t("div",x,[t("a",{href:"/quizzes/"+n.quiz.id,class:"d-flex align-items-center mtp-green-link"},[t("span",k,"Quiz "+r(n.quiz.order_id+1),1),e[2]||(e[2]=i(" ▸ "))],8,v)]),t("div",q,[t("template",null,[t("div",b,r(s.attemptIndex+1)+" of "+r(n.attempts.length),1),t("div",{class:d(["p-3 border-start attempt-select",{disabled:!m.canDecrement}]),onClick:e[0]||(e[0]=p=>m.decrementAttempt())}," ⏴ ",2),t("div",{class:d(["p-3 border-start attempt-select",{disabled:!m.canIncrement}]),onClick:e[1]||(e[1]=p=>m.incrementAttempt())}," ⏵ ",2)])])]),u(l,{quiz:n.quiz,attempt:s.attempt,timer:s.timer,"test-time":n.testTime},null,8,["quiz","attempt","timer","test-time"]),s.attempt&&!s.attempt.complete?(o(),a("div",g,[t("a",{href:"/quizzes/"+n.quiz.id+"/attempts/"+s.attempt.id,class:"mtp-green-link"},e[3]||(e[3]=[t("span",{class:"me-2"},"Continue",-1),i(" ▸ ")]),8,I)])):s.attempt?(o(),a("div",y,[t("form",{action:"/quizzes/"+n.quiz.id+"/attempts",method:"post"},[t("input",{type:"hidden",name:"_token",value:s.csrf},null,8,C),e[4]||(e[4]=t("button",{type:"submit",class:"mtp-green-link"},[i(" ↩ "),t("span",{class:"ms-2"},"Retake")],-1))],8,A),t("div",null,[t("a",{href:"/quizzes/attempts/"+s.attempt.id,class:"mtp-green-link"},e[5]||(e[5]=[t("span",{class:"me-2"},"Results",-1),i(" ▸ ")]),8,w)])])):(o(),a("div",j,[t("form",{action:"/quizzes/"+n.quiz.id+"/attempts",method:"post"},[t("input",{type:"hidden",name:"_token",value:s.csrf},null,8,D),e[6]||(e[6]=t("button",{type:"submit",class:"mtp-green-link"},[t("span",{class:"me-2"},"Start Quiz"),i(" ⏵ ")],-1))],8,B)]))])}const E=h(_,[["render",N]]);export{E 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.