1import{_ as c}from"./WxRUkbtH.js";import{m as z,l as a,bB as E,_ as f,o as n,e as d,i,h as g,g as l,q as _,t as o,f as r,x as v,a3 as U,I as q,s as O,v as x}from"./CjU924Rn.js";import{_ as m,q as p}from"./DfD8LUfd.js";import{_ as L}from"./DJ08ig2O.js";import"./BSJyBmdS.js";import"./yCGzEHy7.js";import"./GTTuLbdn.js";import"./EZM_Opov.js";import"./BeFZW8zY.js";import"./B-f9BHOx.js";import"./xIY3PE1F.js";import"./DApGTt_6.js";import"./r4fRLP6T.js";import"./-8JjO_8n.js";import"./C-8gkkfq.js";const N={name:"StudioQuiz",components:{Quiz:m,StudioLogo:c},computed:{...z(a,{studio:"currentStudio"}),studioURL(){return this.$studioURL},isGradable(){var t;return(t=this.quiz)==null?void 0:t.is_gradable}},setup(){},data(){return{solvedQuizProp:null,currentQuestionIndexProp:1,quiz:null,currentScreenType:null}},async mounted(){try{await a().getStudio(this.studioURL)}catch(t){this.$notify({group:"app",type:"error",title:this.$t("STUDIO.NOTIFICATIONS.LOAD_STUDIO_ERROR"),text:`Error: ${t}`,duration:-1})}},methods:{quizOrQuestionnaire:p,quizInfo(t){this.quiz=t},getsolvedQuizProp(t){this.solvedQuizProp=t},getCurrentQuestionIndexProp(t){this.currentQuestionIndexProp=t},leave(){this.$router.push({name:"studio-home-page"})},leaveQuiz(){if(this.currentScreenType!=="questions"){this.leave();return}this.$modal.show(E,{title:this.$t("QUIZZES.TITLE.EXIT_QUIZ"),subtitle:this.$t("GENERAL.TEXT.DO_YOU_REALLY_WANT_TO_DO_IT"),text:this.$t(`QUIZZES.TEXT.ONLY_ANSWERED_ANSWERS_WILL_BE_SUBMITTED_${p(this.isGradable)}`),confirmButton:this.$t("QUIZZES.BUTTON.DISCARD"),discardButton:this.$t("QUIZZES.BUTTON.STAY_ON_PAGE"),discard:()=>{console.log("confirmed")},confirm:()=>this.leave()})}}},R=t=>(O("data-v-0e375229"),t=t(),x(),t),Z={class:"quiz-student-topbar fixed-top quiz-student-topbar--lg"},y={class:"flex-item me-4"},B={key:0},C={class:"font-weight-bold"},P={class:"container mt-4"},A=R(()=>i("div",{class:"page-bottom-filler"},null,-1));function D(t,u,b,$,s,e){const I=c,h=q,S=m,T=L;return n(),d("div",null,[i("div",Z,[t.studio?(n(),g(I,{key:0,class:"logo-image mx-2 mx-lg-4",studio:t.studio},null,8,["studio"])):l("",!0),i("div",y,[s.solvedQuizProp?(n(),d("span",B,[_(o(t.$t("QUIZZES.TEXT.QUESTION"))+" ",1),i("span",C,o(s.currentQuestionIndexProp)+" "+o(t.$t("QUIZZES.TEXT.OF"))+" "+o(s.solvedQuizProp.quiz.quiz_questions.length),1)])):l("",!0),r(h,{class:"ms-4",color:"outline-gray",onClick:e.leaveQuiz},{default:v(()=>[_(o(t.$t("QUIZZES.BUTTON.LEAVE")),1)]),_:1},8,["onClick"])])]),i("div",P,[r(S,{studioURL:e.studioURL,quizId:parseInt((t._.provides[U]||t.$route).params.quiz_id),onSolvedQuiz:e.getsolvedQuizProp,onQuizInfo:e.quizInfo,onCurrentQuestionIndex:e.getCurrentQuestionIndexProp,onClose:e.leave,onFinish:e.leave,onScreenTypeChanged:u[0]||(u[0]=Q=>s.currentScreenType=Q)},null,8,["studioURL","quizId","onSolvedQuiz","onQuizInfo","onCurrentQuestionIndex","onClose","onFinish"]),A,r(T,{class:"footer-fixed"})])])}const ot=f(N,[["render",D],["__scopeId","data-v-0e375229"]]);export{ot as default}; 2//# sourceMappingURL=BRC4KUwW.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.