Files
sm-bm-plugin/public/assets/QuizzesView-DIIO1O2v.js
Jakub Zych ebd9117f8c feat: lecturer on class sessions and in the session course ref
The schedule showed a lecturer only where the session notes named one
(Globalizacja), so the student plan had nobody under the other courses.
The session JSON now carries the course lecturer in its course ref and an
optional per-session lecturer (new nullable column, admin field, seed key)
for courses shared between two people. The student app shows the
session's own lecturer or, failing that, the course's.
2026-10-17 11:20:11 +02:00

2 lines
1.9 KiB
JavaScript

import{_ as g}from"./PageHead.vue_vue_type_script_setup_true_lang-BJjYuJvl.js";import{_ as w}from"./LoadState.vue_vue_type_script_setup_true_lang-BD6A8a9g.js";import{q as z,_ as x}from"./quizzes-av2RLNrx.js";import{d as j,q as B,c as s,h as d,i as k,r as m,G as N,o as t,F as p,y as V,B as $,a as o,t as n,e as l,m as _,b as h,k as b}from"./index-C9sCss04.js";import{c as f}from"./format-bcE-cYHJ.js";const C={key:0,class:"stack"},F={key:0,class:"muted small",style:{margin:"0 0 8px"}},Q={class:"small",style:{margin:"0"}},T={key:1,class:"empty"},A={key:2,class:"section","aria-labelledby":"hist-h"},D={class:"card"},R=j({__name:"QuizzesView",setup(E){const i=m(null),c=m([]),u=m("");async function y(){u.value="";try{const[r,a]=await Promise.all([z.list(),z.attempts()]);i.value=r,c.value=a.data}catch(r){u.value=N(r)}}return B(y),(r,a)=>{const v=b("router-link");return t(),s("div",null,[d(g,{eyebrow:"Fiszki i testy",title:"Quizy"}),d(w,{ready:i.value!==null,error:u.value,onRetry:a[0]||(a[0]=e=>y())},{default:k(()=>[i.value?.length?(t(),s("div",C,[(t(!0),s(p,null,V(i.value,e=>(t(),$(v,{key:e.id,to:`/quizy/${e.slug}`,class:"card link accent"},{default:k(()=>[o("h3",null,n(e.title),1),e.description?(t(),s("p",F,n(e.description),1)):l("",!0),o("p",Q,[_(n(h(f)(e.question_count,"pytanie","pytania","pytań")),1),e.round_size?(t(),s(p,{key:0},[_(" · rundy po "+n(e.round_size),1)],64)):l("",!0),e.attempts_count?(t(),s(p,{key:1},[_(" · "+n(h(f)(e.attempts_count,"zakończone podejście","zakończone podejścia","zakończonych podejść")),1)],64)):l("",!0)])]),_:2},1032,["to"]))),128))])):(t(),s("p",T,"Nie ma jeszcze żadnych quizów.")),c.value.length?(t(),s("section",A,[a[1]||(a[1]=o("div",{class:"section-head"},[o("h2",{id:"hist-h"},"Historia podejść")],-1)),o("div",D,[d(x,{attempts:c.value,"show-quiz":""},null,8,["attempts"])])])):l("",!0)]),_:1},8,["ready","error"])])}}});export{R as default};