We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ca8ae2 commit 7ab7d82Copy full SHA for 7ab7d82
packages/db/src/impl/static/courseDB.ts
@@ -42,8 +42,14 @@ export class StaticCourseDB implements CourseDBInterface {
42
}
43
44
async getCourseInfo(): Promise<CourseInfo> {
45
+ // Count only cards, not all documents
46
+ // Use chunks metadata to count card documents specifically
47
+ const cardCount = this.manifest.chunks
48
+ .filter(chunk => chunk.docType === DocType.CARD)
49
+ .reduce((total, chunk) => total + chunk.documentCount, 0);
50
+
51
return {
- cardCount: this.manifest.documentCount || 0,
52
+ cardCount,
53
registeredUsers: 0, // Always 0 in static mode
54
};
55
0 commit comments