@eliceio/cdk-cli 0.1.0-alpha.2 → 0.1.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +158 -138
  2. package/es/cli.js +88 -33
  3. package/es/commands/build/index.d.ts +1 -1
  4. package/es/commands/build/index.js +16 -6
  5. package/es/commands/check/index.d.ts +8 -2
  6. package/es/commands/check/index.js +45 -5
  7. package/es/commands/create/index.d.ts +2 -0
  8. package/es/commands/create/index.js +28 -3
  9. package/es/commands/create/scaffold.d.ts +2 -0
  10. package/es/commands/create/scaffold.js +10 -6
  11. package/es/commands/dev/index.d.ts +1 -1
  12. package/es/commands/dev/index.js +6 -2
  13. package/es/commands/doctor/index.d.ts +11 -0
  14. package/es/commands/doctor/index.js +155 -26
  15. package/es/commands/mcp/index.d.ts +134 -0
  16. package/es/commands/mcp/index.js +399 -0
  17. package/es/commands/setup/index.d.ts +40 -0
  18. package/es/commands/setup/index.js +157 -0
  19. package/es/commands/skill/index.d.ts +2 -5
  20. package/es/commands/skill/index.js +1 -29
  21. package/es/core/config.d.ts +63 -19
  22. package/es/core/config.js +108 -32
  23. package/es/core/prepare.js +3 -5
  24. package/es/core/project-check.d.ts +15 -0
  25. package/es/core/project-check.js +26 -0
  26. package/es/core/templates.d.ts +25 -0
  27. package/es/core/templates.js +41 -0
  28. package/es/dev/grading.d.ts +14 -7
  29. package/es/dev/grading.js +27 -13
  30. package/es/dev/host-page.d.ts +1 -1
  31. package/es/dev/host-page.js +33 -33
  32. package/es/dev/mock-api.d.ts +20 -4
  33. package/es/dev/mock-api.js +70 -9
  34. package/es/dev/server.d.ts +7 -0
  35. package/es/dev/server.js +84 -23
  36. package/es/rules/check.js +56 -7
  37. package/es/rules/index.d.ts +1 -1
  38. package/es/rules/index.js +1 -1
  39. package/es/rules/manifest.d.ts +23 -9
  40. package/es/rules/manifest.js +60 -35
  41. package/es/rules/node.js +3 -1
  42. package/es/rules/semver.d.ts +5 -0
  43. package/es/rules/semver.js +32 -0
  44. package/es/rules/types.d.ts +27 -6
  45. package/es/rules.json.js +1 -1
  46. package/guides/content-development.md +136 -49
  47. package/package.json +2 -2
  48. package/rules.json +62 -7
  49. package/skills/_shared/always.md +3 -1
  50. package/skills/elice-content-check/SKILL.md +1 -1
  51. package/skills/elice-content-create/SKILL.md +4 -4
  52. package/skills/elice-content-migrate/SKILL.md +1 -1
  53. package/skills/elice-content-publish/SKILL.md +22 -0
  54. package/templates/_shared/lib/cdk-mock.d.ts +21 -3
  55. package/templates/_shared/lib/cdk-mock.js +239 -80
  56. package/templates/_shared/lib/cdk.js +2 -2
  57. package/templates/_shared/lib/elice-content.css +196 -0
  58. package/templates/_shared/lib/elice-content.d.ts +110 -5
  59. package/templates/_shared/lib/elice-content.js +643 -38
  60. package/templates/blank/README.md +12 -3
  61. package/templates/blank/completion.html +15 -0
  62. package/templates/blank/elice.config.json +3 -5
  63. package/templates/blank/gitignore +1 -0
  64. package/templates/blank/screens/completion.js +7 -0
  65. package/templates/blank/screens/edit.js +3 -0
  66. package/templates/blank/template.json +6 -0
  67. package/templates/quiz/README.md +35 -28
  68. package/templates/quiz/content.json +17 -63
  69. package/templates/quiz/core/behaviors.d.ts +5 -0
  70. package/templates/quiz/core/behaviors.js +12 -0
  71. package/templates/quiz/core/model.d.ts +27 -1
  72. package/templates/quiz/core/model.js +199 -4
  73. package/templates/quiz/elice.config.json +1 -6
  74. package/templates/quiz/gitignore +1 -0
  75. package/templates/quiz/grading.json +1 -10
  76. package/templates/quiz/screens/edit.js +105 -31
  77. package/templates/quiz/screens/learn.js +7 -8
  78. package/templates/quiz/template.json +6 -0
  79. package/templates/quiz/ui/templates/edit.d.ts +2 -0
  80. package/templates/quiz/ui/templates/edit.js +16 -9
  81. package/templates/quiz/ui/texts.js +52 -27
@@ -1,13 +1,4 @@
1
1
  {
2
2
  "type": "pattern",
3
- "match": "exact",
4
- "answer_key": {
5
- "answers": {
6
- "q1": "b",
7
- "q2": "a,b,d",
8
- "q3": "a,b,c",
9
- "q4": "가중치",
10
- "q5": "g1:a,b|g2:c,d"
11
- }
12
- }
3
+ "answer_key": "^q1=b$"
13
4
  }
@@ -1,21 +1,43 @@
1
1
  // 내용 편집 화면(CMS). 기존 퀴즈 편집 폼을 옮김 (docs/quiz-spec.md §3). 저장 버튼 · 변경 표시는 키트(useSave)가 합니다.
2
- // 정답은 여기서 다루지 않습니다: LXP 편집 화면의 채점 설정에서 정답(문항 id별 답 묶음)을 지정합니다.
3
- // 저장한 내용은 학생에게도 내려가므로 정답을 넣지 않습니다.
4
- // 여기서는 어떤 칸을 어떤 순서로 놓을지만 정합니다. 모양은 ui/(templates/edit.js · texts · theme.css), 동작은 core/editor.js.
5
- import { start } from '../lib/elice-content.js';
2
+ // 퀴즈는 완료 정책 on_graded + 채점 방식 pattern 고정 (ADR 0009, elice.config.json completionPolicies ["on_graded"]): 문항 카드마다 "정답"에서
3
+ // 답을 고르고, 저장할 때 고른 답으로 정답 정규식 하나를 만들어 검증한 뒤 settings.grading에 함께 저장합니다.
4
+ // 문제 내용(content)은 학생에게도 내려가므로 정답을 넣지 않습니다 (정답은 grading에만, 서버가 학생에게 내려주지 않음).
5
+ // 여기서는 어떤 칸을 어떤 순서로 놓을지만 정합니다. 모양은 ui/(templates/edit.js · texts · theme.css), 동작은 core/.
6
+ import { start, validateAnswerRegex } from '../lib/elice-content.js';
7
+ import { renderAnswerBody } from '../core/behaviors.js';
6
8
  import { createEditor } from '../core/editor.js';
7
- import { convertType, LIMITS, newQuestion, validateQuiz } from '../core/model.js';
9
+ import {
10
+ buildAnswerKey,
11
+ checkAnswerKey,
12
+ convertType,
13
+ joinAnswers,
14
+ LIMITS,
15
+ newQuestion,
16
+ parseAnswerKey,
17
+ validateAnswerKey,
18
+ validateQuiz,
19
+ } from '../core/model.js';
8
20
  import * as templates from '../ui/templates/edit.js';
21
+ import { templates as quizTemplates } from '../ui/templates/index.js';
9
22
  import { loading } from '../ui/templates/page.js';
10
23
  import { texts } from '../ui/texts.js';
11
24
 
12
25
  const t = texts.edit;
26
+ const a = texts.answers;
13
27
  const root = document.getElementById('app');
14
28
  document.title = texts.page.edit;
15
29
  root.replaceChildren(loading());
16
30
  const app = await start({ screen: 'edit' });
17
31
  const draft = structuredClone(app.content);
18
32
  draft.questions ??= [];
33
+
34
+ // 문항 id → 정답(화면 값: 선택 id · id 목록 · 그룹별 목록, 주관식은 허용 답 목록). 저장된 정규식을 읽어 채운다
35
+ const savedKey = app.grading?.answer_key;
36
+ const parsed = savedKey ? parseAnswerKey(draft.questions, savedKey) : {};
37
+ /** @type {Record<string, unknown>} */
38
+ const answers = parsed ?? {};
39
+ const unreadable = Boolean(savedKey) && parsed === null;
40
+
19
41
  const form = createEditor({
20
42
  rerender: render,
21
43
  root,
@@ -35,11 +57,35 @@ const swap = (list, i, j) => {
35
57
  render();
36
58
  };
37
59
 
60
+ /** 문항 카드의 "정답": 학생 화면과 같은 보기 · 칸 · 그룹으로 고른다 (주관식은 허용 답 여러 개) */
61
+ function answerField(q) {
62
+ if (q.type === 'text') {
63
+ const node = templates.textAnswers({ placeholder: a.textPlaceholder });
64
+ // 조각이 칸 자체이거나 칸을 감싼 요소여도 된다
65
+ const input = node.matches('[data-role="input"]') ? node : node.querySelector('[data-role="input"]');
66
+ input.value = (answers[q.id] ?? []).join('\n');
67
+ input.addEventListener('input', () => {
68
+ answers[q.id] = input.value
69
+ .split('\n')
70
+ .map(s => s.trim())
71
+ .filter(Boolean);
72
+ });
73
+ return form.ui.section({ label: a.label, hint: a.hint.text, body: node });
74
+ }
75
+ const view = renderAnswerBody(q, { templates: quizTemplates });
76
+ if (answers[q.id] !== undefined) view.setValue(answers[q.id]);
77
+ // 누르기 · 끌어 놓기가 끝난 뒤 값을 읽는다
78
+ const read = () => queueMicrotask(() => (answers[q.id] = view.getValue()));
79
+ for (const type of ['input', 'change', 'click', 'pointerup'])
80
+ view.el.addEventListener(type, read);
81
+ return form.ui.section({ label: a.label, hint: a.hint[q.type], body: view.el });
82
+ }
83
+
38
84
  /** 문항 카드 안의 칸들. 유형마다 보이는 칸이 다르다 */
39
85
  function questionFields(q, i) {
40
86
  const body = [
41
- form.field(t.title, q.title, (v) => (q.title = v), { required: true, max: LIMITS.titleMax }),
42
- form.markdownField(t.description, q.description, (v) => (q.description = v)),
87
+ form.field(t.title, q.title, v => (q.title = v), { required: true, max: LIMITS.titleMax }),
88
+ form.markdownField(t.description, q.description, v => (q.description = v)),
43
89
  ];
44
90
  if (q.type === 'select_one' || q.type === 'select_multiple' || q.type === 'order') {
45
91
  const options = form.itemList('option', q.options, `${i}o`, {
@@ -49,10 +95,18 @@ function questionFields(q, i) {
49
95
  });
50
96
  body.push(form.ui.section({ label: t.options, body: options }));
51
97
  }
52
- if (q.type === 'order')
53
- body.push(
54
- form.numberField(t.slots, t.slotsHint, q.slots, q.options.length, (v) => (q.slots = v)),
98
+ if (q.type === 'order') {
99
+ const slots = form.numberField(
100
+ t.slots,
101
+ t.slotsHint,
102
+ q.slots,
103
+ q.options.length,
104
+ v => (q.slots = v)
55
105
  );
106
+ // 칸 수가 바뀌면 정답 칸도 다시 그린다 (입력하는 동안이 아니라 확정했을 때)
107
+ slots.querySelector('[data-role="input"]')?.addEventListener('change', render);
108
+ body.push(slots);
109
+ }
56
110
  if (q.type === 'group')
57
111
  body.push(
58
112
  form.ui.section({ label: t.groups, body: form.itemList('group', q.groups, `${i}g`) }),
@@ -60,26 +114,25 @@ function questionFields(q, i) {
60
114
  label: t.options,
61
115
  hint: t.groupOptionsHint,
62
116
  body: form.itemList('option', q.options, `${i}o`),
63
- }),
117
+ })
64
118
  );
65
119
  if (q.type === 'text')
66
120
  body.push(
67
- form.field(t.placeholder, q.placeholder, (v) => (q.placeholder = v), {
121
+ form.field(t.placeholder, q.placeholder, v => (q.placeholder = v), {
68
122
  max: LIMITS.placeholderMax,
69
123
  hint: t.placeholderHint,
70
- }),
124
+ })
71
125
  );
72
- if (q.type !== 'text') body.push(form.toggle(t.shuffle, q.shuffle, (v) => (q.shuffle = v)));
126
+ body.push(answerField(q));
127
+ if (q.type !== 'text') body.push(form.toggle(t.shuffle, q.shuffle, v => (q.shuffle = v)));
73
128
  body.push(
74
- form.toggle(t.explanationOn, q.explanation?.enabled, (v) => {
129
+ form.toggle(t.explanationOn, q.explanation?.enabled, v => {
75
130
  q.explanation = { ...(q.explanation ?? { text: '' }), enabled: v };
76
131
  render();
77
- }),
132
+ })
78
133
  );
79
134
  if (q.explanation?.enabled)
80
- body.push(
81
- form.markdownField(t.explanation, q.explanation.text, (v) => (q.explanation.text = v)),
82
- );
135
+ body.push(form.markdownField(t.explanation, q.explanation.text, v => (q.explanation.text = v)));
83
136
  return body;
84
137
  }
85
138
 
@@ -93,47 +146,68 @@ function questionCard(q, i) {
93
146
  body: questionFields(q, i),
94
147
  },
95
148
  {
96
- type: (type) => {
149
+ type: type => {
97
150
  draft.questions[i] = convertType(q, type, texts.defaults);
151
+ // 유형이 바뀌면 답 모양이 달라지므로 정답을 다시 고른다
152
+ delete answers[q.id];
98
153
  render();
99
154
  },
100
155
  up: () => swap(draft.questions, i, i - 1),
101
156
  down: () => swap(draft.questions, i, i + 1),
102
157
  remove: () => {
103
158
  draft.questions.splice(i, 1);
159
+ delete answers[q.id];
104
160
  render();
105
161
  },
106
- },
162
+ }
107
163
  );
108
164
  }
109
165
 
110
166
  function render() {
111
167
  root.replaceChildren(
112
- form.field(t.quizTitle, draft.title, (v) => (draft.title = v), { required: true }),
113
- form.markdownField(t.quizDescription, draft.description, (v) => (draft.description = v)),
168
+ templates.answersIntro({ text: unreadable ? `${a.unreadable} ${a.intro}` : a.intro }),
169
+ form.field(t.quizTitle, draft.title, v => (draft.title = v), { required: true }),
170
+ form.markdownField(t.quizDescription, draft.description, v => (draft.description = v)),
114
171
  ...draft.questions.map(questionCard),
115
172
  form.addQuestion(() => {
116
173
  draft.questions.push(
117
174
  newQuestion(
118
175
  'select_one',
119
- draft.questions.map((q) => q.id),
120
- texts.defaults,
121
- ),
176
+ draft.questions.map(q => q.id),
177
+ texts.defaults
178
+ )
122
179
  );
123
180
  render();
124
- }),
181
+ })
125
182
  );
126
183
  save?.markDirty();
127
184
  }
128
185
 
186
+ /** 문제가 있는 문항 카드로 옮기고 문장을 돌려준다 */
187
+ const problemAt = problem => {
188
+ form.cardAt(problem.questionIndex)?.scrollIntoView({ block: 'center' });
189
+ return problem.message;
190
+ };
191
+
129
192
  render();
130
193
  save = app.useSave({
131
194
  label: t.done,
132
195
  getContent: () => structuredClone(draft),
133
- validate: (content) => {
196
+ validate: content => {
134
197
  const problem = validateQuiz(content, texts.validation);
135
- if (!problem) return true;
136
- form.cardAt(problem.questionIndex)?.scrollIntoView({ block: 'center' });
137
- return problem.message;
198
+ return problem ? problemAt(problem) : true;
199
+ },
200
+ // 정답 → 정답 정규식. 검증(정답 · 지운 보기 → 정규식 공통 검사 → 왕복 · 오답)을 통과해야 저장한다
201
+ getGrading: () => {
202
+ const { questions } = draft;
203
+ const missing = validateAnswerKey(questions, answers, a.validation);
204
+ if (missing) return problemAt(missing);
205
+ const answerKey = buildAnswerKey(questions, answers);
206
+ const base = questions.map(q => (q.type === 'text' ? (answers[q.id] ?? [])[0] : answers[q.id]));
207
+ const regexProblem = validateAnswerRegex(answerKey, [joinAnswers(questions, base)]);
208
+ if (regexProblem) return regexProblem;
209
+ const keyProblem = checkAnswerKey(questions, answers, answerKey, a.validation);
210
+ if (keyProblem) return problemAt(keyProblem);
211
+ return { type: 'pattern', answer_key: answerKey };
138
212
  },
139
213
  });
@@ -3,7 +3,7 @@
3
3
  // 모양은 ui/(templates · texts · theme.css), 동작은 core/에 있습니다.
4
4
  import { start } from '../lib/elice-content.js';
5
5
  import { renderQuestion } from '../core/behaviors.js';
6
- import { decodeAnswer, encodeAnswer, isAnswered } from '../core/model.js';
6
+ import { decodeAnswer, isAnswered, joinAnswers, splitAnswers } from '../core/model.js';
7
7
  import { labels, templates } from '../ui/templates/index.js';
8
8
  import { learnHeader, loading } from '../ui/templates/page.js';
9
9
  import { texts } from '../ui/texts.js';
@@ -24,14 +24,13 @@ const views = questions.map((q, i) =>
24
24
 
25
25
  root.replaceChildren(learnHeader({ title: title ?? '', description }), ...views.map((v) => v.el));
26
26
 
27
+ // 답은 문자열 하나로 낸다 (편집 화면이 만든 정답 정규식과 전체 비교, ADR 0008 · 0009): "q1=b;q2=a,d;…"
27
28
  app.useSubmit({
28
- getAnswer: () => ({
29
- answers: Object.fromEntries(
30
- questions.map((q, i) => [q.id, encodeAnswer(q, views[i].getValue())]),
31
- ),
32
- }),
33
- setAnswer: (answer) =>
34
- questions.forEach((q, i) => views[i].setValue(decodeAnswer(q, answer?.answers?.[q.id]))),
29
+ getAnswer: () => joinAnswers(questions, views.map((v) => v.getValue())),
30
+ setAnswer: (answer) => {
31
+ const byId = splitAnswers(questions, answer);
32
+ questions.forEach((q, i) => views[i].setValue(decodeAnswer(q, byId[q.id])));
33
+ },
35
34
  validate: () => {
36
35
  const left = questions.findIndex((q, i) => !isAnswered(q, views[i].getValue()));
37
36
  return left < 0 || texts.learn.unanswered(left + 1);
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "quiz",
3
+ "version": "1.0.0",
4
+ "title": "퀴즈",
5
+ "description": "여러 문항 퀴즈. 단일 선택 한 문제로 시작하고 편집 화면에서 선택 · 순서 · 주관식 · 그룹 분류 문항을 더함. 정답은 편집 화면에서 정하고 채점해 완료(on_graded) 고정"
6
+ }
@@ -11,3 +11,5 @@ export declare const row: Template;
11
11
  export declare const addButton: Template;
12
12
  export declare const card: Template;
13
13
  export declare const addQuestion: Template;
14
+ export declare const answersIntro: Template;
15
+ export declare const textAnswers: Template;
@@ -8,19 +8,19 @@ const t = texts.edit;
8
8
  /** 보기 · 그룹 목록에서 종류마다 다른 문구와 번호 표시 */
9
9
  const KIND = {
10
10
  option: {
11
- marker: (i) => String(i + 1),
12
- name: (i) => t.option(i + 1),
13
- input: (i) => t.option(i + 1),
14
- remove: (i) => t.optionDelete(i + 1),
11
+ marker: i => String(i + 1),
12
+ name: i => t.option(i + 1),
13
+ input: i => t.option(i + 1),
14
+ remove: i => t.optionDelete(i + 1),
15
15
  min: t.optionsMin,
16
16
  max: t.optionsMax,
17
17
  add: t.addOption,
18
18
  },
19
19
  group: {
20
- marker: (i) => String.fromCharCode(65 + i),
21
- name: (i) => t.group(i + 1),
22
- input: (i) => t.groupName(i + 1),
23
- remove: (i) => t.groupDelete(i + 1),
20
+ marker: i => String.fromCharCode(65 + i),
21
+ name: i => t.group(i + 1),
22
+ input: i => t.groupName(i + 1),
23
+ remove: i => t.groupDelete(i + 1),
24
24
  min: t.groupsMin,
25
25
  max: t.groupsMax,
26
26
  add: t.addGroup,
@@ -142,7 +142,7 @@ export const card = ({ q, index, count, types, body }) => html`
142
142
  <select class="qe-input qe-type" data-role="type" aria-label="${t.questionType(index + 1)}">
143
143
  ${types.map(
144
144
  ([value, name]) =>
145
- html`<option value="${value}" ${q.type === value && 'selected'}>${name}</option>`,
145
+ html`<option value="${value}" ${q.type === value && 'selected'}>${name}</option>`
146
146
  )}
147
147
  </select>
148
148
  <button
@@ -178,6 +178,13 @@ export const card = ({ q, index, count, types, body }) => html`
178
178
  </section>
179
179
  `;
180
180
 
181
+ /** 편집 화면 맨 위 안내 (정답을 어디서 고르는지) */
182
+ export const answersIntro = ({ text }) => html`<p class="qe-hint qe-answers-intro">${text}</p>`;
183
+
184
+ /** 주관식 정답: 허용 답을 줄마다 하나. data-role="input" (textarea) */
185
+ export const textAnswers = ({ placeholder }) =>
186
+ html`<textarea class="qe-input" data-role="input" placeholder="${placeholder}"></textarea>`;
187
+
181
188
  /** 문항 추가 버튼 */
182
189
  export const addQuestion = () =>
183
190
  html`<button type="button" class="qe-add qe-add-question">${t.addQuestion}</button>`;
@@ -19,10 +19,35 @@ export const texts = {
19
19
  loading: '불러오는 중…',
20
20
  },
21
21
 
22
+ /** 편집 화면의 정답 (ADR 0009: 퀴즈는 채점해 통과하면 완료 · 기준 답안 고정, 정답은 문항마다 여기서 고름) */
23
+ answers: {
24
+ intro:
25
+ '정답은 문항마다 아래 "정답"에서 고릅니다. 저장하면 고른 정답으로 기준 답안(정규표현식)을 만들어 채점에 씁니다. 학생은 모든 문항을 맞혀야 완료(100점)됩니다. 정답은 학생에게 보이지 않습니다.',
26
+ label: '정답',
27
+ hint: {
28
+ select_one: '정답 보기를 고르세요.',
29
+ select_multiple: '정답 보기를 모두 고르세요.',
30
+ order: '정답 순서대로 칸에 놓으세요.',
31
+ group: '보기를 정답 그룹에 놓으세요. 어느 그룹에도 넣지 않은 보기는 오답 보기입니다.',
32
+ text: '정답으로 인정할 답을 줄마다 하나씩 적으세요. 앞뒤 공백은 무시합니다.',
33
+ },
34
+ textPlaceholder: '예: 가중치\nweight',
35
+ unreadable:
36
+ '저장된 정답(기준 답안)을 이 화면이 읽지 못했어요. 문항마다 정답을 다시 골라 저장해 주세요.',
37
+ validation: {
38
+ at: (no, message) => `문항 ${no}: ${message}`,
39
+ noAnswer: '정답을 골라 주세요.',
40
+ missingOption: '정답으로 고른 보기나 그룹이 지금 문항에 없습니다 (지웠음). 다시 골라 주세요.',
41
+ badRegex: '정답으로 기준 답안을 만들지 못했어요. 정답을 다시 골라 주세요.',
42
+ roundTrip: '정답으로 낸 답이 기준 답안과 맞지 않습니다. 정답을 다시 골라 주세요.',
43
+ tooWide: '다른 답도 정답으로 인정됩니다. 정답을 다시 확인해 주세요.',
44
+ },
45
+ },
46
+
22
47
  /** 학생 화면 */
23
48
  learn: {
24
49
  badge: '확인 문제',
25
- unanswered: (no) => `${no}번 문항에 답해 주세요.`,
50
+ unanswered: no => `${no}번 문항에 답해 주세요.`,
26
51
  },
27
52
 
28
53
  /** 교육자 화면 */
@@ -30,7 +55,7 @@ export const texts = {
30
55
  badge: '교육자 화면',
31
56
  summary: (count, byType) => `문항 ${count}개 · ${byType.join(' · ')}`,
32
57
  summaryType: (type, n) => `${type} ${n}`,
33
- note: '정답과 채점 방식은 LXP 편집 화면의 채점 설정에서 확인하세요.',
58
+ note: '정답은 내용 편집 화면에서 문항마다 정합니다. 모든 문항을 맞혀야 완료(100점)됩니다.',
34
59
  },
35
60
 
36
61
  /** 문항 (학생 · 교육자 공통) */
@@ -47,7 +72,7 @@ export const texts = {
47
72
  orderSlotEmpty: '답안을 드래그 앤 드롭하세요.',
48
73
  groupReset: '답안 초기화',
49
74
  groupRemove: '빼기',
50
- groupRemoveLabel: (option) => `${option} 빼기`,
75
+ groupRemoveLabel: option => `${option} 빼기`,
51
76
  groupPoolEmpty: '모든 보기를 그룹에 배치하였습니다.',
52
77
  groupEmpty: '보기를 영역에 끌어 넣거나, 보기를 누른 뒤 이곳을 눌러 주세요.',
53
78
  },
@@ -62,30 +87,30 @@ export const texts = {
62
87
  count: (length, max) => `${length} / ${max}`,
63
88
  preview: '미리보기',
64
89
  previewClose: '미리보기 닫기',
65
- question: (no) => `문항 ${no}`,
66
- questionType: (no) => `문항 ${no} 유형`,
67
- questionUp: (no) => `문항 ${no} 위로`,
68
- questionDown: (no) => `문항 ${no} 아래로`,
69
- questionDelete: (no) => `문항 ${no} 삭제`,
90
+ question: no => `문항 ${no}`,
91
+ questionType: no => `문항 ${no} 유형`,
92
+ questionUp: no => `문항 ${no} 위로`,
93
+ questionDown: no => `문항 ${no} 아래로`,
94
+ questionDelete: no => `문항 ${no} 삭제`,
70
95
  questionMin: '문항은 하나 이상이어야 합니다.',
71
96
  addQuestion: '+ 문항 추가',
72
97
  title: '질문',
73
98
  description: '설명',
74
99
  options: '보기',
75
- option: (no) => `보기 ${no}`,
76
- optionDelete: (no) => `보기 ${no} 삭제`,
77
- optionsMin: (min) => `보기는 ${min}개 이상이어야 합니다.`,
78
- optionsMax: (max) => `보기는 최대 ${max}개까지 구성 가능합니다.`,
100
+ option: no => `보기 ${no}`,
101
+ optionDelete: no => `보기 ${no} 삭제`,
102
+ optionsMin: min => `보기는 ${min}개 이상이어야 합니다.`,
103
+ optionsMax: max => `보기는 최대 ${max}개까지 구성 가능합니다.`,
79
104
  addOption: '+ 보기 추가',
80
105
  groups: '그룹',
81
- group: (no) => `그룹 ${no}`,
82
- groupName: (no) => `그룹 ${no} 이름`,
83
- groupDelete: (no) => `그룹 ${no} 삭제`,
84
- groupsMin: (min) => `그룹은 ${min}개 이상이어야 합니다.`,
85
- groupsMax: (max) => `그룹은 최대 ${max}개까지 구성 가능합니다.`,
106
+ group: no => `그룹 ${no}`,
107
+ groupName: no => `그룹 ${no} 이름`,
108
+ groupDelete: no => `그룹 ${no} 삭제`,
109
+ groupsMin: min => `그룹은 ${min}개 이상이어야 합니다.`,
110
+ groupsMax: max => `그룹은 최대 ${max}개까지 구성 가능합니다.`,
86
111
  addGroup: '+ 그룹 추가',
87
112
  groupOptionsHint:
88
- '어느 그룹에 속하는지는 채점 설정에서 지정합니다. 어느 그룹에도 속하지 않는 보기는 오답 보기가 됩니다.',
113
+ '어느 그룹에 속하는지는 아래 정답에서 정합니다. 어느 그룹에도 속하지 않는 보기는 오답 보기가 됩니다.',
89
114
  slots: '답안 칸 수',
90
115
  slotsHint: '보기 중 답안 칸에 놓을 개수. 나머지 보기는 오답 보기가 됩니다.',
91
116
  placeholder: '입력란 힌트',
@@ -93,7 +118,7 @@ export const texts = {
93
118
  shuffle: '답안 순서 섞기 (학생마다 보기 순서가 달라집니다)',
94
119
  explanationOn: '해설 사용 (학생이 한 번 제출하면 보입니다)',
95
120
  explanation: '해설',
96
- sortLabel: (label) => `${label} 순서 바꾸기 (끌거나 ↑ · ↓ 키)`,
121
+ sortLabel: label => `${label} 순서 바꾸기 (끌거나 ↑ · ↓ 키)`,
97
122
  sortTitle: '끌어서 순서 바꾸기',
98
123
  delete: '×',
99
124
  up: '↑',
@@ -103,8 +128,8 @@ export const texts = {
103
128
 
104
129
  /** 새로 만들거나 유형을 바꿀 때 채우는 기본값 (core/model.js) */
105
130
  defaults: {
106
- option: (no) => `보기 ${no}`,
107
- group: (letter) => `그룹 ${letter}`,
131
+ option: no => `보기 ${no}`,
132
+ group: letter => `그룹 ${letter}`,
108
133
  },
109
134
 
110
135
  /** 편집 화면 저장 전 검증 문구 (core/model.js validateQuiz) */
@@ -113,15 +138,15 @@ export const texts = {
113
138
  noQuestions: '문항을 하나 이상 추가해 주세요.',
114
139
  at: (no, message) => `문항 ${no}: ${message}`,
115
140
  title: '질문을 입력해 주세요.',
116
- titleMax: (max) => `질문은 ${max}자까지 입력할 수 있습니다.`,
117
- optionsMin: (min) => `보기는 ${min}개 이상이어야 합니다.`,
118
- optionsMax: (max) => `보기는 최대 ${max}개까지 구성 가능합니다.`,
141
+ titleMax: max => `질문은 ${max}자까지 입력할 수 있습니다.`,
142
+ optionsMin: min => `보기는 ${min}개 이상이어야 합니다.`,
143
+ optionsMax: max => `보기는 최대 ${max}개까지 구성 가능합니다.`,
119
144
  optionText: '보기 내용을 입력해 주세요.',
120
145
  slots: '답안 칸 수는 1개 이상, 보기 개수 이하여야 합니다.',
121
- groupsMin: (min) => `그룹은 ${min}개 이상이어야 합니다.`,
122
- groupsMax: (max) => `그룹은 최대 ${max}개까지 구성 가능합니다.`,
146
+ groupsMin: min => `그룹은 ${min}개 이상이어야 합니다.`,
147
+ groupsMax: max => `그룹은 최대 ${max}개까지 구성 가능합니다.`,
123
148
  groupName: '그룹 이름을 입력해 주세요.',
124
- placeholderMax: (max) => `입력란 힌트는 ${max}자까지 입력할 수 있습니다.`,
149
+ placeholderMax: max => `입력란 힌트는 ${max}자까지 입력할 수 있습니다.`,
125
150
  explanation: '해설 내용을 입력해 주세요.',
126
151
  },
127
152
  };