PageSourceSearch

https://clipo.ai/assets/CourseSharePage-EkJJQTwh.js

js clipo.ai collected 2026-10-05 11:56:27 UTC 17,254 bytes, 4 lines download raw bytes

1import{r as k,hd as q,j as e,fv as pe,X as d,T as l,P as p,I as U,he as A,n as g,hf as xe,b as S,a as V,m as ge,L as be,aP as X,d as je,a5 as F,ag as G,hg as N,aO as v,gK as ye,e as C,B as fe,y as K,x,c as Z,hh as J,t as Y,D as ee,C as w,fn as Se,w as I,e9 as Ce,a9 as te,v as ke,fD as ve,Z as we,gF as Le,hi as Pe,hj as Re,hk as Oe,hl as Be,S as _e,h1 as Ae,hm as Ie}from"./index-aREvobyF.js";import{P as Te}from"./PageMetaHeader-6lUw-EYb.js";import{I as re}from"./input-group-BhrJGvNG.js";import{T as ze}from"./teacher-female-with-pencil-hMjmoM9x.js";import{E as se}from"./EmptyResource-BpXdf03_.js";import{b as Ee}from"./index-DKI3YRrb.js";import{S as ne}from"./SimpleTable-DF7EMZw0.js";import{A as De,a as Me,b as Qe,c as We}from"./alert-Brzb1jZD.js";import{T as Fe}from"./teacher-female-with-note-lvzcwINb.js";import"./input-element-D7gNC_RA.js";import"./link-box-DcUyRFYn.js";import"./table-BqH1TAsn.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="9ba56665-2cdd-4b67-99cb-aed2867f3e47",t._sentryDebugIdIdentifier="sentry-dbid-9ba56665-2cdd-4b67-99cb-aed2867f3e47")}catch{}const Ne=({courseKey:t})=>{const[r,n]=k.useState(!1),{url:o,copied:a,copyLink:m}=q(t);return e.jsx(pe,{size:"sm",open:r,unmountOnExit:!1,positioning:{placement:"bottom-end"},showCloseButton:!1,header:e.jsx(l,{textStyle:"b1-semibold-compact",children:"수업 공유 링크"}),contentProps:{width:"24rem"},trigger:e.jsxs(g,{circle:!0,variant:"outline",children:[e.jsx(A,{})," 수업 링크 공유"]}),content:e.jsxs(d,{align:"stretch",gap:4,children:[e.jsxs(d,{align:"stretch",gap:2,children:[e.jsx(l,{textStyle:"b2-regular",children:"아래 링크를 공유하고, 의견을 주고받아 보세요."}),e.jsxs(p,{children:[e.jsx(re,{flex:1,minW:0,startElement:e.jsx(A,{size:"0.875rem"}),children:e.jsx(U,{readOnly:!0,"aria-label":"수업 공유 링크",value:o,textOverflow:"ellipsis"})}),e.jsx(g,{colorPalette:"gray",variant:"surface",onClick:m,children:a?"복사됨":"복사"})]})]}),e.jsx(xe,{onOpen:()=>n(!1)})]}),onOpenChange:({open:u})=>n(u)})},$e=({courseKey:t})=>{const r=S({defaultOpen:!0}),n=V(),o=`/teachers/courses/${t}/projects/create`;return e.jsxs(ge,{flex:1,direction:"column",children:[e.jsx(se,{image:ze,title:"공동 평가를 시작할 수행평가가 설계되지 않았어요.",description:"수행평가 설계로 이동하여 수행평가를 생성한 후 공동 평가를 시작해 주세요.",children:e.jsx(g,{asChild:!0,circle:!0,mt:"1.5rem",children:e.jsx(be,{to:o,children:"수행평가 설계 생성"})})}),e.jsx(X,{trigger:r,customIcon:Ee,title:"공동 평가를 진행할 수행평가를 먼저 생성해 주세요.",description:"수행평가 설계 화면으로 이동하여, 다른 선생님들과 함께 검토할 수행평가를 먼저 만들어주세요.",cancelButton:{label:"닫기"},confirmButton:{label:"수행평가 설계 생성",onConfirm:()=>{r.onClose(),n(o)}}})]})},He=[{title:"수행평가",description:"수업에서 설계하신 모든 수행평가와 학급·학생별 채점 결과를 볼 수 있어요.",detail:"수행평가 설계 상세, 학급별 채점 현황, 학생별 채점 결과",menus:[{label:"수행평가 설계",icon:N},{label:"채점 결과",icon:v}]},{title:"수행평가+세특",description:"위 범위에 더해, 선생님이 작성한 세부능력 및 특기사항 기록까지 볼 수 있어요.",detail:"수행평가 설계 상세, 학급별 채점 현황, 학생별 채점 결과, 세부능력 및 특기사항 지원",menus:[{label:"수행평가 설계",icon:N},{label:"채점 결과",icon:v},{label:"세특 기록",icon:ye}]}],T=({iconOnly:t=!1})=>{const r=S();return e.jsxs(e.Fragment,{children:[t?e.jsx(je,{"aria-label":"공유 범위 안내",size:"2xs",variant:"ghost",colorPalette:"gray",onClick:r.onOpen,children:e.jsx(F,{})}):e.jsxs(g,{size:"sm",variant:"plain",color:"fg.muted",onClick:r.onOpen,children:[e.jsx(F,{})," 공유 범위란?"]}
1),e.jsx(G,{title:"공유 범위",size:"md",trigger:r,footer:{cancelButton:{isHidden:!0},saveButton:{label:"확인",onSave:r.onClose}},children:e.jsxs(d,{align:"stretch",gap:3,children:[He.map(n=>e.jsxs(p,{align:"start",justify:"space-between",gap:4,p:4,borderWidth:"1px",borderColor:"border",borderRadius:"md",children:[e.jsxs(d,{align:"stretch",gap:2,children:[e.jsx(l,{textStyle:"b2-semibold-compact",children:n.title}),e.jsx(l,{textStyle:"b3-regular",children:n.description}),e.jsxs(l,{textStyle:"c-regular",color:"fg.muted",children:["*확인 가능한 메뉴 : ",n.detail]})]}),e.jsx(d,{flexShrink:0,gap:1,p:1,bg:"bg.subtle",borderRadius:"md",children:n.menus.map(({label:o,icon:a})=>e.jsxs(p,{w:"full",gap:1,px:2,py:1,bg:"bg.panel",borderRadius:"sm",children:[e.jsx(C,{as:a,color:"blue.fg"}),e.jsx(l,{textStyle:"c-medium",children:o})]},o))})]},n.title)),e.jsx(fe,{p:3,bg:"bg.info",borderWidth:"1px",borderColor:"blue.muted",borderRadius:"md",children:e.jsx(l,{textStyle:"b3-regular",whiteSpace:"pre-line",children:`• 공유받은 선생님은 공유된 범위 안에서 자유롭게 댓글을 남길 수 있어요.
2• 공유받은 선생님은 수업 내용을 수정하거나 삭제할 권한은 없어요.
3• 공유 범위는 언제든 다시 바꿀 수 있고 변경된 내용은 바로 반영돼요.`})})]})})]})},qe=({courseKey:t,onStarted:r})=>{const n=K(),o=x.courses.list(),a=x.courses.detail({courseKey:t}),{mutate:m,isPending:u}=Z({mutationFn:()=>J.appsCourseSharesApiStart({courseKey:t}),onSuccess:async()=>{r==null||r(),await Promise.all([n.invalidateQueries(a),n.invalidateQueries(o)])},onError:j=>{Y.create({title:ee(j),type:"error"})}});return e.jsxs(g,{circle:!0,loading:u,disabled:u,onClick:()=>m(),children:[e.jsx(C,{as:v}),"공동 평가 시작하기"]})},Ue=[["내 수업 공유하기","대상 선생님과 범위를 선택해 공유하면 그 선생님이 본인 홈에서 이 수업을 확인할 수 있어요."],["수업 함께 검토하기","설계, 채점, 세특 등 공유한 수업 내용을 선생님들과 함께 자유롭게 살펴볼 수 있어요."],["댓글로 의견 주고받기","수업에 대한 의견은 댓글과 답글로 자유롭게 주고받을 수 있어요."]],Ve=({courseKey:t,onStarted:r})=>e.jsxs(d,{w:"full",minH:"30rem",justify:"center",gap:8,bg:"bg.panel",borderRadius:"xl",boxShadow:"sm",p:{base:6,md:12},children:[e.jsx(l,{textStyle:"b1-semibold",textAlign:"center",children:"공동 평가를 시작하면, 같은 학교 선생님과 수업을 함께 검토하고 댓글로 의견을 주고받을 수 있어요!"}),e.jsx(p,{w:"full",maxW:"60rem",align:"stretch",gap:4,flexWrap:{base:"wrap",md:"nowrap"},children:Ue.map(([n,o],a)=>e.jsxs(d,{flex:1,minW:{base:"full",md:0},align:"stretch",gap:4,p:5,bg:"bg.subtle",borderWidth:"1px",borderColor:"border",borderRadius:"lg",children:[e.jsx(w,{boxSize:6,borderRadius:"full",bg:"blue.500",color:"blue.contrast",textStyle:"c-semibold",children:a+1}),e.jsx(l,{textStyle:"b1-semibold",children:n}),e.jsx(l,{textStyle:"b3-regular",color:"fg.muted",children:o})]},n))}),e.jsx(l,{textStyle:"c-regular",color:"fg.muted",textAlign:"center",children:"※ 수업의 편집 · 삭제 권한은 나에게만 있어요. 공유받은 선생님은 검토하고 댓글로 의견을 주실 수만 있어요."}),e.jsxs(p,{gap:4,children:[e.jsx(qe,{courseKey:t,onStarted:r}),e.jsx(T,{})]})]}),oe=t=>{const r=t.lastIndexOf("@");if(r<0)return t;const n=t.slice(0,r);return`${n.slice(0,3)}${"*".repeat(Math.max(0,n.length-3))}${t.slice(r)}`},Xe=[{label:"수행평가+세특",value:"all"},{label:"수행평가",value:"project"},{label:"공유 안됨",value:"none"}],Ge=t=>t!=null&&t.course_record?"all":t!=null&&t.project||t!=null&&t.scoring?"project":"none",$={add:"추가",change:"변경",revoke:"해제"},H=(t,r)=>t===r?null:t==="none"?"add":r==="none"?"revoke":"change",Ke=t=>({project:t!=="none",scoring:t!=="none",course_record:t==="all"}),Ze=(t,r)=>+(t.initialScope==="none")-+(r.initialScope==="none")||+(r.initialScope==="all")-+(t.initialScope==="all")||t.teacher.name.localeCompare(r.teacher.name,"ko")||t.teacher.username.localeCompare(r.teacher.username),Je=({courseKey:t,defaultOpen:r=!1})=>{var W;const n=S({defaultOpen:r}),o=S(),a=S(),{copyLink:m}=q(t),u=K(),[j,c]=k.useState(""),[h,L]=k.useState({}),P=Se({enabled:n.open}),R=I({...x.teachers.list,enabled:n.open}),O=I({...x.courseShares.accesses({courseKey:t}),enabled:n.open}),le=new Map((W=O.data)==null?void 0:W.map(s=>[s.teacher_key,s])),y=(R.data??[]).filter(s=>{var i;return s.key!==((i=P.data)==null?void 0:i.key)}).map(s=>({teacher:s,initialScope:Ge(le.get(s.key))})).sort(Ze),ae=y.length>0,B=j.trim().toLocaleLowerCase(),z=y.filter(({teacher:s})=>!B||s.name.toLocaleLowerCase().includes(B)||s.username.toLocaleLowerCase().includes(B)),E=y.flatMap(({teacher:s,initialScope:i})=>{const b=H(i,h[s.key]??i);return b?[{teacherKey:s.key,type:b}]:[]}),_=E.length>0,ie=["add","change","revoke"].map(s=>({type:s,count:E.filter(i=>i.type===s).length})).filter(({count:s})=>s>0).map(({type:s,count:i})=>`${i}명 ${$[s]}`).join(" · "),D=P.isSuccess&&R.isSuccess&&O.isSuccess,{mutate:ce,isPending:M}=Z({mutationFn:()=>{const s={accesses:y.map(({teacher:i,initialScope:b})=>({teacher_key:i.key,...Ke(h[i.key]??b)}))};return J.appsCourseSharesApiUpdateAccesses({courseKey:t,requestBody:s})},onSuccess:async()=>{n.onClose(),y.every(({initialScope:s})=>s==="none")&&y.some(({teacher:s,initialScope:i})=>
3(h[s.key]??i)!=="none")&&a.onOpen(),await Promise.all([u.invalidateQueries(x.courseShares.accesses({courseKey:t})),u.invalidateQueries({queryKey:x.courses.list._def}),u.invalidateQueries(x.courses.detail({courseKey:t}))])},onError:s=>{Y.create({title:ee(s),type:"error"})}}),de=()=>{c(""),L({}),n.onOpen()},Q=()=>{if(_){o.onOpen();return}n.onClose()},ue=()=>{c(""),L({}),o.onClose(),n.onClose()};return e.jsxs(e.Fragment,{children:[e.jsxs(g,{circle:!0,onClick:de,children:[e.jsx(C,{as:v}),"공동 평가 설정"]}),e.jsx(G,{title:"공동 평가 설정",size:"lg",loading:P.isLoading||R.isLoading||O.isLoading,trigger:{open:n.open,onOpen:n.onOpen,onClose:Q},footer:{description:e.jsx(l,{color:_?"blue.fg":"fg.muted",children:ie||"변경 사항 없음"}),cancelButton:{onCancel:Q},saveButton:{label:"설정 저장",onSave:()=>ce(),buttonProps:{disabled:!D||!_||M,loading:M}}},children:D&&e.jsxs(d,{align:"stretch",gap:3,children:[e.jsx(l,{textStyle:"b2-regular-compact",children:"이 수업을 함께 검토할 선생님을 지정하고 댓글로 의견을 나눠보세요."}),ae?e.jsxs(e.Fragment,{children:[e.jsx(re,{startElement:e.jsx(C,{as:Ce,boxSize:5,color:"fg.muted"}),children:e.jsx(U,{"aria-label":"선생님 검색",placeholder:"이름이나 이메일로 검색",ps:11,textStyle:"b1-medium-compact",borderRadius:"sm",_placeholder:{color:"fg.muted",opacity:.8},value:j,onChange:s=>c(s.target.value)})}),e.jsx(ne,{size:"sm",tableLayout:"fixed",header:{bg:"bg.subtle",h:"2.75rem",columns:[{key:"teacher",children:"선생님",textAlign:"center"},{key:"email",children:"이메일 (ID)",display:{base:"none",md:"table-cell"},textAlign:"center"},{key:"scope",children:e.jsxs(p,{justify:"center",gap:1,children:["공유 범위 ",e.jsx(T,{iconOnly:!0})]}),textAlign:"center"}]},rows:z.length>0?z.map(({teacher:s,initialScope:i})=>{const b=h[s.key]??i,f=H(i,b);return{key:s.key,bg:f?"bg.info":void 0,cells:[{key:"teacher",children:e.jsxs(p,{gap:2,children:[e.jsxs(l,{truncate:!0,textStyle:"b1-medium-compact",children:[s.name," 선생님"]}),f&&e.jsx(te,{size:"sm",colorPalette:f==="add"?"green":f==="revoke"?"red":"blue",children:$[f]})]})},{key:"email",children:e.jsx(l,{textStyle:"b2-regular-compact",children:oe(s.username)}),display:{base:"none",md:"table-cell"},color:"fg.muted"},{key:"scope",children:e.jsx(ke,{label:`${s.name} 선생님 공유 범위`,items:Xe,value:b,onChange:me=>L(he=>({...he,[s.key]:me.target.value}))})}]}}):[{key:"empty",cells:[{key:"empty",colSpan:3,children:e.jsx(w,{py:8,children:e.jsx(l,{color:"fg.muted",children:"검색 결과가 없어요."})})}]}]})]}):e.jsxs(d,{gap:4,py:16,px:5,borderWidth:"1px",borderRadius:"lg",children:[e.jsx(w,{boxSize:10,borderRadius:"full",bg:"bg.muted",children:e.jsx(C,{as:ve,boxSize:5,color:"fg.muted"})}),e.jsxs(d,{gap:2,children:[e.jsx(l,{textStyle:"b1-semibold",children:"같은 학교에 다른 선생님이 아직 없어요."}),e.jsxs(l,{textStyle:"b3-regular",color:"fg.muted",textAlign:"center",children:["클리포에 가입한 같은 학교의 선생님에게만",e.jsx("br",{}),"수업을 공유하고 함께 검토할 수 있어요."]})]})]}),e.jsxs(De,{px:4,py:3,alignItems:"flex-start",bg:"bg.info",borderWidth:"1px",borderColor:"blue.muted",borderRadius:"lg",children:[e.jsx(Me,{boxSize:4.5,mt:.5}),e.jsx(Qe,{p:0,children:e.jsxs(We,{textStyle:"b2-medium",children:["이 수업에 대한 편집·삭제 등의 권한은 나에게만 있어요.",e.jsx("br",{}),"공유 범위를 변경하거나 공유 안됨 상태로 바꾸어도 해당 선생님이 남긴 댓글은 삭제되지 않고 내가 계속 확인할 수 있어요."]})})]})]})}),e.jsx(we,{"aria-label":"공동 평가 설정을 완료했어요",title:"공동 평가 설정을 완료했어요",trigger:a,customIcon:Le,description:"이 수업에 바로 접속할 수 있는 링크를 복사하셔서 선생님들에게 공동 평가 시작 소식을 알려주세요.",buttons:[e.jsxs(g,{h:11,maxW:"20.5rem",onClick:m,children:[e.jsx(A,{})," 수업 공유 링크 복사"]},"copy"),e.jsx(g,{variant:"outline",h:11,maxW:"20.5rem",onClick:a.onClose,children:"네, 확인했어요"},"confirm")]}),e.jsx(X,{title:"변경 사항을 취소할까요?",description:"저장하지 않은 공동 평가 설정이 사라져요.",modalType:"negative",trigger:o,cancelButton:{label:"계속 설정하기"},confirmButton:{label:"변경 사항 취소",onConfirm:ue}})]})},Ye=({courseKey:t})=>{const r=V(),{selectComment:n,setPanelOpen:o}
3=Pe(),a=I(x.courseShares.accesses({courseKey:t})),m=(a.data??[]).filter(c=>c.project||c.scoring||c.course_record).sort((c,h)=>Number(h.course_record)-Number(c.course_record)||c.teacher_name.localeCompare(h.teacher_name,"ko")||c.teacher_username.localeCompare(h.teacher_username)),u=m.length>0,j=()=>a.isLoading?e.jsx(et,{}):a.isSuccess?u?e.jsx(rt,{reviewers:m}):e.jsx(tt,{}):null;return e.jsxs(d,{w:"full",flex:1,align:"stretch",gap:5,children:[e.jsxs(d,{w:"full",flex:1,align:"stretch",gap:5,p:6,bg:"bg.panel",borderRadius:"xl",boxShadow:"sm",children:[e.jsxs(p,{gap:2,children:[e.jsx(l,{textStyle:"t4-semibold-compact",children:"공동 평가 선생님"}),!a.isLoading&&a.isSuccess&&u&&e.jsxs(l,{textStyle:"b2-regular",color:"fg.muted",children:[m.length,"명"]})]}),j()]}),e.jsx(d,{w:"full",align:"stretch",p:6,bg:"bg.panel",borderRadius:"xl",boxShadow:"sm",children:e.jsx(Re,{children:e.jsx(Oe,{open:!0,courseKey:t,layout:"split",showComposer:!1,initialTarget:{scope:"COURSE"},authors:m.map(({teacher_key:c,teacher_name:h})=>({key:c,name:h})),onOpenTarget:c=>{n(c.comment_key,{replace:!0}),o(!0),r(Be(t,c.target,"owner"))}})})})]})},et=()=>e.jsx(w,{flex:1,py:16,children:e.jsx(_e,{role:"status","aria-label":"공동 평가 선생님을 불러오는 중"})}),tt=()=>e.jsx(se,{py:{base:12,md:30},px:7,image:Fe,title:"공동 평가를 설정해 주세요.",description:"교내 선생님들에게 수업을 공유하고 검토를 요청하세요.",css:{"& > img":{width:"11.25rem",height:"7.5rem",objectFit:"cover"}}}),rt=({reviewers:t})=>e.jsx(d,{align:"stretch",gap:5,children:e.jsx(ne,{size:"md",tableLayout:"fixed",cellProps:{h:"3rem"},header:{bg:"bg.subtle",columns:[{key:"teacher",children:"선생님",textAlign:"center",textStyle:"b1-medium-compact"},{key:"email",children:"이메일 (ID)",display:{base:"none",md:"table-cell"},textAlign:"center",textStyle:"b1-medium-compact"},{key:"scope",children:e.jsxs(p,{justify:"center",gap:1,children:["공유 범위 ",e.jsx(T,{iconOnly:!0})]}),textAlign:"center",textStyle:"b1-medium-compact"}]},rows:t.map(r=>({key:r.teacher_key,cells:[{key:"teacher",children:`${r.teacher_name} 선생님`,textAlign:"center",textStyle:"b1-medium-compact"},{key:"email",children:oe(r.teacher_username),display:{base:"none",md:"table-cell"},textAlign:"center",textStyle:"b1-regular-compact"},{key:"scope",children:st(r),textAlign:"center",textStyle:"b1-regular-compact"}]}))})}),st=t=>t.course_record?"수행평가+세특":"수행평가",gt=()=>{const{course:t}=Ae(),[r,n]=k.useState(!1),o=t.project_count!==0;return e.jsxs(d,{w:"full",h:"full",gap:0,pb:5,children:[e.jsx(Te,{description:o?"공동 평가 설정으로 같은 학교 선생님에게 수업을 공유하고 수업에 대한 의견을 댓글로 자유롭게 주고받을 수 있어요.":void 0,title:e.jsxs(p,{gap:2,children:["공동 평가",o&&e.jsxs(te,{size:"sm",colorPalette:"blue",variant:"surface",borderRadius:"md",children:[e.jsx(Ie,{})," Beta"]})]}),rightSection:o&&t.share?{components:[e.jsx(Ne,{courseKey:t.key},"link"),e.jsx(Je,{courseKey:t.key,defaultOpen:r},"settings")]}:void 0}),o?t.share?e.jsx(Ye,{courseKey:t.key}):e.jsx(Ve,{courseKey:t.key,onStarted:()=>n(!0)}):e.jsx($e,{courseKey:t.key},t.key)]})};export{gt as default};
4//# sourceMappingURL=CourseSharePage-EkJJQTwh.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.