@burdenoff/microfe-buildmyiq 2026.828.1 → 2026.830.1
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.
- package/dist/buildmyiq/pages/DashboardPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/DashboardPage.js +3 -3
- package/dist/buildmyiq/pages/DashboardPage.js.map +1 -1
- package/dist/buildmyiq/pages/assessments/AssessmentsPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/assessments/AssessmentsPage.js +171 -162
- package/dist/buildmyiq/pages/assessments/AssessmentsPage.js.map +1 -1
- package/dist/buildmyiq/pages/catalog/CatalogPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/catalog/CatalogPage.js +78 -67
- package/dist/buildmyiq/pages/catalog/CatalogPage.js.map +1 -1
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.js +77 -61
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.js.map +1 -1
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.js +236 -216
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.js.map +1 -1
- package/dist/buildmyiq/pages/learning/MyLearningPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/learning/MyLearningPage.js +309 -313
- package/dist/buildmyiq/pages/learning/MyLearningPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,40 +1,24 @@
|
|
|
1
1
|
import { useBuildmyiq as e } from "../../context/BuildmyiqContext.js";
|
|
2
2
|
import "../../context/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { useTr as t } from "../../shared/hooks/useTr.js";
|
|
4
|
+
import { PageLayout as ee } from "../../components/PageLayout.js";
|
|
4
5
|
import { MetricsCard as n } from "../../components/MetricsCard.js";
|
|
5
|
-
import { formatEnumLabel as r, formatRelativeTime as
|
|
6
|
-
import { StatusBadge as
|
|
7
|
-
import { EmptyState as
|
|
6
|
+
import { formatEnumLabel as r, formatRelativeTime as i } from "../../utils/formatters.js";
|
|
7
|
+
import { StatusBadge as a } from "../../components/StatusBadge.js";
|
|
8
|
+
import { EmptyState as o } from "../../components/EmptyState.js";
|
|
8
9
|
import { ErrorView as te, LoadingView as ne } from "../../components/StateViews.js";
|
|
9
|
-
import { DataTable as
|
|
10
|
-
import { FilterTabs as
|
|
11
|
-
import { useBuiAssessments as
|
|
10
|
+
import { DataTable as s } from "../../components/DataTable.js";
|
|
11
|
+
import { FilterTabs as c } from "../../components/FilterTabs.js";
|
|
12
|
+
import { useBuiAssessments as l, useBuiCourses as u, useBuiCreateAssessment as d } from "../../hooks/useBuildmyiqApi.js";
|
|
12
13
|
import "../../hooks/index.js";
|
|
13
14
|
import "../../components/index.js";
|
|
14
|
-
import { ASSESSMENT_TYPES as
|
|
15
|
-
import { useMemo as
|
|
16
|
-
import { CheckCircle2 as
|
|
17
|
-
import { jsx as
|
|
18
|
-
import { Button as
|
|
15
|
+
import { ASSESSMENT_TYPES as f } from "../../types/index.js";
|
|
16
|
+
import { useMemo as p, useState as m } from "react";
|
|
17
|
+
import { CheckCircle2 as h, ClipboardList as g, FileEdit as re, ListChecks as ie, Plus as _ } from "lucide-react";
|
|
18
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
19
|
+
import { Button as b, GlassCard as ae, Input as x, Label as S, ResponsiveDialog as C, ResponsiveDialogContent as w, ResponsiveDialogDescription as T, ResponsiveDialogFooter as oe, ResponsiveDialogHeader as se, ResponsiveDialogTitle as ce, Select as E, SelectContent as D, SelectItem as O, SelectTrigger as k, SelectValue as A, Switch as le, Textarea as ue } from "@burdenoff/fe-libs/ui";
|
|
19
20
|
//#region src/buildmyiq/pages/assessments/AssessmentsPage.tsx
|
|
20
|
-
var j =
|
|
21
|
-
{
|
|
22
|
-
value: "ALL",
|
|
23
|
-
label: "All"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
value: "DRAFT",
|
|
27
|
-
label: "Draft"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
value: "PUBLISHED",
|
|
31
|
-
label: "Published"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
value: "ARCHIVED",
|
|
35
|
-
label: "Archived"
|
|
36
|
-
}
|
|
37
|
-
], M = () => ({
|
|
21
|
+
var j = () => ({
|
|
38
22
|
title: "",
|
|
39
23
|
description: "",
|
|
40
24
|
type: "QUIZ",
|
|
@@ -42,8 +26,8 @@ var j = [
|
|
|
42
26
|
maxAttempts: "1",
|
|
43
27
|
timeLimitMin: "0",
|
|
44
28
|
isGraded: !0
|
|
45
|
-
}),
|
|
46
|
-
let { navigateTo:
|
|
29
|
+
}), M = () => {
|
|
30
|
+
let { navigateTo: M } = e(), N = t(), [P, F] = m(""), [I, L] = m("ALL"), [R, z] = m(!1), [B, V] = m(j), [H, U] = m(null), W = u({ limit: 100 }), G = l(P || void 0), K = l(P || void 0, "ARCHIVED"), q = d(), J = W.data?.items ?? [], Y = p(() => [...G.data ?? [], ...K.data ?? []], [G.data, K.data]), X = p(() => {
|
|
47
31
|
let e = {
|
|
48
32
|
ALL: Y.length,
|
|
49
33
|
DRAFT: 0,
|
|
@@ -52,22 +36,39 @@ var j = [
|
|
|
52
36
|
};
|
|
53
37
|
for (let t of Y) e[t.status] += 1;
|
|
54
38
|
return e;
|
|
55
|
-
}, [Y]), Z =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
39
|
+
}, [Y]), Z = p(() => I === "ALL" ? Y : Y.filter((e) => e.status === I), [Y, I]), de = p(() => Y.reduce((e, t) => e + (t.questions?.length ?? 0), 0), [Y]), fe = p(() => [
|
|
40
|
+
{
|
|
41
|
+
value: "ALL",
|
|
42
|
+
label: N("buildmyiq.assessments.statusAll", "All"),
|
|
43
|
+
count: X.ALL
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
value: "DRAFT",
|
|
47
|
+
label: N("buildmyiq.assessments.statusDraft", "Draft"),
|
|
48
|
+
count: X.DRAFT
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: "PUBLISHED",
|
|
52
|
+
label: N("buildmyiq.assessments.statusPublished", "Published"),
|
|
53
|
+
count: X.PUBLISHED
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
value: "ARCHIVED",
|
|
57
|
+
label: N("buildmyiq.assessments.statusArchived", "Archived"),
|
|
58
|
+
count: X.ARCHIVED
|
|
59
|
+
}
|
|
60
|
+
], [N, X]), pe = G.isLoading || K.isLoading, me = G.isError || K.isError, he = G.isSuccess && K.isSuccess, ge = () => {
|
|
60
61
|
G.refetch(), K.refetch();
|
|
61
|
-
},
|
|
62
|
+
}, _e = [
|
|
62
63
|
{
|
|
63
64
|
key: "title",
|
|
64
|
-
header: "Assessment",
|
|
65
|
-
render: (e) => /* @__PURE__ */
|
|
65
|
+
header: N("buildmyiq.assessments.columnAssessment", "Assessment"),
|
|
66
|
+
render: (e) => /* @__PURE__ */ y("div", {
|
|
66
67
|
className: "min-w-0",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ v("p", {
|
|
68
69
|
className: "font-semibold text-text-primary",
|
|
69
70
|
children: e.title
|
|
70
|
-
}), e.description && /* @__PURE__ */
|
|
71
|
+
}), e.description && /* @__PURE__ */ v("p", {
|
|
71
72
|
className: "mt-0.5 max-w-md truncate text-xs text-text-secondary",
|
|
72
73
|
title: e.description,
|
|
73
74
|
children: e.description
|
|
@@ -76,229 +77,237 @@ var j = [
|
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
key: "type",
|
|
79
|
-
header: "Type",
|
|
80
|
-
render: (e) => /* @__PURE__ */
|
|
80
|
+
header: N("buildmyiq.assessments.columnType", "Type"),
|
|
81
|
+
render: (e) => /* @__PURE__ */ v(a, { status: e.type })
|
|
81
82
|
},
|
|
82
83
|
{
|
|
83
84
|
key: "status",
|
|
84
|
-
header: "Status",
|
|
85
|
+
header: N("buildmyiq.assessments.columnStatus", "Status"),
|
|
85
86
|
sortValue: (e) => e.status,
|
|
86
|
-
render: (e) => /* @__PURE__ */
|
|
87
|
+
render: (e) => /* @__PURE__ */ v(a, { status: e.status })
|
|
87
88
|
},
|
|
88
89
|
{
|
|
89
90
|
key: "passingScore",
|
|
90
|
-
header: "Pass",
|
|
91
|
+
header: N("buildmyiq.assessments.columnPass", "Pass"),
|
|
91
92
|
align: "right",
|
|
92
93
|
hideOnMobile: !0,
|
|
93
94
|
sortValue: (e) => e.passingScore,
|
|
94
|
-
render: (e) => /* @__PURE__ */
|
|
95
|
+
render: (e) => /* @__PURE__ */ y("span", {
|
|
95
96
|
className: "tabular-nums text-text-secondary",
|
|
96
97
|
children: [e.passingScore, "%"]
|
|
97
98
|
})
|
|
98
99
|
},
|
|
99
100
|
{
|
|
100
101
|
key: "questions",
|
|
101
|
-
header: "Questions",
|
|
102
|
+
header: N("buildmyiq.assessments.columnQuestions", "Questions"),
|
|
102
103
|
align: "right",
|
|
103
104
|
hideOnMobile: !0,
|
|
104
|
-
render: (e) => /* @__PURE__ */
|
|
105
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
105
106
|
className: "tabular-nums text-text-secondary",
|
|
106
107
|
children: e.questions?.length ?? "—"
|
|
107
108
|
})
|
|
108
109
|
},
|
|
109
110
|
{
|
|
110
111
|
key: "updatedAt",
|
|
111
|
-
header: "Updated",
|
|
112
|
+
header: N("buildmyiq.assessments.columnUpdated", "Updated"),
|
|
112
113
|
hideOnMobile: !0,
|
|
113
114
|
sortValue: (e) => e.updatedAt,
|
|
114
|
-
render: (e) => /* @__PURE__ */
|
|
115
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
115
116
|
className: "whitespace-nowrap text-text-secondary",
|
|
116
|
-
children:
|
|
117
|
+
children: i(e.updatedAt)
|
|
117
118
|
})
|
|
118
119
|
}
|
|
119
120
|
], Q = () => {
|
|
120
|
-
V(
|
|
121
|
+
V(j()), U(null), z(!0);
|
|
121
122
|
}, $ = () => {
|
|
122
|
-
z(!1), V(
|
|
123
|
+
z(!1), V(j()), U(null);
|
|
123
124
|
};
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
title: "Assessments",
|
|
126
|
-
description: "Quizzes, exams and graded assignments for every course in your workspace.",
|
|
125
|
+
return /* @__PURE__ */ y(ee, {
|
|
126
|
+
title: N("buildmyiq.assessments.title", "Assessments"),
|
|
127
|
+
description: N("buildmyiq.assessments.description", "Quizzes, exams and graded assignments for every course in your workspace."),
|
|
127
128
|
titleGradient: !0,
|
|
128
129
|
aurora: !0,
|
|
129
|
-
actions: /* @__PURE__ */
|
|
130
|
+
actions: /* @__PURE__ */ y(b, {
|
|
130
131
|
onClick: Q,
|
|
131
132
|
disabled: !P,
|
|
132
|
-
children: [
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ v(_, { className: "mr-1.5 h-4 w-4" }),
|
|
135
|
+
" ",
|
|
136
|
+
N("buildmyiq.assessments.newAssessment", "New assessment")
|
|
137
|
+
]
|
|
133
138
|
}),
|
|
134
139
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ v(ae, {
|
|
136
141
|
treatment: "plain",
|
|
137
142
|
className: "mb-5 p-4",
|
|
138
|
-
children: /* @__PURE__ */
|
|
143
|
+
children: /* @__PURE__ */ y("div", {
|
|
139
144
|
className: "flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-end",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ y("div", {
|
|
141
146
|
className: "grid gap-1.5",
|
|
142
147
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ v(S, {
|
|
144
149
|
htmlFor: "assessments-course-filter",
|
|
145
150
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
146
|
-
children: "Course"
|
|
151
|
+
children: N("buildmyiq.assessments.courseLabel", "Course")
|
|
147
152
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ y(E, {
|
|
149
154
|
value: P,
|
|
150
155
|
onValueChange: (e) => {
|
|
151
156
|
F(e), L("ALL");
|
|
152
157
|
},
|
|
153
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ v(k, {
|
|
154
159
|
id: "assessments-course-filter",
|
|
155
|
-
"aria-label": "
|
|
160
|
+
"aria-label": N("buildmyiq.assessments.courseLabel", "Course"),
|
|
156
161
|
className: "w-full sm:w-72 data-[placeholder]:text-text-secondary!",
|
|
157
|
-
children: /* @__PURE__ */
|
|
158
|
-
}), /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ v(A, { placeholder: N("buildmyiq.assessments.coursePlaceholder", "Select a course") })
|
|
163
|
+
}), /* @__PURE__ */ v(D, { children: J.map((e) => /* @__PURE__ */ v(O, {
|
|
159
164
|
value: e.id,
|
|
160
165
|
children: e.title
|
|
161
166
|
}, e.id)) })]
|
|
162
167
|
}),
|
|
163
|
-
W.isSuccess && J.length === 0 && /* @__PURE__ */
|
|
168
|
+
W.isSuccess && J.length === 0 && /* @__PURE__ */ v("p", {
|
|
164
169
|
className: "text-xs text-text-secondary",
|
|
165
|
-
children: "No courses yet — create one in Authoring first."
|
|
170
|
+
children: N("buildmyiq.assessments.noCoursesHint", "No courses yet — create one in Authoring first.")
|
|
166
171
|
})
|
|
167
172
|
]
|
|
168
|
-
}), P && /* @__PURE__ */
|
|
173
|
+
}), P && /* @__PURE__ */ y("div", {
|
|
169
174
|
className: "grid gap-1.5",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ v("span", {
|
|
171
176
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
172
|
-
children: "Status"
|
|
173
|
-
}), /* @__PURE__ */
|
|
174
|
-
options:
|
|
177
|
+
children: N("buildmyiq.assessments.statusLabel", "Status")
|
|
178
|
+
}), /* @__PURE__ */ v(c, {
|
|
179
|
+
options: fe,
|
|
175
180
|
value: I,
|
|
176
181
|
onChange: L
|
|
177
182
|
})]
|
|
178
183
|
})]
|
|
179
184
|
})
|
|
180
185
|
}),
|
|
181
|
-
P &&
|
|
186
|
+
P && he && Y.length > 0 && /* @__PURE__ */ y("div", {
|
|
182
187
|
className: "mb-5 grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
183
188
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
icon: /* @__PURE__ */ g
|
|
189
|
+
/* @__PURE__ */ v(n, {
|
|
190
|
+
icon: /* @__PURE__ */ v(g, { className: "h-5 w-5" }),
|
|
186
191
|
value: X.ALL,
|
|
187
|
-
label: "Assessments"
|
|
192
|
+
label: N("buildmyiq.assessments.metricAssessments", "Assessments")
|
|
188
193
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
icon: /* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ v(n, {
|
|
195
|
+
icon: /* @__PURE__ */ v(h, { className: "h-5 w-5" }),
|
|
191
196
|
value: X.PUBLISHED,
|
|
192
|
-
label: "Published",
|
|
197
|
+
label: N("buildmyiq.assessments.metricPublished", "Published"),
|
|
193
198
|
accent: "success"
|
|
194
199
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
icon: /* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ v(n, {
|
|
201
|
+
icon: /* @__PURE__ */ v(re, { className: "h-5 w-5" }),
|
|
197
202
|
value: X.DRAFT,
|
|
198
|
-
label: "Drafts"
|
|
203
|
+
label: N("buildmyiq.assessments.metricDrafts", "Drafts")
|
|
199
204
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
icon: /* @__PURE__ */
|
|
202
|
-
value:
|
|
203
|
-
label: "Questions"
|
|
205
|
+
/* @__PURE__ */ v(n, {
|
|
206
|
+
icon: /* @__PURE__ */ v(ie, { className: "h-5 w-5" }),
|
|
207
|
+
value: de,
|
|
208
|
+
label: N("buildmyiq.assessments.metricQuestions", "Questions")
|
|
204
209
|
})
|
|
205
210
|
]
|
|
206
211
|
}),
|
|
207
|
-
P ?
|
|
208
|
-
|
|
209
|
-
onRetry:
|
|
210
|
-
}) : Z.length === 0 ? /* @__PURE__ */
|
|
212
|
+
P ? pe ? /* @__PURE__ */ v(ne, { label: N("buildmyiq.assessments.loading", "Loading assessments…") }) : me ? /* @__PURE__ */ v(te, {
|
|
213
|
+
title: N("buildmyiq.assessments.errorTitle", "Couldn't load assessments for this course."),
|
|
214
|
+
onRetry: ge
|
|
215
|
+
}) : Z.length === 0 ? /* @__PURE__ */ v(o, {
|
|
211
216
|
illustration: "empty-data",
|
|
212
|
-
icon: /* @__PURE__ */ g
|
|
213
|
-
title: I === "ALL" ? "No assessments yet" : "No assessments match this filter",
|
|
214
|
-
description: I === "ALL" ? "Create the first quiz, exam or assignment for this course." : "Try a different status filter, or create a new assessment.",
|
|
215
|
-
action: /* @__PURE__ */
|
|
217
|
+
icon: /* @__PURE__ */ v(g, { className: "h-10 w-10" }),
|
|
218
|
+
title: I === "ALL" ? N("buildmyiq.assessments.noAssessmentsTitle", "No assessments yet") : N("buildmyiq.assessments.noFilteredTitle", "No assessments match this filter"),
|
|
219
|
+
description: I === "ALL" ? N("buildmyiq.assessments.noAssessmentsDescription", "Create the first quiz, exam or assignment for this course.") : N("buildmyiq.assessments.noFilteredDescription", "Try a different status filter, or create a new assessment."),
|
|
220
|
+
action: /* @__PURE__ */ y(b, {
|
|
216
221
|
onClick: Q,
|
|
217
|
-
children: [
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ v(_, { className: "mr-1.5 h-4 w-4" }),
|
|
224
|
+
" ",
|
|
225
|
+
N("buildmyiq.assessments.newAssessment", "New assessment")
|
|
226
|
+
]
|
|
218
227
|
})
|
|
219
|
-
}) : /* @__PURE__ */
|
|
220
|
-
columns:
|
|
228
|
+
}) : /* @__PURE__ */ v(s, {
|
|
229
|
+
columns: _e,
|
|
221
230
|
rows: Z,
|
|
222
231
|
rowKey: (e) => e.id,
|
|
223
|
-
onRowClick: (e) =>
|
|
232
|
+
onRowClick: (e) => M(`assessments/${e.id}`),
|
|
224
233
|
defaultSort: {
|
|
225
234
|
key: "updatedAt",
|
|
226
235
|
dir: "desc"
|
|
227
236
|
}
|
|
228
|
-
}) : /* @__PURE__ */
|
|
237
|
+
}) : /* @__PURE__ */ v(o, {
|
|
229
238
|
illustration: "onboarding",
|
|
230
|
-
icon: /* @__PURE__ */ g
|
|
231
|
-
title: "Pick a course to see its assessments",
|
|
232
|
-
description: "Assessments are scoped to a course. Choose a course above to view, filter and create its quizzes and exams."
|
|
239
|
+
icon: /* @__PURE__ */ v(g, { className: "h-10 w-10" }),
|
|
240
|
+
title: N("buildmyiq.assessments.pickCourseTitle", "Pick a course to see its assessments"),
|
|
241
|
+
description: N("buildmyiq.assessments.pickCourseDescription", "Assessments are scoped to a course. Choose a course above to view, filter and create its quizzes and exams.")
|
|
233
242
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ v(C, {
|
|
235
244
|
open: R,
|
|
236
245
|
onOpenChange: (e) => {
|
|
237
246
|
e ? z(!0) : $();
|
|
238
247
|
},
|
|
239
|
-
children: /* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ y(w, { children: [
|
|
249
|
+
/* @__PURE__ */ y(se, { children: [/* @__PURE__ */ v(ce, { children: N("buildmyiq.assessments.dialogTitle", "New assessment") }), /* @__PURE__ */ v(T, { children: N("buildmyiq.assessments.dialogDescription", "Add a quiz, exam or assignment to this course. You can add questions after it's created.") })] }),
|
|
250
|
+
/* @__PURE__ */ y("div", {
|
|
242
251
|
className: "grid gap-4 py-2",
|
|
243
252
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ y("div", {
|
|
245
254
|
className: "grid gap-1.5",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ v(S, {
|
|
247
256
|
htmlFor: "assessmentTitle",
|
|
248
|
-
children: "Title *"
|
|
249
|
-
}), /* @__PURE__ */
|
|
257
|
+
children: N("buildmyiq.assessments.titleLabel", "Title *")
|
|
258
|
+
}), /* @__PURE__ */ v(x, {
|
|
250
259
|
id: "assessmentTitle",
|
|
251
260
|
value: B.title,
|
|
252
261
|
onChange: (e) => V({
|
|
253
262
|
...B,
|
|
254
263
|
title: e.target.value
|
|
255
264
|
}),
|
|
256
|
-
placeholder: "e.g. Module 1 knowledge check"
|
|
265
|
+
placeholder: N("buildmyiq.assessments.titlePlaceholder", "e.g. Module 1 knowledge check")
|
|
257
266
|
})]
|
|
258
267
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ y("div", {
|
|
260
269
|
className: "grid gap-1.5",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ v(S, {
|
|
262
271
|
htmlFor: "assessmentDescription",
|
|
263
|
-
children: "Description"
|
|
264
|
-
}), /* @__PURE__ */
|
|
272
|
+
children: N("buildmyiq.assessments.descriptionLabel", "Description")
|
|
273
|
+
}), /* @__PURE__ */ v(ue, {
|
|
265
274
|
id: "assessmentDescription",
|
|
266
275
|
value: B.description,
|
|
267
276
|
onChange: (e) => V({
|
|
268
277
|
...B,
|
|
269
278
|
description: e.target.value
|
|
270
279
|
}),
|
|
271
|
-
placeholder: "What this assessment covers and how it's graded.",
|
|
280
|
+
placeholder: N("buildmyiq.assessments.descriptionPlaceholder", "What this assessment covers and how it's graded."),
|
|
272
281
|
rows: 2
|
|
273
282
|
})]
|
|
274
283
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ y("div", {
|
|
276
285
|
className: "grid gap-2 sm:grid-cols-2",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ y("div", {
|
|
278
287
|
className: "grid gap-1.5",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ v(S, {
|
|
280
289
|
htmlFor: "assessmentType",
|
|
281
|
-
children: "Type"
|
|
282
|
-
}), /* @__PURE__ */
|
|
290
|
+
children: N("buildmyiq.assessments.typeLabel", "Type")
|
|
291
|
+
}), /* @__PURE__ */ y(E, {
|
|
283
292
|
value: B.type,
|
|
284
293
|
onValueChange: (e) => V({
|
|
285
294
|
...B,
|
|
286
295
|
type: e
|
|
287
296
|
}),
|
|
288
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ v(k, {
|
|
289
298
|
id: "assessmentType",
|
|
290
|
-
children: /* @__PURE__ */
|
|
291
|
-
}), /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ v(A, {})
|
|
300
|
+
}), /* @__PURE__ */ v(D, { children: f.map((e) => /* @__PURE__ */ v(O, {
|
|
292
301
|
value: e,
|
|
293
302
|
children: r(e)
|
|
294
303
|
}, e)) })]
|
|
295
304
|
})]
|
|
296
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ y("div", {
|
|
297
306
|
className: "grid gap-1.5",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
307
|
+
children: [/* @__PURE__ */ v(S, {
|
|
299
308
|
htmlFor: "passingScore",
|
|
300
|
-
children: "Passing score (%)"
|
|
301
|
-
}), /* @__PURE__ */
|
|
309
|
+
children: N("buildmyiq.assessments.passingScoreLabel", "Passing score (%)")
|
|
310
|
+
}), /* @__PURE__ */ v(x, {
|
|
302
311
|
id: "passingScore",
|
|
303
312
|
type: "number",
|
|
304
313
|
min: "0",
|
|
@@ -309,18 +318,18 @@ var j = [
|
|
|
309
318
|
...B,
|
|
310
319
|
passingScore: e.target.value
|
|
311
320
|
}),
|
|
312
|
-
placeholder: "70"
|
|
321
|
+
placeholder: N("buildmyiq.assessments.passingScorePlaceholder", "70")
|
|
313
322
|
})]
|
|
314
323
|
})]
|
|
315
324
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ y("div", {
|
|
317
326
|
className: "grid gap-2 sm:grid-cols-2",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ y("div", {
|
|
319
328
|
className: "grid gap-1.5",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ v(S, {
|
|
321
330
|
htmlFor: "maxAttempts",
|
|
322
|
-
children: "Max attempts"
|
|
323
|
-
}), /* @__PURE__ */
|
|
331
|
+
children: N("buildmyiq.assessments.maxAttemptsLabel", "Max attempts")
|
|
332
|
+
}), /* @__PURE__ */ v(x, {
|
|
324
333
|
id: "maxAttempts",
|
|
325
334
|
type: "number",
|
|
326
335
|
min: "1",
|
|
@@ -330,14 +339,14 @@ var j = [
|
|
|
330
339
|
...B,
|
|
331
340
|
maxAttempts: e.target.value
|
|
332
341
|
}),
|
|
333
|
-
placeholder: "1"
|
|
342
|
+
placeholder: N("buildmyiq.assessments.maxAttemptsPlaceholder", "1")
|
|
334
343
|
})]
|
|
335
|
-
}), /* @__PURE__ */
|
|
344
|
+
}), /* @__PURE__ */ y("div", {
|
|
336
345
|
className: "grid gap-1.5",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ v(S, {
|
|
338
347
|
htmlFor: "timeLimitMin",
|
|
339
|
-
children: "Time limit (minutes)"
|
|
340
|
-
}), /* @__PURE__ */
|
|
348
|
+
children: N("buildmyiq.assessments.timeLimitLabel", "Time limit (minutes)")
|
|
349
|
+
}), /* @__PURE__ */ v(x, {
|
|
341
350
|
id: "timeLimitMin",
|
|
342
351
|
type: "number",
|
|
343
352
|
min: "0",
|
|
@@ -347,23 +356,23 @@ var j = [
|
|
|
347
356
|
...B,
|
|
348
357
|
timeLimitMin: e.target.value
|
|
349
358
|
}),
|
|
350
|
-
placeholder: "0 = no limit"
|
|
359
|
+
placeholder: N("buildmyiq.assessments.timeLimitPlaceholder", "0 = no limit")
|
|
351
360
|
})]
|
|
352
361
|
})]
|
|
353
362
|
}),
|
|
354
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ y("div", {
|
|
355
364
|
className: "flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
356
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ y("div", {
|
|
357
366
|
className: "min-w-0",
|
|
358
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ v(S, {
|
|
359
368
|
htmlFor: "isGraded",
|
|
360
369
|
className: "cursor-pointer",
|
|
361
|
-
children: "Graded"
|
|
362
|
-
}), /* @__PURE__ */
|
|
370
|
+
children: N("buildmyiq.assessments.gradedLabel", "Graded")
|
|
371
|
+
}), /* @__PURE__ */ v("p", {
|
|
363
372
|
className: "text-xs text-text-secondary",
|
|
364
|
-
children: "Contributes to the learner's score and pass/fail outcome."
|
|
373
|
+
children: N("buildmyiq.assessments.gradedDescription", "Contributes to the learner's score and pass/fail outcome.")
|
|
365
374
|
})]
|
|
366
|
-
}), /* @__PURE__ */
|
|
375
|
+
}), /* @__PURE__ */ v(le, {
|
|
367
376
|
id: "isGraded",
|
|
368
377
|
checked: B.isGraded,
|
|
369
378
|
onCheckedChange: (e) => V({
|
|
@@ -372,24 +381,24 @@ var j = [
|
|
|
372
381
|
})
|
|
373
382
|
})]
|
|
374
383
|
}),
|
|
375
|
-
H && /* @__PURE__ */
|
|
384
|
+
H && /* @__PURE__ */ v("p", {
|
|
376
385
|
className: "text-sm text-status-error-text",
|
|
377
386
|
children: H
|
|
378
387
|
})
|
|
379
388
|
]
|
|
380
389
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ y(oe, { children: [/* @__PURE__ */ v(b, {
|
|
382
391
|
variant: "outline",
|
|
383
392
|
onClick: $,
|
|
384
|
-
children: "Cancel"
|
|
385
|
-
}), /* @__PURE__ */
|
|
393
|
+
children: N("common.cancel", "Cancel")
|
|
394
|
+
}), /* @__PURE__ */ v(b, {
|
|
386
395
|
onClick: async () => {
|
|
387
396
|
if (!P) {
|
|
388
|
-
U("Pick a course first.");
|
|
397
|
+
U(N("buildmyiq.assessments.formErrorPickCourse", "Pick a course first."));
|
|
389
398
|
return;
|
|
390
399
|
}
|
|
391
400
|
if (!B.title.trim()) {
|
|
392
|
-
U("Title is required.");
|
|
401
|
+
U(N("buildmyiq.assessments.formErrorTitleRequired", "Title is required."));
|
|
393
402
|
return;
|
|
394
403
|
}
|
|
395
404
|
try {
|
|
@@ -403,13 +412,13 @@ var j = [
|
|
|
403
412
|
timeLimitMin: B.timeLimitMin ? Number(B.timeLimitMin) : void 0,
|
|
404
413
|
isGraded: B.isGraded
|
|
405
414
|
});
|
|
406
|
-
$(),
|
|
415
|
+
$(), M(`assessments/${e.id}`);
|
|
407
416
|
} catch (e) {
|
|
408
|
-
U(e instanceof Error ? e.message : "Failed to create assessment.");
|
|
417
|
+
U(e instanceof Error ? e.message : N("buildmyiq.assessments.createError", "Failed to create assessment."));
|
|
409
418
|
}
|
|
410
419
|
},
|
|
411
420
|
disabled: q.isPending,
|
|
412
|
-
children: q.isPending ? "Creating…" : "Create assessment"
|
|
421
|
+
children: q.isPending ? N("buildmyiq.assessments.creating", "Creating…") : N("buildmyiq.assessments.create", "Create assessment")
|
|
413
422
|
})] })
|
|
414
423
|
] })
|
|
415
424
|
})
|
|
@@ -417,6 +426,6 @@ var j = [
|
|
|
417
426
|
});
|
|
418
427
|
};
|
|
419
428
|
//#endregion
|
|
420
|
-
export {
|
|
429
|
+
export { M as AssessmentsPage };
|
|
421
430
|
|
|
422
431
|
//# sourceMappingURL=AssessmentsPage.js.map
|