@studious-lms/server 1.20.0 → 1.22.0
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/Dockerfile +5 -2
- package/dist/models/agenda.d.ts +6 -0
- package/dist/models/agenda.d.ts.map +1 -1
- package/dist/models/announcement.d.ts +2 -0
- package/dist/models/announcement.d.ts.map +1 -1
- package/dist/models/assignment.d.ts +27 -0
- package/dist/models/assignment.d.ts.map +1 -1
- package/dist/models/auth.d.ts +4 -0
- package/dist/models/auth.d.ts.map +1 -1
- package/dist/models/class.d.ts +14 -0
- package/dist/models/class.d.ts.map +1 -1
- package/dist/models/event.d.ts +11 -0
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/file.d.ts +19 -0
- package/dist/models/file.d.ts.map +1 -1
- package/dist/models/folder.d.ts +4 -0
- package/dist/models/folder.d.ts.map +1 -1
- package/dist/models/gradebook.d.ts +180 -0
- package/dist/models/gradebook.d.ts.map +1 -0
- package/dist/models/gradebook.js +88 -0
- package/dist/models/gradebook.js.map +1 -0
- package/dist/models/labChat.d.ts +4 -0
- package/dist/models/labChat.d.ts.map +1 -1
- package/dist/models/newtonChat.d.ts +2 -0
- package/dist/models/newtonChat.d.ts.map +1 -1
- package/dist/models/school.d.ts +2 -0
- package/dist/models/school.d.ts.map +1 -1
- package/dist/models/section.d.ts +3 -0
- package/dist/models/section.d.ts.map +1 -1
- package/dist/models/worksheet.d.ts +6 -0
- package/dist/models/worksheet.d.ts.map +1 -1
- package/dist/routers/_app.d.ts +1359 -37
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/_app.js +4 -2
- package/dist/routers/_app.js.map +1 -1
- package/dist/routers/admin.d.ts +164 -0
- package/dist/routers/admin.d.ts.map +1 -1
- package/dist/routers/admin.js +23 -4
- package/dist/routers/admin.js.map +1 -1
- package/dist/routers/agenda.d.ts +6 -0
- package/dist/routers/agenda.d.ts.map +1 -1
- package/dist/routers/assignment.d.ts +102 -1
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/assignment.js +180 -2
- package/dist/routers/assignment.js.map +1 -1
- package/dist/routers/class.d.ts +17 -0
- package/dist/routers/class.d.ts.map +1 -1
- package/dist/routers/event.d.ts +4 -0
- package/dist/routers/event.d.ts.map +1 -1
- package/dist/routers/file.d.ts +66 -0
- package/dist/routers/file.d.ts.map +1 -1
- package/dist/routers/file.js +111 -2
- package/dist/routers/file.js.map +1 -1
- package/dist/routers/gradebook.d.ts +299 -0
- package/dist/routers/gradebook.d.ts.map +1 -0
- package/dist/routers/gradebook.js +107 -0
- package/dist/routers/gradebook.js.map +1 -0
- package/dist/routers/school.d.ts +4 -0
- package/dist/routers/school.d.ts.map +1 -1
- package/dist/routers/section.d.ts +1 -1
- package/dist/routers/worksheet.d.ts +3 -1
- package/dist/routers/worksheet.d.ts.map +1 -1
- package/dist/services/adminInstitution.d.ts +51 -0
- package/dist/services/adminInstitution.d.ts.map +1 -1
- package/dist/services/adminInstitution.js +52 -2
- package/dist/services/adminInstitution.js.map +1 -1
- package/dist/services/adminMetrics.d.ts +17 -0
- package/dist/services/adminMetrics.d.ts.map +1 -0
- package/dist/services/adminMetrics.js +37 -0
- package/dist/services/adminMetrics.js.map +1 -0
- package/dist/services/adminRunJob.d.ts +9 -0
- package/dist/services/adminRunJob.d.ts.map +1 -1
- package/dist/services/adminRunJob.js +18 -2
- package/dist/services/adminRunJob.js.map +1 -1
- package/dist/services/adminUser.d.ts +67 -0
- package/dist/services/adminUser.d.ts.map +1 -0
- package/dist/services/adminUser.js +87 -0
- package/dist/services/adminUser.js.map +1 -0
- package/dist/services/agenda.d.ts +6 -0
- package/dist/services/agenda.d.ts.map +1 -1
- package/dist/services/assignment.d.ts +27 -0
- package/dist/services/assignment.d.ts.map +1 -1
- package/dist/services/class.d.ts +17 -0
- package/dist/services/class.d.ts.map +1 -1
- package/dist/services/event.d.ts +4 -0
- package/dist/services/event.d.ts.map +1 -1
- package/dist/services/gradeCalculation.d.ts +70 -0
- package/dist/services/gradeCalculation.d.ts.map +1 -0
- package/dist/services/gradeCalculation.js +148 -0
- package/dist/services/gradeCalculation.js.map +1 -0
- package/dist/services/gradebook.d.ts +197 -0
- package/dist/services/gradebook.d.ts.map +1 -0
- package/dist/services/gradebook.js +263 -0
- package/dist/services/gradebook.js.map +1 -0
- package/dist/services/school.d.ts +4 -0
- package/dist/services/school.d.ts.map +1 -1
- package/dist/services/worksheet.d.ts +2 -0
- package/dist/services/worksheet.d.ts.map +1 -1
- package/docker-entrypoint.sh +7 -0
- package/package.json +1 -1
- package/prisma/migrations/20260708011456_add_file_annotations/migration.sql +35 -0
- package/prisma/migrations/20260708011629_add_gradebook_categories_columns_policies/migration.sql +78 -0
- package/prisma/migrations/20260723142314_make_file_annotation_submission_optional/migration.sql +2 -0
- package/prisma/schema.prisma +130 -38
- package/src/models/gradebook.ts +91 -0
- package/src/routers/_app.ts +2 -0
- package/src/routers/admin.ts +28 -0
- package/src/routers/assignment.ts +204 -0
- package/src/routers/file.ts +128 -0
- package/src/routers/gradebook.ts +173 -0
- package/src/services/adminInstitution.ts +52 -0
- package/src/services/adminMetrics.ts +46 -0
- package/src/services/adminRunJob.ts +24 -0
- package/src/services/adminUser.ts +93 -0
- package/src/services/gradeCalculation.ts +253 -0
- package/src/services/gradebook.ts +383 -0
- package/tests/unit/services/gradeCalculation.test.ts +206 -0
package/dist/routers/file.js
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e028d0f2-5361-5ae8-91b4-499cdb5c74ed")}catch(e){}}();
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
import { TRPCError } from "@trpc/server";
|
|
4
5
|
import { createTRPCRouter, protectedProcedure } from "../trpc.js";
|
|
6
|
+
import { prisma } from "../lib/prisma.js";
|
|
5
7
|
import { deleteFileGeneric, getFileSignedUrl, moveFileScoped, renameFileScoped, } from "../services/file.js";
|
|
8
|
+
const upsertAnnotationSchema = z.object({
|
|
9
|
+
fileId: z.string(),
|
|
10
|
+
id: z.string().optional(),
|
|
11
|
+
page: z.number().int().min(1),
|
|
12
|
+
type: z.enum(["HIGHLIGHT", "INK", "COMMENT", "TEXT"]),
|
|
13
|
+
geometry: z.record(z.string(), z.unknown()),
|
|
14
|
+
text: z.string().optional(),
|
|
15
|
+
color: z.string().optional(),
|
|
16
|
+
});
|
|
17
|
+
/** @throws NOT_FOUND unless the file exists and is owned by the user. */
|
|
18
|
+
async function requireOwnedFile(userId, fileId) {
|
|
19
|
+
const file = await prisma.file.findFirst({
|
|
20
|
+
where: { id: fileId, userId },
|
|
21
|
+
select: { id: true },
|
|
22
|
+
});
|
|
23
|
+
if (!file) {
|
|
24
|
+
throw new TRPCError({
|
|
25
|
+
code: "NOT_FOUND",
|
|
26
|
+
message: "File not found or you don't own it",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
6
30
|
/**
|
|
7
31
|
* File router. Backed by the same unified scope-aware permission model as the
|
|
8
32
|
* folder router. The class files page and the cloud-storage page (personal /
|
|
@@ -36,6 +60,91 @@ export const fileRouter = createTRPCRouter({
|
|
|
36
60
|
delete: protectedProcedure
|
|
37
61
|
.input(z.object({ fileId: z.string() }))
|
|
38
62
|
.mutation(({ ctx, input }) => deleteFileGeneric(ctx.user.id, input.fileId)),
|
|
63
|
+
// PDF annotations on files the user owns (personal cloud storage). The
|
|
64
|
+
// submission review flow uses the annotation endpoints on the assignment
|
|
65
|
+
// router instead; these are owner-only and carry no submission context.
|
|
66
|
+
listAnnotations: protectedProcedure
|
|
67
|
+
.input(z.object({ fileId: z.string() }))
|
|
68
|
+
.query(async ({ ctx, input }) => {
|
|
69
|
+
await requireOwnedFile(ctx.user.id, input.fileId);
|
|
70
|
+
const annotations = await prisma.fileAnnotation.findMany({
|
|
71
|
+
where: { fileId: input.fileId, submissionId: null },
|
|
72
|
+
orderBy: { createdAt: "asc" },
|
|
73
|
+
include: {
|
|
74
|
+
author: {
|
|
75
|
+
select: {
|
|
76
|
+
id: true,
|
|
77
|
+
username: true,
|
|
78
|
+
profile: { select: { displayName: true } },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
return { annotations };
|
|
84
|
+
}),
|
|
85
|
+
upsertAnnotation: protectedProcedure
|
|
86
|
+
.input(upsertAnnotationSchema)
|
|
87
|
+
.mutation(async ({ ctx, input }) => {
|
|
88
|
+
const { fileId, id, page, type, geometry, text, color } = input;
|
|
89
|
+
await requireOwnedFile(ctx.user.id, fileId);
|
|
90
|
+
if (id) {
|
|
91
|
+
const existing = await prisma.fileAnnotation.findFirst({
|
|
92
|
+
where: { id, fileId, submissionId: null, authorId: ctx.user.id },
|
|
93
|
+
select: { id: true },
|
|
94
|
+
});
|
|
95
|
+
if (!existing) {
|
|
96
|
+
throw new TRPCError({
|
|
97
|
+
code: "NOT_FOUND",
|
|
98
|
+
message: "Annotation not found",
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
const annotation = await prisma.fileAnnotation.update({
|
|
102
|
+
where: { id },
|
|
103
|
+
data: {
|
|
104
|
+
page,
|
|
105
|
+
type,
|
|
106
|
+
geometry: geometry,
|
|
107
|
+
text: text ?? null,
|
|
108
|
+
color: color ?? null,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
return { annotation };
|
|
112
|
+
}
|
|
113
|
+
const annotation = await prisma.fileAnnotation.create({
|
|
114
|
+
data: {
|
|
115
|
+
fileId,
|
|
116
|
+
authorId: ctx.user.id,
|
|
117
|
+
page,
|
|
118
|
+
type,
|
|
119
|
+
geometry: geometry,
|
|
120
|
+
text: text ?? null,
|
|
121
|
+
color: color ?? null,
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
return { annotation };
|
|
125
|
+
}),
|
|
126
|
+
deleteAnnotation: protectedProcedure
|
|
127
|
+
.input(z.object({ fileId: z.string(), id: z.string() }))
|
|
128
|
+
.mutation(async ({ ctx, input }) => {
|
|
129
|
+
await requireOwnedFile(ctx.user.id, input.fileId);
|
|
130
|
+
const annotation = await prisma.fileAnnotation.findFirst({
|
|
131
|
+
where: {
|
|
132
|
+
id: input.id,
|
|
133
|
+
fileId: input.fileId,
|
|
134
|
+
submissionId: null,
|
|
135
|
+
authorId: ctx.user.id,
|
|
136
|
+
},
|
|
137
|
+
select: { id: true },
|
|
138
|
+
});
|
|
139
|
+
if (!annotation) {
|
|
140
|
+
throw new TRPCError({
|
|
141
|
+
code: "NOT_FOUND",
|
|
142
|
+
message: "Annotation not found",
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
await prisma.fileAnnotation.delete({ where: { id: input.id } });
|
|
146
|
+
return { success: true };
|
|
147
|
+
}),
|
|
39
148
|
});
|
|
40
149
|
//# sourceMappingURL=file.js.map
|
|
41
|
-
//# debugId=
|
|
150
|
+
//# debugId=e028d0f2-5361-5ae8-91b4-499cdb5c74ed
|
package/dist/routers/file.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sources":["routers/file.ts"],"sourceRoot":"/","sourcesContent":["import { z } from \"zod\";\nimport { createTRPCRouter, protectedProcedure } from \"../trpc.js\";\nimport {\n deleteFileGeneric,\n getFileSignedUrl,\n moveFileScoped,\n renameFileScoped,\n} from \"../services/file.js\";\n\n/**\n * File router. Backed by the same unified scope-aware permission model as the\n * folder router. The class files page and the cloud-storage page (personal /\n * institution) both run through the same endpoints.\n *\n * Permissions are derived from the file's parent folder scope, so callers\n * never need to send `classId` / `scope` — just the file id.\n */\nexport const fileRouter = createTRPCRouter({\n getSignedUrl: protectedProcedure\n .input(z.object({ fileId: z.string() }))\n .mutation(({ ctx, input }) =>\n getFileSignedUrl(ctx.user!.id, input.fileId)\n ),\n\n move: protectedProcedure\n .input(\n z.object({\n fileId: z.string(),\n targetFolderId: z.string(),\n })\n )\n .mutation(({ ctx, input }) =>\n moveFileScoped(ctx.user!.id, {\n fileId: input.fileId,\n targetFolderId: input.targetFolderId,\n })\n ),\n\n rename: protectedProcedure\n .input(\n z.object({\n fileId: z.string(),\n newName: z.string().min(1),\n })\n )\n .mutation(({ ctx, input }) =>\n renameFileScoped(ctx.user!.id, {\n fileId: input.fileId,\n newName: input.newName,\n })\n ),\n\n delete: protectedProcedure\n .input(z.object({ fileId: z.string() }))\n .mutation(({ ctx, input }) =>\n deleteFileGeneric(ctx.user!.id, input.fileId)\n ),\n});\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;IACzC,YAAY,EAAE,kBAAkB;SAC7B,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACvC,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAC3B,gBAAgB,CAAC,GAAG,CAAC,IAAK,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CAC7C;IAEH,IAAI,EAAE,kBAAkB;SACrB,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;KAC3B,CAAC,CACH;SACA,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAC3B,cAAc,CAAC,GAAG,CAAC,IAAK,CAAC,EAAE,EAAE;QAC3B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,cAAc,EAAE,KAAK,CAAC,cAAc;KACrC,CAAC,CACH;IAEH,MAAM,EAAE,kBAAkB;SACvB,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAC3B,CAAC,CACH;SACA,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAC3B,gBAAgB,CAAC,GAAG,CAAC,IAAK,CAAC,EAAE,EAAE;QAC7B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC,CACH;IAEH,MAAM,EAAE,kBAAkB;SACvB,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACvC,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAC3B,iBAAiB,CAAC,GAAG,CAAC,IAAK,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CAC9C;CACJ,CAAC,CAAC","debug_id":"978fd381-abcb-514c-84a7-291fb8f62f7a"}
|
|
1
|
+
{"version":3,"file":"file.js","sources":["routers/file.ts"],"sourceRoot":"/","sourcesContent":["import { z } from \"zod\";\nimport { TRPCError } from \"@trpc/server\";\nimport { createTRPCRouter, protectedProcedure } from \"../trpc.js\";\nimport { prisma } from \"../lib/prisma.js\";\nimport {\n deleteFileGeneric,\n getFileSignedUrl,\n moveFileScoped,\n renameFileScoped,\n} from \"../services/file.js\";\n\nconst upsertAnnotationSchema = z.object({\n fileId: z.string(),\n id: z.string().optional(),\n page: z.number().int().min(1),\n type: z.enum([\"HIGHLIGHT\", \"INK\", \"COMMENT\", \"TEXT\"]),\n geometry: z.record(z.string(), z.unknown()),\n text: z.string().optional(),\n color: z.string().optional(),\n});\n\n/** @throws NOT_FOUND unless the file exists and is owned by the user. */\nasync function requireOwnedFile(userId: string, fileId: string) {\n const file = await prisma.file.findFirst({\n where: { id: fileId, userId },\n select: { id: true },\n });\n\n if (!file) {\n throw new TRPCError({\n code: \"NOT_FOUND\",\n message: \"File not found or you don't own it\",\n });\n }\n}\n\n/**\n * File router. Backed by the same unified scope-aware permission model as the\n * folder router. The class files page and the cloud-storage page (personal /\n * institution) both run through the same endpoints.\n *\n * Permissions are derived from the file's parent folder scope, so callers\n * never need to send `classId` / `scope` — just the file id.\n */\nexport const fileRouter = createTRPCRouter({\n getSignedUrl: protectedProcedure\n .input(z.object({ fileId: z.string() }))\n .mutation(({ ctx, input }) =>\n getFileSignedUrl(ctx.user!.id, input.fileId)\n ),\n\n move: protectedProcedure\n .input(\n z.object({\n fileId: z.string(),\n targetFolderId: z.string(),\n })\n )\n .mutation(({ ctx, input }) =>\n moveFileScoped(ctx.user!.id, {\n fileId: input.fileId,\n targetFolderId: input.targetFolderId,\n })\n ),\n\n rename: protectedProcedure\n .input(\n z.object({\n fileId: z.string(),\n newName: z.string().min(1),\n })\n )\n .mutation(({ ctx, input }) =>\n renameFileScoped(ctx.user!.id, {\n fileId: input.fileId,\n newName: input.newName,\n })\n ),\n\n delete: protectedProcedure\n .input(z.object({ fileId: z.string() }))\n .mutation(({ ctx, input }) =>\n deleteFileGeneric(ctx.user!.id, input.fileId)\n ),\n\n // PDF annotations on files the user owns (personal cloud storage). The\n // submission review flow uses the annotation endpoints on the assignment\n // router instead; these are owner-only and carry no submission context.\n listAnnotations: protectedProcedure\n .input(z.object({ fileId: z.string() }))\n .query(async ({ ctx, input }) => {\n await requireOwnedFile(ctx.user!.id, input.fileId);\n\n const annotations = await prisma.fileAnnotation.findMany({\n where: { fileId: input.fileId, submissionId: null },\n orderBy: { createdAt: \"asc\" },\n include: {\n author: {\n select: {\n id: true,\n username: true,\n profile: { select: { displayName: true } },\n },\n },\n },\n });\n\n return { annotations };\n }),\n\n upsertAnnotation: protectedProcedure\n .input(upsertAnnotationSchema)\n .mutation(async ({ ctx, input }) => {\n const { fileId, id, page, type, geometry, text, color } = input;\n\n await requireOwnedFile(ctx.user!.id, fileId);\n\n if (id) {\n const existing = await prisma.fileAnnotation.findFirst({\n where: { id, fileId, submissionId: null, authorId: ctx.user!.id },\n select: { id: true },\n });\n\n if (!existing) {\n throw new TRPCError({\n code: \"NOT_FOUND\",\n message: \"Annotation not found\",\n });\n }\n\n const annotation = await prisma.fileAnnotation.update({\n where: { id },\n data: {\n page,\n type,\n geometry: geometry as object,\n text: text ?? null,\n color: color ?? null,\n },\n });\n\n return { annotation };\n }\n\n const annotation = await prisma.fileAnnotation.create({\n data: {\n fileId,\n authorId: ctx.user!.id,\n page,\n type,\n geometry: geometry as object,\n text: text ?? null,\n color: color ?? null,\n },\n });\n\n return { annotation };\n }),\n\n deleteAnnotation: protectedProcedure\n .input(z.object({ fileId: z.string(), id: z.string() }))\n .mutation(async ({ ctx, input }) => {\n await requireOwnedFile(ctx.user!.id, input.fileId);\n\n const annotation = await prisma.fileAnnotation.findFirst({\n where: {\n id: input.id,\n fileId: input.fileId,\n submissionId: null,\n authorId: ctx.user!.id,\n },\n select: { id: true },\n });\n\n if (!annotation) {\n throw new TRPCError({\n code: \"NOT_FOUND\",\n message: \"Annotation not found\",\n });\n }\n\n await prisma.fileAnnotation.delete({ where: { id: input.id } });\n\n return { success: true };\n }),\n});\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE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CAAC;IAEJ,gBAAgB,EAAE,kBAAkB;SACjC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACvD,QAAQ,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE;QACjC,MAAM,gBAAgB,CAAC,GAAG,CAAC,IAAK,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAEnD,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC;YACvD,KAAK,EAAE;gBACL,EAAE,EAAE,KAAK,CAAC,EAAE;gBACZ,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,GAAG,CAAC,IAAK,CAAC,EAAE;aACvB;YACD,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE;SACrB,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,SAAS,CAAC;gBAClB,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,sBAAsB;aAChC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAEhE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC,CAAC;CACL,CAAC,CAAC","debug_id":"e028d0f2-5361-5ae8-91b4-499cdb5c74ed"}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const gradebookRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
3
|
+
ctx: import("../trpc.js").Context;
|
|
4
|
+
meta: object;
|
|
5
|
+
errorShape: {
|
|
6
|
+
data: {
|
|
7
|
+
zodError: z.typeToFlattenedError<any, string> | null;
|
|
8
|
+
prismaError: import("../utils/prismaErrorHandler.js").PrismaErrorInfo | null;
|
|
9
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
10
|
+
httpStatus: number;
|
|
11
|
+
path?: string;
|
|
12
|
+
stack?: string;
|
|
13
|
+
};
|
|
14
|
+
message: string;
|
|
15
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
16
|
+
};
|
|
17
|
+
transformer: false;
|
|
18
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
19
|
+
listCategories: import("@trpc/server").TRPCQueryProcedure<{
|
|
20
|
+
input: {
|
|
21
|
+
[x: string]: unknown;
|
|
22
|
+
classId: string;
|
|
23
|
+
};
|
|
24
|
+
output: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
classId: string;
|
|
28
|
+
weight: number;
|
|
29
|
+
dropLowest: number;
|
|
30
|
+
position: number;
|
|
31
|
+
}[];
|
|
32
|
+
meta: object;
|
|
33
|
+
}>;
|
|
34
|
+
createCategory: import("@trpc/server").TRPCMutationProcedure<{
|
|
35
|
+
input: {
|
|
36
|
+
[x: string]: unknown;
|
|
37
|
+
classId: string;
|
|
38
|
+
name: string;
|
|
39
|
+
weight: number;
|
|
40
|
+
dropLowest?: number | undefined;
|
|
41
|
+
position?: number | undefined;
|
|
42
|
+
};
|
|
43
|
+
output: {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
classId: string;
|
|
47
|
+
weight: number;
|
|
48
|
+
dropLowest: number;
|
|
49
|
+
position: number;
|
|
50
|
+
};
|
|
51
|
+
meta: object;
|
|
52
|
+
}>;
|
|
53
|
+
updateCategory: import("@trpc/server").TRPCMutationProcedure<{
|
|
54
|
+
input: {
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
classId: string;
|
|
57
|
+
categoryId: string;
|
|
58
|
+
name?: string | undefined;
|
|
59
|
+
weight?: number | undefined;
|
|
60
|
+
dropLowest?: number | undefined;
|
|
61
|
+
position?: number | undefined;
|
|
62
|
+
};
|
|
63
|
+
output: {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
classId: string;
|
|
67
|
+
weight: number;
|
|
68
|
+
dropLowest: number;
|
|
69
|
+
position: number;
|
|
70
|
+
};
|
|
71
|
+
meta: object;
|
|
72
|
+
}>;
|
|
73
|
+
deleteCategory: import("@trpc/server").TRPCMutationProcedure<{
|
|
74
|
+
input: {
|
|
75
|
+
[x: string]: unknown;
|
|
76
|
+
classId: string;
|
|
77
|
+
categoryId: string;
|
|
78
|
+
};
|
|
79
|
+
output: {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
classId: string;
|
|
83
|
+
weight: number;
|
|
84
|
+
dropLowest: number;
|
|
85
|
+
position: number;
|
|
86
|
+
};
|
|
87
|
+
meta: object;
|
|
88
|
+
}>;
|
|
89
|
+
assignCategory: import("@trpc/server").TRPCMutationProcedure<{
|
|
90
|
+
input: {
|
|
91
|
+
[x: string]: unknown;
|
|
92
|
+
classId: string;
|
|
93
|
+
assignmentId: string;
|
|
94
|
+
gradeCategoryId: string | null;
|
|
95
|
+
};
|
|
96
|
+
output: {
|
|
97
|
+
type: import(".prisma/client").$Enums.AssignmentType;
|
|
98
|
+
id: string;
|
|
99
|
+
createdAt: Date | null;
|
|
100
|
+
classId: string;
|
|
101
|
+
title: string;
|
|
102
|
+
dueDate: Date;
|
|
103
|
+
maxGrade: number | null;
|
|
104
|
+
eventId: string | null;
|
|
105
|
+
instructions: string;
|
|
106
|
+
modifiedAt: Date | null;
|
|
107
|
+
teacherId: string;
|
|
108
|
+
acceptFiles: boolean;
|
|
109
|
+
acceptExtendedResponse: boolean;
|
|
110
|
+
acceptWorksheet: boolean;
|
|
111
|
+
gradeWithAI: boolean;
|
|
112
|
+
aiPolicyLevel: number;
|
|
113
|
+
sectionId: string | null;
|
|
114
|
+
graded: boolean;
|
|
115
|
+
weight: number;
|
|
116
|
+
inProgress: boolean;
|
|
117
|
+
template: boolean;
|
|
118
|
+
markSchemeId: string | null;
|
|
119
|
+
order: number | null;
|
|
120
|
+
gradingBoundaryId: string | null;
|
|
121
|
+
gradeCategoryId: string | null;
|
|
122
|
+
};
|
|
123
|
+
meta: object;
|
|
124
|
+
}>;
|
|
125
|
+
listColumns: import("@trpc/server").TRPCQueryProcedure<{
|
|
126
|
+
input: {
|
|
127
|
+
[x: string]: unknown;
|
|
128
|
+
classId: string;
|
|
129
|
+
};
|
|
130
|
+
output: ({
|
|
131
|
+
entries: {
|
|
132
|
+
id: string;
|
|
133
|
+
points: number;
|
|
134
|
+
studentId: string;
|
|
135
|
+
note: string | null;
|
|
136
|
+
}[];
|
|
137
|
+
} & {
|
|
138
|
+
id: string;
|
|
139
|
+
name: string;
|
|
140
|
+
classId: string;
|
|
141
|
+
gradeCategoryId: string | null;
|
|
142
|
+
position: number;
|
|
143
|
+
maxPoints: number;
|
|
144
|
+
})[];
|
|
145
|
+
meta: object;
|
|
146
|
+
}>;
|
|
147
|
+
createColumn: import("@trpc/server").TRPCMutationProcedure<{
|
|
148
|
+
input: {
|
|
149
|
+
[x: string]: unknown;
|
|
150
|
+
classId: string;
|
|
151
|
+
name: string;
|
|
152
|
+
maxPoints: number;
|
|
153
|
+
gradeCategoryId?: string | null | undefined;
|
|
154
|
+
position?: number | undefined;
|
|
155
|
+
};
|
|
156
|
+
output: {
|
|
157
|
+
id: string;
|
|
158
|
+
name: string;
|
|
159
|
+
classId: string;
|
|
160
|
+
gradeCategoryId: string | null;
|
|
161
|
+
position: number;
|
|
162
|
+
maxPoints: number;
|
|
163
|
+
};
|
|
164
|
+
meta: object;
|
|
165
|
+
}>;
|
|
166
|
+
updateColumn: import("@trpc/server").TRPCMutationProcedure<{
|
|
167
|
+
input: {
|
|
168
|
+
[x: string]: unknown;
|
|
169
|
+
classId: string;
|
|
170
|
+
columnId: string;
|
|
171
|
+
name?: string | undefined;
|
|
172
|
+
gradeCategoryId?: string | null | undefined;
|
|
173
|
+
position?: number | undefined;
|
|
174
|
+
maxPoints?: number | undefined;
|
|
175
|
+
};
|
|
176
|
+
output: {
|
|
177
|
+
id: string;
|
|
178
|
+
name: string;
|
|
179
|
+
classId: string;
|
|
180
|
+
gradeCategoryId: string | null;
|
|
181
|
+
position: number;
|
|
182
|
+
maxPoints: number;
|
|
183
|
+
};
|
|
184
|
+
meta: object;
|
|
185
|
+
}>;
|
|
186
|
+
deleteColumn: import("@trpc/server").TRPCMutationProcedure<{
|
|
187
|
+
input: {
|
|
188
|
+
[x: string]: unknown;
|
|
189
|
+
classId: string;
|
|
190
|
+
columnId: string;
|
|
191
|
+
};
|
|
192
|
+
output: {
|
|
193
|
+
id: string;
|
|
194
|
+
name: string;
|
|
195
|
+
classId: string;
|
|
196
|
+
gradeCategoryId: string | null;
|
|
197
|
+
position: number;
|
|
198
|
+
maxPoints: number;
|
|
199
|
+
};
|
|
200
|
+
meta: object;
|
|
201
|
+
}>;
|
|
202
|
+
setEntry: import("@trpc/server").TRPCMutationProcedure<{
|
|
203
|
+
input: {
|
|
204
|
+
[x: string]: unknown;
|
|
205
|
+
classId: string;
|
|
206
|
+
points: number | null;
|
|
207
|
+
studentId: string;
|
|
208
|
+
columnId: string;
|
|
209
|
+
note?: string | null | undefined;
|
|
210
|
+
};
|
|
211
|
+
output: {
|
|
212
|
+
id: string;
|
|
213
|
+
points: number;
|
|
214
|
+
studentId: string;
|
|
215
|
+
columnId: string;
|
|
216
|
+
note: string | null;
|
|
217
|
+
} | null;
|
|
218
|
+
meta: object;
|
|
219
|
+
}>;
|
|
220
|
+
getPolicies: import("@trpc/server").TRPCQueryProcedure<{
|
|
221
|
+
input: {
|
|
222
|
+
[x: string]: unknown;
|
|
223
|
+
classId: string;
|
|
224
|
+
};
|
|
225
|
+
output: {
|
|
226
|
+
id: string;
|
|
227
|
+
treatMissingAsZero: boolean;
|
|
228
|
+
gradeRoundingMode: import(".prisma/client").$Enums.GradeRoundingMode;
|
|
229
|
+
};
|
|
230
|
+
meta: object;
|
|
231
|
+
}>;
|
|
232
|
+
updatePolicies: import("@trpc/server").TRPCMutationProcedure<{
|
|
233
|
+
input: {
|
|
234
|
+
[x: string]: unknown;
|
|
235
|
+
classId: string;
|
|
236
|
+
treatMissingAsZero?: boolean | undefined;
|
|
237
|
+
gradeRoundingMode?: "NONE" | "HALF_UP" | "FLOOR" | "CEILING" | undefined;
|
|
238
|
+
};
|
|
239
|
+
output: {
|
|
240
|
+
id: string;
|
|
241
|
+
treatMissingAsZero: boolean;
|
|
242
|
+
gradeRoundingMode: import(".prisma/client").$Enums.GradeRoundingMode;
|
|
243
|
+
};
|
|
244
|
+
meta: object;
|
|
245
|
+
}>;
|
|
246
|
+
getComputed: import("@trpc/server").TRPCQueryProcedure<{
|
|
247
|
+
input: {
|
|
248
|
+
[x: string]: unknown;
|
|
249
|
+
classId: string;
|
|
250
|
+
};
|
|
251
|
+
output: {
|
|
252
|
+
policies: {
|
|
253
|
+
treatMissingAsZero: boolean;
|
|
254
|
+
roundingMode: import(".prisma/client").$Enums.GradeRoundingMode;
|
|
255
|
+
};
|
|
256
|
+
categories: {
|
|
257
|
+
id: string;
|
|
258
|
+
name: string;
|
|
259
|
+
classId: string;
|
|
260
|
+
weight: number;
|
|
261
|
+
dropLowest: number;
|
|
262
|
+
position: number;
|
|
263
|
+
}[];
|
|
264
|
+
assignments: {
|
|
265
|
+
id: string;
|
|
266
|
+
title: string;
|
|
267
|
+
maxGrade: number | null;
|
|
268
|
+
weight: number;
|
|
269
|
+
gradeCategoryId: string | null;
|
|
270
|
+
dueDate: Date;
|
|
271
|
+
}[];
|
|
272
|
+
customColumns: {
|
|
273
|
+
id: string;
|
|
274
|
+
name: string;
|
|
275
|
+
maxPoints: number;
|
|
276
|
+
gradeCategoryId: string | null;
|
|
277
|
+
position: number;
|
|
278
|
+
}[];
|
|
279
|
+
gradingBoundary: {
|
|
280
|
+
id: string;
|
|
281
|
+
name: string | null;
|
|
282
|
+
structured: string;
|
|
283
|
+
};
|
|
284
|
+
students: import("../services/gradebook.js").GradebookStudentRow[];
|
|
285
|
+
};
|
|
286
|
+
meta: object;
|
|
287
|
+
}>;
|
|
288
|
+
exportCsv: import("@trpc/server").TRPCQueryProcedure<{
|
|
289
|
+
input: {
|
|
290
|
+
[x: string]: unknown;
|
|
291
|
+
classId: string;
|
|
292
|
+
};
|
|
293
|
+
output: {
|
|
294
|
+
csv: string;
|
|
295
|
+
};
|
|
296
|
+
meta: object;
|
|
297
|
+
}>;
|
|
298
|
+
}>>;
|
|
299
|
+
//# sourceMappingURL=gradebook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradebook.d.ts","sourceRoot":"/","sources":["routers/gradebook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmJ1B,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1aba4cc8-a760-5947-a7d7-a46980e5d291")}catch(e){}}();
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { createTRPCRouter, protectedTeacherProcedure, protectedClassMemberProcedure, } from "../trpc.js";
|
|
5
|
+
import { listGradeCategories, createGradeCategory, updateGradeCategory, deleteGradeCategory, assignAssignmentCategory, listCustomGradeColumns, createCustomGradeColumn, updateCustomGradeColumn, deleteCustomGradeColumn, setCustomGradeEntry, getGradePolicies, updateGradePolicies, getComputedGradebook, exportGradebookCsv, } from "../services/gradebook.js";
|
|
6
|
+
const roundingModeSchema = z.enum(["NONE", "HALF_UP", "FLOOR", "CEILING"]);
|
|
7
|
+
export const gradebookRouter = createTRPCRouter({
|
|
8
|
+
listCategories: protectedClassMemberProcedure
|
|
9
|
+
.input(z.object({ classId: z.string() }))
|
|
10
|
+
.query(({ input }) => listGradeCategories(input.classId)),
|
|
11
|
+
createCategory: protectedTeacherProcedure
|
|
12
|
+
.input(z.object({
|
|
13
|
+
classId: z.string(),
|
|
14
|
+
name: z.string().min(1),
|
|
15
|
+
weight: z.number().min(0),
|
|
16
|
+
dropLowest: z.number().int().min(0).optional(),
|
|
17
|
+
position: z.number().int().min(0).optional(),
|
|
18
|
+
}))
|
|
19
|
+
.mutation(({ input }) => {
|
|
20
|
+
const { classId, ...data } = input;
|
|
21
|
+
return createGradeCategory(classId, data);
|
|
22
|
+
}),
|
|
23
|
+
updateCategory: protectedTeacherProcedure
|
|
24
|
+
.input(z.object({
|
|
25
|
+
classId: z.string(),
|
|
26
|
+
categoryId: z.string(),
|
|
27
|
+
name: z.string().min(1).optional(),
|
|
28
|
+
weight: z.number().min(0).optional(),
|
|
29
|
+
dropLowest: z.number().int().min(0).optional(),
|
|
30
|
+
position: z.number().int().min(0).optional(),
|
|
31
|
+
}))
|
|
32
|
+
.mutation(({ input }) => {
|
|
33
|
+
const { classId, categoryId, ...data } = input;
|
|
34
|
+
return updateGradeCategory(categoryId, classId, data);
|
|
35
|
+
}),
|
|
36
|
+
deleteCategory: protectedTeacherProcedure
|
|
37
|
+
.input(z.object({ classId: z.string(), categoryId: z.string() }))
|
|
38
|
+
.mutation(({ input }) => deleteGradeCategory(input.categoryId, input.classId)),
|
|
39
|
+
assignCategory: protectedTeacherProcedure
|
|
40
|
+
.input(z.object({
|
|
41
|
+
classId: z.string(),
|
|
42
|
+
assignmentId: z.string(),
|
|
43
|
+
gradeCategoryId: z.string().nullable(),
|
|
44
|
+
}))
|
|
45
|
+
.mutation(({ input }) => assignAssignmentCategory(input.classId, input.assignmentId, input.gradeCategoryId)),
|
|
46
|
+
listColumns: protectedClassMemberProcedure
|
|
47
|
+
.input(z.object({ classId: z.string() }))
|
|
48
|
+
.query(({ input }) => listCustomGradeColumns(input.classId)),
|
|
49
|
+
createColumn: protectedTeacherProcedure
|
|
50
|
+
.input(z.object({
|
|
51
|
+
classId: z.string(),
|
|
52
|
+
name: z.string().min(1),
|
|
53
|
+
maxPoints: z.number().positive(),
|
|
54
|
+
gradeCategoryId: z.string().nullable().optional(),
|
|
55
|
+
position: z.number().int().min(0).optional(),
|
|
56
|
+
}))
|
|
57
|
+
.mutation(({ input }) => {
|
|
58
|
+
const { classId, ...data } = input;
|
|
59
|
+
return createCustomGradeColumn(classId, data);
|
|
60
|
+
}),
|
|
61
|
+
updateColumn: protectedTeacherProcedure
|
|
62
|
+
.input(z.object({
|
|
63
|
+
classId: z.string(),
|
|
64
|
+
columnId: z.string(),
|
|
65
|
+
name: z.string().min(1).optional(),
|
|
66
|
+
maxPoints: z.number().positive().optional(),
|
|
67
|
+
gradeCategoryId: z.string().nullable().optional(),
|
|
68
|
+
position: z.number().int().min(0).optional(),
|
|
69
|
+
}))
|
|
70
|
+
.mutation(({ input }) => {
|
|
71
|
+
const { classId, columnId, ...data } = input;
|
|
72
|
+
return updateCustomGradeColumn(columnId, classId, data);
|
|
73
|
+
}),
|
|
74
|
+
deleteColumn: protectedTeacherProcedure
|
|
75
|
+
.input(z.object({ classId: z.string(), columnId: z.string() }))
|
|
76
|
+
.mutation(({ input }) => deleteCustomGradeColumn(input.columnId, input.classId)),
|
|
77
|
+
setEntry: protectedTeacherProcedure
|
|
78
|
+
.input(z.object({
|
|
79
|
+
classId: z.string(),
|
|
80
|
+
columnId: z.string(),
|
|
81
|
+
studentId: z.string(),
|
|
82
|
+
points: z.number().min(0).nullable(),
|
|
83
|
+
note: z.string().nullable().optional(),
|
|
84
|
+
}))
|
|
85
|
+
.mutation(({ input }) => setCustomGradeEntry(input.classId, input.columnId, input.studentId, input.points, input.note)),
|
|
86
|
+
getPolicies: protectedClassMemberProcedure
|
|
87
|
+
.input(z.object({ classId: z.string() }))
|
|
88
|
+
.query(({ input }) => getGradePolicies(input.classId)),
|
|
89
|
+
updatePolicies: protectedTeacherProcedure
|
|
90
|
+
.input(z.object({
|
|
91
|
+
classId: z.string(),
|
|
92
|
+
treatMissingAsZero: z.boolean().optional(),
|
|
93
|
+
gradeRoundingMode: roundingModeSchema.optional(),
|
|
94
|
+
}))
|
|
95
|
+
.mutation(({ input }) => {
|
|
96
|
+
const { classId, ...data } = input;
|
|
97
|
+
return updateGradePolicies(classId, data);
|
|
98
|
+
}),
|
|
99
|
+
getComputed: protectedClassMemberProcedure
|
|
100
|
+
.input(z.object({ classId: z.string() }))
|
|
101
|
+
.query(({ ctx, input }) => getComputedGradebook(input.classId, ctx.user?.id ?? "")),
|
|
102
|
+
exportCsv: protectedTeacherProcedure
|
|
103
|
+
.input(z.object({ classId: z.string() }))
|
|
104
|
+
.query(({ ctx, input }) => exportGradebookCsv(input.classId, ctx.user?.id ?? "")),
|
|
105
|
+
});
|
|
106
|
+
//# sourceMappingURL=gradebook.js.map
|
|
107
|
+
//# debugId=1aba4cc8-a760-5947-a7d7-a46980e5d291
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradebook.js","sources":["routers/gradebook.ts"],"sourceRoot":"/","sourcesContent":["import { z } from \"zod\";\nimport {\n createTRPCRouter,\n protectedTeacherProcedure,\n protectedClassMemberProcedure,\n} from \"../trpc.js\";\nimport {\n listGradeCategories,\n createGradeCategory,\n updateGradeCategory,\n deleteGradeCategory,\n assignAssignmentCategory,\n listCustomGradeColumns,\n createCustomGradeColumn,\n updateCustomGradeColumn,\n deleteCustomGradeColumn,\n setCustomGradeEntry,\n getGradePolicies,\n updateGradePolicies,\n getComputedGradebook,\n exportGradebookCsv,\n} from \"../services/gradebook.js\";\n\nconst roundingModeSchema = z.enum([\"NONE\", \"HALF_UP\", \"FLOOR\", \"CEILING\"]);\n\nexport const gradebookRouter = createTRPCRouter({\n listCategories: protectedClassMemberProcedure\n .input(z.object({ classId: z.string() }))\n .query(({ input }) => listGradeCategories(input.classId)),\n\n createCategory: protectedTeacherProcedure\n .input(\n z.object({\n classId: z.string(),\n name: z.string().min(1),\n weight: z.number().min(0),\n dropLowest: z.number().int().min(0).optional(),\n position: z.number().int().min(0).optional(),\n })\n )\n .mutation(({ input }) => {\n const { classId, ...data } = input;\n return createGradeCategory(classId, data);\n }),\n\n updateCategory: protectedTeacherProcedure\n .input(\n z.object({\n classId: z.string(),\n categoryId: z.string(),\n name: z.string().min(1).optional(),\n weight: z.number().min(0).optional(),\n dropLowest: z.number().int().min(0).optional(),\n position: z.number().int().min(0).optional(),\n })\n )\n .mutation(({ input }) => {\n const { classId, categoryId, ...data } = input;\n return updateGradeCategory(categoryId, classId, data);\n }),\n\n deleteCategory: protectedTeacherProcedure\n .input(z.object({ classId: z.string(), categoryId: z.string() }))\n .mutation(({ input }) =>\n deleteGradeCategory(input.categoryId, input.classId)\n ),\n\n assignCategory: protectedTeacherProcedure\n .input(\n z.object({\n classId: z.string(),\n assignmentId: z.string(),\n gradeCategoryId: z.string().nullable(),\n })\n )\n .mutation(({ input }) =>\n assignAssignmentCategory(\n input.classId,\n input.assignmentId,\n input.gradeCategoryId\n )\n ),\n\n listColumns: protectedClassMemberProcedure\n .input(z.object({ classId: z.string() }))\n .query(({ input }) => listCustomGradeColumns(input.classId)),\n\n createColumn: protectedTeacherProcedure\n .input(\n z.object({\n classId: z.string(),\n name: z.string().min(1),\n maxPoints: z.number().positive(),\n gradeCategoryId: z.string().nullable().optional(),\n position: z.number().int().min(0).optional(),\n })\n )\n .mutation(({ input }) => {\n const { classId, ...data } = input;\n return createCustomGradeColumn(classId, data);\n }),\n\n updateColumn: protectedTeacherProcedure\n .input(\n z.object({\n classId: z.string(),\n columnId: z.string(),\n name: z.string().min(1).optional(),\n maxPoints: z.number().positive().optional(),\n gradeCategoryId: z.string().nullable().optional(),\n position: z.number().int().min(0).optional(),\n })\n )\n .mutation(({ input }) => {\n const { classId, columnId, ...data } = input;\n return updateCustomGradeColumn(columnId, classId, data);\n }),\n\n deleteColumn: protectedTeacherProcedure\n .input(z.object({ classId: z.string(), columnId: z.string() }))\n .mutation(({ input }) =>\n deleteCustomGradeColumn(input.columnId, input.classId)\n ),\n\n setEntry: protectedTeacherProcedure\n .input(\n z.object({\n classId: z.string(),\n columnId: z.string(),\n studentId: z.string(),\n points: z.number().min(0).nullable(),\n note: z.string().nullable().optional(),\n })\n )\n .mutation(({ input }) =>\n setCustomGradeEntry(\n input.classId,\n input.columnId,\n input.studentId,\n input.points,\n input.note\n )\n ),\n\n getPolicies: protectedClassMemberProcedure\n .input(z.object({ classId: z.string() }))\n .query(({ input }) => getGradePolicies(input.classId)),\n\n updatePolicies: protectedTeacherProcedure\n .input(\n z.object({\n classId: z.string(),\n treatMissingAsZero: z.boolean().optional(),\n gradeRoundingMode: roundingModeSchema.optional(),\n })\n )\n .mutation(({ input }) => {\n const { classId, ...data } = input;\n return updateGradePolicies(classId, data);\n }),\n\n getComputed: protectedClassMemberProcedure\n .input(z.object({ classId: z.string() }))\n .query(({ ctx, input }) =>\n getComputedGradebook(input.classId, ctx.user?.id ?? \"\")\n ),\n\n exportCsv: protectedTeacherProcedure\n .input(z.object({ classId: z.string() }))\n .query(({ ctx, input }) =>\n exportGradebookCsv(input.classId, ctx.user?.id ?? \"\")\n ),\n});\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,CAAC,EAAE,MA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C,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACxC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CACxB,oBAAoB,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CACxD;IAEH,SAAS,EAAE,yBAAyB;SACjC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACxC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CACxB,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CACtD;CACJ,CAAC,CAAC","debug_id":"1aba4cc8-a760-5947-a7d7-a46980e5d291"}
|
package/dist/routers/school.d.ts
CHANGED
|
@@ -427,6 +427,8 @@ export declare const schoolRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
427
427
|
discussionsEnabled: boolean;
|
|
428
428
|
studentsCanCreateDiscussions: boolean;
|
|
429
429
|
studentsCanReply: boolean;
|
|
430
|
+
treatMissingAsZero: boolean;
|
|
431
|
+
gradeRoundingMode: import(".prisma/client").$Enums.GradeRoundingMode;
|
|
430
432
|
})[];
|
|
431
433
|
};
|
|
432
434
|
meta: object;
|
|
@@ -478,6 +480,8 @@ export declare const schoolRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
478
480
|
discussionsEnabled: boolean;
|
|
479
481
|
studentsCanCreateDiscussions: boolean;
|
|
480
482
|
studentsCanReply: boolean;
|
|
483
|
+
treatMissingAsZero: boolean;
|
|
484
|
+
gradeRoundingMode: import(".prisma/client").$Enums.GradeRoundingMode;
|
|
481
485
|
};
|
|
482
486
|
};
|
|
483
487
|
meta: object;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"school.d.ts","sourceRoot":"/","sources":["routers/school.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqCxB,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"school.d.ts","sourceRoot":"/","sources":["routers/school.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqCxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqMvB,CAAC"}
|
|
@@ -46,8 +46,8 @@ export declare const sectionRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
46
46
|
input: {
|
|
47
47
|
[x: string]: unknown;
|
|
48
48
|
classId: string;
|
|
49
|
-
movedId: string;
|
|
50
49
|
position: "end" | "start" | "before" | "after";
|
|
50
|
+
movedId: string;
|
|
51
51
|
targetId?: string | undefined;
|
|
52
52
|
};
|
|
53
53
|
output: {
|
|
@@ -34,6 +34,8 @@ export declare const worksheetRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
34
34
|
discussionsEnabled: boolean;
|
|
35
35
|
studentsCanCreateDiscussions: boolean;
|
|
36
36
|
studentsCanReply: boolean;
|
|
37
|
+
treatMissingAsZero: boolean;
|
|
38
|
+
gradeRoundingMode: import(".prisma/client").$Enums.GradeRoundingMode;
|
|
37
39
|
} | null;
|
|
38
40
|
tags: {
|
|
39
41
|
id: string;
|
|
@@ -270,8 +272,8 @@ export declare const worksheetRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
270
272
|
reorderQuestions: import("@trpc/server").TRPCMutationProcedure<{
|
|
271
273
|
input: {
|
|
272
274
|
worksheetId: string;
|
|
273
|
-
movedId: string;
|
|
274
275
|
position: "before" | "after";
|
|
276
|
+
movedId: string;
|
|
275
277
|
targetId: string;
|
|
276
278
|
};
|
|
277
279
|
output: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet.d.ts","sourceRoot":"/","sources":["routers/worksheet.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0DxB,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"worksheet.d.ts","sourceRoot":"/","sources":["routers/worksheet.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0DxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8Z1B,CAAC"}
|