@studious-lms/server 1.1.2 → 1.1.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.
- package/dist/routers/_app.d.ts +160 -0
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/assignment.d.ts +79 -0
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/assignment.js +39 -1
- package/dist/routers/folder.d.ts +1 -0
- package/dist/routers/folder.d.ts.map +1 -1
- package/dist/routers/folder.js +1 -0
- package/package.json +1 -1
- package/src/routers/assignment.ts +43 -1
- package/src/routers/folder.ts +1 -0
package/dist/routers/_app.d.ts
CHANGED
|
@@ -1597,6 +1597,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1597
1597
|
classId: string;
|
|
1598
1598
|
assignmentId: string;
|
|
1599
1599
|
submissionId: string;
|
|
1600
|
+
feedback?: string | undefined;
|
|
1600
1601
|
gradeReceived?: number | null | undefined;
|
|
1601
1602
|
existingFileIds?: string[] | undefined;
|
|
1602
1603
|
removedAttachments?: string[] | undefined;
|
|
@@ -2061,6 +2062,84 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2061
2062
|
};
|
|
2062
2063
|
meta: object;
|
|
2063
2064
|
}>;
|
|
2065
|
+
detachGradingBoundary: import("@trpc/server").TRPCMutationProcedure<{
|
|
2066
|
+
input: {
|
|
2067
|
+
[x: string]: unknown;
|
|
2068
|
+
classId: string;
|
|
2069
|
+
assignmentId: string;
|
|
2070
|
+
};
|
|
2071
|
+
output: {
|
|
2072
|
+
section: {
|
|
2073
|
+
id: string;
|
|
2074
|
+
name: string;
|
|
2075
|
+
color: string | null;
|
|
2076
|
+
classId: string;
|
|
2077
|
+
order: number | null;
|
|
2078
|
+
} | null;
|
|
2079
|
+
teacher: {
|
|
2080
|
+
id: string;
|
|
2081
|
+
username: string;
|
|
2082
|
+
email: string;
|
|
2083
|
+
password: string;
|
|
2084
|
+
verified: boolean;
|
|
2085
|
+
role: import(".prisma/client").$Enums.UserRole;
|
|
2086
|
+
profileId: string | null;
|
|
2087
|
+
schoolId: string | null;
|
|
2088
|
+
};
|
|
2089
|
+
attachments: {
|
|
2090
|
+
path: string;
|
|
2091
|
+
type: string;
|
|
2092
|
+
id: string;
|
|
2093
|
+
name: string;
|
|
2094
|
+
size: number | null;
|
|
2095
|
+
uploadedAt: Date | null;
|
|
2096
|
+
assignmentId: string | null;
|
|
2097
|
+
submissionId: string | null;
|
|
2098
|
+
userId: string | null;
|
|
2099
|
+
thumbnailId: string | null;
|
|
2100
|
+
annotationId: string | null;
|
|
2101
|
+
classDraftId: string | null;
|
|
2102
|
+
folderId: string | null;
|
|
2103
|
+
}[];
|
|
2104
|
+
eventAttached: {
|
|
2105
|
+
id: string;
|
|
2106
|
+
name: string | null;
|
|
2107
|
+
color: string | null;
|
|
2108
|
+
location: string | null;
|
|
2109
|
+
startTime: Date;
|
|
2110
|
+
endTime: Date;
|
|
2111
|
+
remarks: string | null;
|
|
2112
|
+
classId: string | null;
|
|
2113
|
+
userId: string | null;
|
|
2114
|
+
} | null;
|
|
2115
|
+
gradingBoundary: {
|
|
2116
|
+
id: string;
|
|
2117
|
+
classId: string;
|
|
2118
|
+
structured: string;
|
|
2119
|
+
} | null;
|
|
2120
|
+
} & {
|
|
2121
|
+
type: import(".prisma/client").$Enums.AssignmentType;
|
|
2122
|
+
id: string;
|
|
2123
|
+
title: string;
|
|
2124
|
+
dueDate: Date;
|
|
2125
|
+
maxGrade: number | null;
|
|
2126
|
+
classId: string;
|
|
2127
|
+
eventId: string | null;
|
|
2128
|
+
markSchemeId: string | null;
|
|
2129
|
+
gradingBoundaryId: string | null;
|
|
2130
|
+
instructions: string;
|
|
2131
|
+
weight: number;
|
|
2132
|
+
graded: boolean;
|
|
2133
|
+
sectionId: string | null;
|
|
2134
|
+
template: boolean;
|
|
2135
|
+
createdAt: Date | null;
|
|
2136
|
+
modifiedAt: Date | null;
|
|
2137
|
+
teacherId: string;
|
|
2138
|
+
inProgress: boolean;
|
|
2139
|
+
order: number | null;
|
|
2140
|
+
};
|
|
2141
|
+
meta: object;
|
|
2142
|
+
}>;
|
|
2064
2143
|
}>>;
|
|
2065
2144
|
user: import("@trpc/server").TRPCBuiltRouter<{
|
|
2066
2145
|
ctx: import("../trpc.js").Context;
|
|
@@ -2884,6 +2963,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2884
2963
|
childFolders: number;
|
|
2885
2964
|
};
|
|
2886
2965
|
name: string;
|
|
2966
|
+
color: string | null;
|
|
2887
2967
|
}[];
|
|
2888
2968
|
parentFolder: {
|
|
2889
2969
|
id: string;
|
|
@@ -4813,6 +4893,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
4813
4893
|
classId: string;
|
|
4814
4894
|
assignmentId: string;
|
|
4815
4895
|
submissionId: string;
|
|
4896
|
+
feedback?: string | undefined;
|
|
4816
4897
|
gradeReceived?: number | null | undefined;
|
|
4817
4898
|
existingFileIds?: string[] | undefined;
|
|
4818
4899
|
removedAttachments?: string[] | undefined;
|
|
@@ -5277,6 +5358,84 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
5277
5358
|
};
|
|
5278
5359
|
meta: object;
|
|
5279
5360
|
}>;
|
|
5361
|
+
detachGradingBoundary: import("@trpc/server").TRPCMutationProcedure<{
|
|
5362
|
+
input: {
|
|
5363
|
+
[x: string]: unknown;
|
|
5364
|
+
classId: string;
|
|
5365
|
+
assignmentId: string;
|
|
5366
|
+
};
|
|
5367
|
+
output: {
|
|
5368
|
+
section: {
|
|
5369
|
+
id: string;
|
|
5370
|
+
name: string;
|
|
5371
|
+
color: string | null;
|
|
5372
|
+
classId: string;
|
|
5373
|
+
order: number | null;
|
|
5374
|
+
} | null;
|
|
5375
|
+
teacher: {
|
|
5376
|
+
id: string;
|
|
5377
|
+
username: string;
|
|
5378
|
+
email: string;
|
|
5379
|
+
password: string;
|
|
5380
|
+
verified: boolean;
|
|
5381
|
+
role: import(".prisma/client").$Enums.UserRole;
|
|
5382
|
+
profileId: string | null;
|
|
5383
|
+
schoolId: string | null;
|
|
5384
|
+
};
|
|
5385
|
+
attachments: {
|
|
5386
|
+
path: string;
|
|
5387
|
+
type: string;
|
|
5388
|
+
id: string;
|
|
5389
|
+
name: string;
|
|
5390
|
+
size: number | null;
|
|
5391
|
+
uploadedAt: Date | null;
|
|
5392
|
+
assignmentId: string | null;
|
|
5393
|
+
submissionId: string | null;
|
|
5394
|
+
userId: string | null;
|
|
5395
|
+
thumbnailId: string | null;
|
|
5396
|
+
annotationId: string | null;
|
|
5397
|
+
classDraftId: string | null;
|
|
5398
|
+
folderId: string | null;
|
|
5399
|
+
}[];
|
|
5400
|
+
eventAttached: {
|
|
5401
|
+
id: string;
|
|
5402
|
+
name: string | null;
|
|
5403
|
+
color: string | null;
|
|
5404
|
+
location: string | null;
|
|
5405
|
+
startTime: Date;
|
|
5406
|
+
endTime: Date;
|
|
5407
|
+
remarks: string | null;
|
|
5408
|
+
classId: string | null;
|
|
5409
|
+
userId: string | null;
|
|
5410
|
+
} | null;
|
|
5411
|
+
gradingBoundary: {
|
|
5412
|
+
id: string;
|
|
5413
|
+
classId: string;
|
|
5414
|
+
structured: string;
|
|
5415
|
+
} | null;
|
|
5416
|
+
} & {
|
|
5417
|
+
type: import(".prisma/client").$Enums.AssignmentType;
|
|
5418
|
+
id: string;
|
|
5419
|
+
title: string;
|
|
5420
|
+
dueDate: Date;
|
|
5421
|
+
maxGrade: number | null;
|
|
5422
|
+
classId: string;
|
|
5423
|
+
eventId: string | null;
|
|
5424
|
+
markSchemeId: string | null;
|
|
5425
|
+
gradingBoundaryId: string | null;
|
|
5426
|
+
instructions: string;
|
|
5427
|
+
weight: number;
|
|
5428
|
+
graded: boolean;
|
|
5429
|
+
sectionId: string | null;
|
|
5430
|
+
template: boolean;
|
|
5431
|
+
createdAt: Date | null;
|
|
5432
|
+
modifiedAt: Date | null;
|
|
5433
|
+
teacherId: string;
|
|
5434
|
+
inProgress: boolean;
|
|
5435
|
+
order: number | null;
|
|
5436
|
+
};
|
|
5437
|
+
meta: object;
|
|
5438
|
+
}>;
|
|
5280
5439
|
}>>;
|
|
5281
5440
|
user: import("@trpc/server").TRPCBuiltRouter<{
|
|
5282
5441
|
ctx: import("../trpc.js").Context;
|
|
@@ -6100,6 +6259,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
6100
6259
|
childFolders: number;
|
|
6101
6260
|
};
|
|
6102
6261
|
name: string;
|
|
6262
|
+
color: string | null;
|
|
6103
6263
|
}[];
|
|
6104
6264
|
parentFolder: {
|
|
6105
6265
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_app.d.ts","sourceRoot":"","sources":["../../src/routers/_app.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAU1E,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"_app.d.ts","sourceRoot":"","sources":["../../src/routers/_app.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAU1E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiC,CAAC"}
|
|
@@ -771,6 +771,7 @@ export declare const assignmentRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
771
771
|
classId: string;
|
|
772
772
|
assignmentId: string;
|
|
773
773
|
submissionId: string;
|
|
774
|
+
feedback?: string | undefined;
|
|
774
775
|
gradeReceived?: number | null | undefined;
|
|
775
776
|
existingFileIds?: string[] | undefined;
|
|
776
777
|
removedAttachments?: string[] | undefined;
|
|
@@ -1235,5 +1236,83 @@ export declare const assignmentRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1235
1236
|
};
|
|
1236
1237
|
meta: object;
|
|
1237
1238
|
}>;
|
|
1239
|
+
detachGradingBoundary: import("@trpc/server").TRPCMutationProcedure<{
|
|
1240
|
+
input: {
|
|
1241
|
+
[x: string]: unknown;
|
|
1242
|
+
classId: string;
|
|
1243
|
+
assignmentId: string;
|
|
1244
|
+
};
|
|
1245
|
+
output: {
|
|
1246
|
+
section: {
|
|
1247
|
+
id: string;
|
|
1248
|
+
name: string;
|
|
1249
|
+
color: string | null;
|
|
1250
|
+
classId: string;
|
|
1251
|
+
order: number | null;
|
|
1252
|
+
} | null;
|
|
1253
|
+
teacher: {
|
|
1254
|
+
id: string;
|
|
1255
|
+
username: string;
|
|
1256
|
+
email: string;
|
|
1257
|
+
password: string;
|
|
1258
|
+
verified: boolean;
|
|
1259
|
+
role: import(".prisma/client").$Enums.UserRole;
|
|
1260
|
+
profileId: string | null;
|
|
1261
|
+
schoolId: string | null;
|
|
1262
|
+
};
|
|
1263
|
+
attachments: {
|
|
1264
|
+
path: string;
|
|
1265
|
+
type: string;
|
|
1266
|
+
id: string;
|
|
1267
|
+
name: string;
|
|
1268
|
+
size: number | null;
|
|
1269
|
+
uploadedAt: Date | null;
|
|
1270
|
+
assignmentId: string | null;
|
|
1271
|
+
submissionId: string | null;
|
|
1272
|
+
userId: string | null;
|
|
1273
|
+
thumbnailId: string | null;
|
|
1274
|
+
annotationId: string | null;
|
|
1275
|
+
classDraftId: string | null;
|
|
1276
|
+
folderId: string | null;
|
|
1277
|
+
}[];
|
|
1278
|
+
eventAttached: {
|
|
1279
|
+
id: string;
|
|
1280
|
+
name: string | null;
|
|
1281
|
+
color: string | null;
|
|
1282
|
+
location: string | null;
|
|
1283
|
+
startTime: Date;
|
|
1284
|
+
endTime: Date;
|
|
1285
|
+
remarks: string | null;
|
|
1286
|
+
classId: string | null;
|
|
1287
|
+
userId: string | null;
|
|
1288
|
+
} | null;
|
|
1289
|
+
gradingBoundary: {
|
|
1290
|
+
id: string;
|
|
1291
|
+
classId: string;
|
|
1292
|
+
structured: string;
|
|
1293
|
+
} | null;
|
|
1294
|
+
} & {
|
|
1295
|
+
type: import(".prisma/client").$Enums.AssignmentType;
|
|
1296
|
+
id: string;
|
|
1297
|
+
title: string;
|
|
1298
|
+
dueDate: Date;
|
|
1299
|
+
maxGrade: number | null;
|
|
1300
|
+
classId: string;
|
|
1301
|
+
eventId: string | null;
|
|
1302
|
+
markSchemeId: string | null;
|
|
1303
|
+
gradingBoundaryId: string | null;
|
|
1304
|
+
instructions: string;
|
|
1305
|
+
weight: number;
|
|
1306
|
+
graded: boolean;
|
|
1307
|
+
sectionId: string | null;
|
|
1308
|
+
template: boolean;
|
|
1309
|
+
createdAt: Date | null;
|
|
1310
|
+
modifiedAt: Date | null;
|
|
1311
|
+
teacherId: string;
|
|
1312
|
+
inProgress: boolean;
|
|
1313
|
+
order: number | null;
|
|
1314
|
+
};
|
|
1315
|
+
meta: object;
|
|
1316
|
+
}>;
|
|
1238
1317
|
}>>;
|
|
1239
1318
|
//# sourceMappingURL=assignment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignment.d.ts","sourceRoot":"","sources":["../../src/routers/assignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"assignment.d.ts","sourceRoot":"","sources":["../../src/routers/assignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsFxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0qD3B,CAAC"}
|
|
@@ -68,6 +68,7 @@ const updateSubmissionSchema = z.object({
|
|
|
68
68
|
newAttachments: z.array(fileSchema).optional(),
|
|
69
69
|
existingFileIds: z.array(z.string()).optional(),
|
|
70
70
|
removedAttachments: z.array(z.string()).optional(),
|
|
71
|
+
feedback: z.string().optional(),
|
|
71
72
|
rubricGrades: z.array(z.object({
|
|
72
73
|
criteriaId: z.string(),
|
|
73
74
|
selectedLevelId: z.string(),
|
|
@@ -1037,7 +1038,7 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1037
1038
|
message: "User must be authenticated",
|
|
1038
1039
|
});
|
|
1039
1040
|
}
|
|
1040
|
-
const { submissionId, return: returnSubmission, gradeReceived, newAttachments, existingFileIds, removedAttachments, rubricGrades } = input;
|
|
1041
|
+
const { submissionId, return: returnSubmission, gradeReceived, newAttachments, existingFileIds, removedAttachments, rubricGrades, feedback } = input;
|
|
1041
1042
|
const submission = await prisma.submission.findFirst({
|
|
1042
1043
|
where: {
|
|
1043
1044
|
id: submissionId,
|
|
@@ -1181,6 +1182,7 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1181
1182
|
data: {
|
|
1182
1183
|
...(gradeReceived !== undefined && { gradeReceived }),
|
|
1183
1184
|
...(rubricGrades && { rubricState: JSON.stringify(rubricGrades) }),
|
|
1185
|
+
...(feedback && { teacherComments: feedback }),
|
|
1184
1186
|
...(removedAttachments && removedAttachments.length > 0 && {
|
|
1185
1187
|
annotations: {
|
|
1186
1188
|
deleteMany: {
|
|
@@ -1188,6 +1190,7 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1188
1190
|
},
|
|
1189
1191
|
},
|
|
1190
1192
|
}),
|
|
1193
|
+
...(returnSubmission && { returned: returnSubmission }),
|
|
1191
1194
|
},
|
|
1192
1195
|
include: {
|
|
1193
1196
|
attachments: {
|
|
@@ -1605,4 +1608,39 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1605
1608
|
});
|
|
1606
1609
|
return updatedAssignment;
|
|
1607
1610
|
}),
|
|
1611
|
+
detachGradingBoundary: protectedTeacherProcedure
|
|
1612
|
+
.input(z.object({
|
|
1613
|
+
classId: z.string(),
|
|
1614
|
+
assignmentId: z.string(),
|
|
1615
|
+
}))
|
|
1616
|
+
.mutation(async ({ ctx, input }) => {
|
|
1617
|
+
const { assignmentId } = input;
|
|
1618
|
+
const assignment = await prisma.assignment.findFirst({
|
|
1619
|
+
where: {
|
|
1620
|
+
id: assignmentId,
|
|
1621
|
+
},
|
|
1622
|
+
});
|
|
1623
|
+
if (!assignment) {
|
|
1624
|
+
throw new TRPCError({
|
|
1625
|
+
code: "NOT_FOUND",
|
|
1626
|
+
message: "Assignment not found",
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
const updatedAssignment = await prisma.assignment.update({
|
|
1630
|
+
where: { id: assignmentId },
|
|
1631
|
+
data: {
|
|
1632
|
+
gradingBoundary: {
|
|
1633
|
+
disconnect: true,
|
|
1634
|
+
},
|
|
1635
|
+
},
|
|
1636
|
+
include: {
|
|
1637
|
+
attachments: true,
|
|
1638
|
+
section: true,
|
|
1639
|
+
teacher: true,
|
|
1640
|
+
eventAttached: true,
|
|
1641
|
+
gradingBoundary: true,
|
|
1642
|
+
},
|
|
1643
|
+
});
|
|
1644
|
+
return updatedAssignment;
|
|
1645
|
+
}),
|
|
1608
1646
|
});
|
package/dist/routers/folder.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../../src/routers/folder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../../src/routers/folder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAouBvB,CAAC"}
|
package/dist/routers/folder.js
CHANGED
package/package.json
CHANGED
|
@@ -75,6 +75,7 @@ const updateSubmissionSchema = z.object({
|
|
|
75
75
|
newAttachments: z.array(fileSchema).optional(),
|
|
76
76
|
existingFileIds: z.array(z.string()).optional(),
|
|
77
77
|
removedAttachments: z.array(z.string()).optional(),
|
|
78
|
+
feedback: z.string().optional(),
|
|
78
79
|
rubricGrades: z.array(z.object({
|
|
79
80
|
criteriaId: z.string(),
|
|
80
81
|
selectedLevelId: z.string(),
|
|
@@ -1130,7 +1131,7 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1130
1131
|
});
|
|
1131
1132
|
}
|
|
1132
1133
|
|
|
1133
|
-
const { submissionId, return: returnSubmission, gradeReceived, newAttachments, existingFileIds, removedAttachments, rubricGrades } = input;
|
|
1134
|
+
const { submissionId, return: returnSubmission, gradeReceived, newAttachments, existingFileIds, removedAttachments, rubricGrades, feedback } = input;
|
|
1134
1135
|
|
|
1135
1136
|
const submission = await prisma.submission.findFirst({
|
|
1136
1137
|
where: {
|
|
@@ -1285,6 +1286,7 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1285
1286
|
data: {
|
|
1286
1287
|
...(gradeReceived !== undefined && { gradeReceived }),
|
|
1287
1288
|
...(rubricGrades && { rubricState: JSON.stringify(rubricGrades) }),
|
|
1289
|
+
...(feedback && { teacherComments: feedback }),
|
|
1288
1290
|
...(removedAttachments && removedAttachments.length > 0 && {
|
|
1289
1291
|
annotations: {
|
|
1290
1292
|
deleteMany: {
|
|
@@ -1292,6 +1294,7 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1292
1294
|
},
|
|
1293
1295
|
},
|
|
1294
1296
|
}),
|
|
1297
|
+
...(returnSubmission as unknown as boolean && { returned: returnSubmission }),
|
|
1295
1298
|
},
|
|
1296
1299
|
include: {
|
|
1297
1300
|
attachments: {
|
|
@@ -1746,6 +1749,45 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1746
1749
|
},
|
|
1747
1750
|
});
|
|
1748
1751
|
|
|
1752
|
+
return updatedAssignment;
|
|
1753
|
+
}),
|
|
1754
|
+
detachGradingBoundary: protectedTeacherProcedure
|
|
1755
|
+
.input(z.object({
|
|
1756
|
+
classId: z.string(),
|
|
1757
|
+
assignmentId: z.string(),
|
|
1758
|
+
}))
|
|
1759
|
+
.mutation(async ({ ctx, input }) => {
|
|
1760
|
+
const { assignmentId } = input;
|
|
1761
|
+
|
|
1762
|
+
const assignment = await prisma.assignment.findFirst({
|
|
1763
|
+
where: {
|
|
1764
|
+
id: assignmentId,
|
|
1765
|
+
},
|
|
1766
|
+
});
|
|
1767
|
+
|
|
1768
|
+
if (!assignment) {
|
|
1769
|
+
throw new TRPCError({
|
|
1770
|
+
code: "NOT_FOUND",
|
|
1771
|
+
message: "Assignment not found",
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
const updatedAssignment = await prisma.assignment.update({
|
|
1776
|
+
where: { id: assignmentId },
|
|
1777
|
+
data: {
|
|
1778
|
+
gradingBoundary: {
|
|
1779
|
+
disconnect: true,
|
|
1780
|
+
},
|
|
1781
|
+
},
|
|
1782
|
+
include: {
|
|
1783
|
+
attachments: true,
|
|
1784
|
+
section: true,
|
|
1785
|
+
teacher: true,
|
|
1786
|
+
eventAttached: true,
|
|
1787
|
+
gradingBoundary: true,
|
|
1788
|
+
},
|
|
1789
|
+
});
|
|
1790
|
+
|
|
1749
1791
|
return updatedAssignment;
|
|
1750
1792
|
}),
|
|
1751
1793
|
});
|