@vue-skuilder/db 0.2.33 → 0.2.35
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/{contentSource-JmWYu8IK.d.ts → contentSource-BteiDpxH.d.ts} +2 -2
- package/dist/{contentSource-CTQ4kWhR.d.cts → contentSource-FQZcZopC.d.cts} +2 -2
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +2 -1
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-DfI_KYAe.d.cts → dataLayerProvider-3y21KtF-.d.cts} +1 -1
- package/dist/{dataLayerProvider-rlLE2Mf-.d.ts → dataLayerProvider-C_QWzHf-.d.ts} +1 -1
- package/dist/diagnostics/index.d.cts +108 -5
- package/dist/diagnostics/index.d.ts +108 -5
- package/dist/diagnostics/index.js +129 -0
- package/dist/diagnostics/index.js.map +1 -1
- package/dist/diagnostics/index.mjs +128 -0
- package/dist/diagnostics/index.mjs.map +1 -1
- package/dist/impl/couch/index.d.cts +3 -3
- package/dist/impl/couch/index.d.ts +3 -3
- package/dist/impl/couch/index.js +2 -1
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +2 -1
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +4 -4
- package/dist/impl/static/index.d.ts +4 -4
- package/dist/impl/static/index.js +2 -1
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +2 -1
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/{index-Ktg72jKb.d.cts → index-BIum9Ue2.d.cts} +1 -1
- package/dist/{index-CVGehe_t.d.ts → index-C745YB_6.d.ts} +1 -1
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +27 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -18
- package/dist/index.mjs.map +1 -1
- package/dist/{types-D0oQeJAi.d.cts → types-BcWVH4ww.d.cts} +1 -1
- package/dist/{types-dXWfyz9B.d.ts → types-DF0JuPbs.d.ts} +1 -1
- package/dist/{types-legacy-BkOYOR6U.d.cts → types-legacy-DdVjg81H.d.cts} +1 -1
- package/dist/{types-legacy-BkOYOR6U.d.ts → types-legacy-DdVjg81H.d.ts} +1 -1
- package/dist/util/packer/index.d.cts +3 -3
- package/dist/util/packer/index.d.ts +3 -3
- package/package.json +3 -3
- package/src/core/navigators/filters/eloDistance.ts +10 -0
- package/src/courseConfigRegistration.ts +22 -10
- package/src/diagnostics/derive.ts +6 -0
- package/src/diagnostics/index.ts +1 -0
- package/src/diagnostics/tagElo.ts +257 -0
- package/src/study/SpacedRepetition.ts +23 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-
|
|
1
|
+
import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-BcWVH4ww.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Abstraction for file system operations needed by the migrator.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-
|
|
1
|
+
import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-DF0JuPbs.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Abstraction for file system operations needed by the migrator.
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export { A as AdminDBInterface, d as AssignedCard, a as AssignedContent, c as AssignedCourse, b as AssignedTag, C as ClassroomDBInterface, S as StudentClassroomDBInterface, T as TeacherClassroomDBInterface } from './classroomDB-DLTtLZct.cjs';
|
|
2
|
-
import { U as UserDBInterface,
|
|
3
|
-
export { P as ActivityRecord, ae as CardFilter, ag as CardFilterFactory, ah as CardGenerator, aj as CardGeneratorFactory, K as ClassroomRegistration, J as ClassroomRegistrationDesignation, L as ClassroomRegistrationDoc,
|
|
4
|
-
import { D as DataLayerProvider } from './dataLayerProvider-
|
|
5
|
-
import {
|
|
6
|
-
export { C as CardData, g as CourseListData, h as DataShapeData,
|
|
2
|
+
import { U as UserDBInterface, g as CourseRegistrationDoc, m as SessionEloEvent, S as StudySessionItem, W as WeightedCard, R as ReplanHints, o as StudyContentSource, x as SessionStateSnapshotProvider, G as GeneratorResult, N as NavigatorRole, c as ContentNavigationStrategyData, F as FilterKind, y as RegulatorConfig, C as CourseDBInterface } from './contentSource-FQZcZopC.cjs';
|
|
3
|
+
export { P as ActivityRecord, ae as CardFilter, ag as CardFilterFactory, ah as CardGenerator, aj as CardGeneratorFactory, K as ClassroomRegistration, J as ClassroomRegistrationDesignation, L as ClassroomRegistrationDoc, d as ContentNavigator, v as ContentSourceID, b as CourseInfo, Q as CourseRegistration, a as CoursesDBInterface, aB as DEFAULT_REGULATOR_CONFIG, aM as DocumentUpdater, af as FilterContext, at as FilterImpact, ai as GeneratorContext, as as GeneratorSummary, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, aF as INTAKE_CLOCK_KEY, aE as IntakeClockState, av as LearnableWeight, a0 as NavigatorConstructor, ab as NavigatorRoles, aa as Navigators, aw as OrchestrationContext, au as PipelineForecaster, aq as PipelineRunReport, l as RegulatorName, j as RegulatorReading, ar as RunReportCard, f as ScheduledCard, h as SessionStateSnapshot, M as SessionTrackingData, a8 as StrategyContribution, e as StudySessionDoc, p as StudySessionFailedItem, q as StudySessionFailedNewItem, r as StudySessionFailedReviewItem, s as StudySessionNewItem, t as StudySessionReviewItem, k as StudySessionRunCard, n as StudySessionRunCardTrail, i as StudySessionRunSummary, O as UserConfig, H as UserCourseSetting, E as UserCourseSettings, B as UserDBAuthenticator, z as UserDBReader, A as UserDBWriter, Y as UserHydrationState, Z as UserHydrationStatus, T as UserOutcomeRecord, I as UsrCrsDataInterface, aL as applyReading, ax as computeDeviation, az as computeEffectiveWeight, ay as computeSpread, aA as createOrchestrationContext, ap as drainCapturedRuns, aH as frozenMsAt, am as getActivePipeline, a9 as getCardOrigin, aP as getLapses, a5 as getRegisteredFilterKind, a2 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a4 as getRegisteredNavigatorRole, ao as getRunsForSession, aO as getStreak, w as getStudySource, a3 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, aI as intakeHours, aK as intakeReading, ad as isFilter, ac as isGenerator, u as isReview, V as makeStudySessionId, al as mountPipelineDebugger, aN as newInterval, X as newSessionId, ak as pipelineDebugAPI, a1 as registerNavigator, aG as resetIntakeClock, aD as reviewMassReading, aC as reviewWeight, an as setDebugSessionId, aJ as stepIntakeClock } from './contentSource-FQZcZopC.cjs';
|
|
4
|
+
import { D as DataLayerProvider } from './dataLayerProvider-3y21KtF-.cjs';
|
|
5
|
+
import { e as CardHistory, c as CardRecord, d as QuestionRecord } from './types-legacy-DdVjg81H.cjs';
|
|
6
|
+
export { C as CardData, g as CourseListData, h as DataShapeData, b as DisplayableData, D as DocType, f as DocTypePrefixes, F as Field, G as GuestUsername, Q as QualifiedCardID, i as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-DdVjg81H.cjs';
|
|
7
7
|
import { SrsBacklogDebug, StrategyPressureDebug, Loggable } from './core/index.cjs';
|
|
8
8
|
export { BulkCardProcessorConfig, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, DiversityRerankOptions, GradientObservation, GradientResult, ImportResult, PeriodUpdateInput, PeriodUpdateResult, PressureGaugeDebug, SignalConfig, StrategyLearningState, StrategyStateDoc, StrategyStateId, aggregateOutcomesForGradient, areQuestionRecords, buildStrategyStateId, captureStrategyPressure, clearSrsBacklogDebug, clearStrategyPressureDebug, computeOutcomeSignal, computeStrategyGradient, diversityRerank, docIsDeleted, getCardHistoryID, getDefaultLearnableWeight, getSrsBacklogDebug, getStrategyPressureDebug, importParsedCards, isQuestionRecord, mountUserDBDebugger, parseCardHistoryID, recordUserOutcome, runPeriodUpdate, scoreAccuracyInZone, updateLearningState, updateStrategyWeight, userDBDebugAPI, validateProcessorConfig } from './core/index.cjs';
|
|
9
|
-
import { TaggedPerformance, TagFilter, DataShape, CourseConfig } from '@vue-skuilder/common';
|
|
10
|
-
import { S as StaticCourseManifest } from './types-
|
|
11
|
-
export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-
|
|
12
|
-
import { F as FileSystemAdapter } from './index-
|
|
13
|
-
export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-
|
|
9
|
+
import { TaggedPerformance, TagFilter, DataShape, SeedMeta, CourseConfig } from '@vue-skuilder/common';
|
|
10
|
+
import { S as StaticCourseManifest } from './types-BcWVH4ww.cjs';
|
|
11
|
+
export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-BcWVH4ww.cjs';
|
|
12
|
+
import { F as FileSystemAdapter } from './index-BIum9Ue2.cjs';
|
|
13
|
+
export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-BIum9Ue2.cjs';
|
|
14
14
|
import moment from 'moment';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -1460,6 +1460,7 @@ interface CustomQuestionsData {
|
|
|
1460
1460
|
name?: string;
|
|
1461
1461
|
}[];
|
|
1462
1462
|
seedData?: unknown[];
|
|
1463
|
+
seedMeta?: (item: unknown) => SeedMeta;
|
|
1463
1464
|
}[];
|
|
1464
1465
|
dataShapes: DataShape[];
|
|
1465
1466
|
views: {
|
|
@@ -1487,6 +1488,7 @@ interface ProcessedQuestionData {
|
|
|
1487
1488
|
name?: string;
|
|
1488
1489
|
}[];
|
|
1489
1490
|
seedData?: unknown[];
|
|
1491
|
+
seedMeta?: (item: unknown) => SeedMeta;
|
|
1490
1492
|
};
|
|
1491
1493
|
dataShapes: DataShape[];
|
|
1492
1494
|
views: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export { A as AdminDBInterface, d as AssignedCard, a as AssignedContent, c as AssignedCourse, b as AssignedTag, C as ClassroomDBInterface, S as StudentClassroomDBInterface, T as TeacherClassroomDBInterface } from './classroomDB-DLTtLZct.js';
|
|
2
|
-
import { U as UserDBInterface,
|
|
3
|
-
export { P as ActivityRecord, ae as CardFilter, ag as CardFilterFactory, ah as CardGenerator, aj as CardGeneratorFactory, K as ClassroomRegistration, J as ClassroomRegistrationDesignation, L as ClassroomRegistrationDoc,
|
|
4
|
-
import { D as DataLayerProvider } from './dataLayerProvider-
|
|
5
|
-
import {
|
|
6
|
-
export { C as CardData, g as CourseListData, h as DataShapeData,
|
|
2
|
+
import { U as UserDBInterface, g as CourseRegistrationDoc, m as SessionEloEvent, S as StudySessionItem, W as WeightedCard, R as ReplanHints, o as StudyContentSource, x as SessionStateSnapshotProvider, G as GeneratorResult, N as NavigatorRole, c as ContentNavigationStrategyData, F as FilterKind, y as RegulatorConfig, C as CourseDBInterface } from './contentSource-BteiDpxH.js';
|
|
3
|
+
export { P as ActivityRecord, ae as CardFilter, ag as CardFilterFactory, ah as CardGenerator, aj as CardGeneratorFactory, K as ClassroomRegistration, J as ClassroomRegistrationDesignation, L as ClassroomRegistrationDoc, d as ContentNavigator, v as ContentSourceID, b as CourseInfo, Q as CourseRegistration, a as CoursesDBInterface, aB as DEFAULT_REGULATOR_CONFIG, aM as DocumentUpdater, af as FilterContext, at as FilterImpact, ai as GeneratorContext, as as GeneratorSummary, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, aF as INTAKE_CLOCK_KEY, aE as IntakeClockState, av as LearnableWeight, a0 as NavigatorConstructor, ab as NavigatorRoles, aa as Navigators, aw as OrchestrationContext, au as PipelineForecaster, aq as PipelineRunReport, l as RegulatorName, j as RegulatorReading, ar as RunReportCard, f as ScheduledCard, h as SessionStateSnapshot, M as SessionTrackingData, a8 as StrategyContribution, e as StudySessionDoc, p as StudySessionFailedItem, q as StudySessionFailedNewItem, r as StudySessionFailedReviewItem, s as StudySessionNewItem, t as StudySessionReviewItem, k as StudySessionRunCard, n as StudySessionRunCardTrail, i as StudySessionRunSummary, O as UserConfig, H as UserCourseSetting, E as UserCourseSettings, B as UserDBAuthenticator, z as UserDBReader, A as UserDBWriter, Y as UserHydrationState, Z as UserHydrationStatus, T as UserOutcomeRecord, I as UsrCrsDataInterface, aL as applyReading, ax as computeDeviation, az as computeEffectiveWeight, ay as computeSpread, aA as createOrchestrationContext, ap as drainCapturedRuns, aH as frozenMsAt, am as getActivePipeline, a9 as getCardOrigin, aP as getLapses, a5 as getRegisteredFilterKind, a2 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a4 as getRegisteredNavigatorRole, ao as getRunsForSession, aO as getStreak, w as getStudySource, a3 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, aI as intakeHours, aK as intakeReading, ad as isFilter, ac as isGenerator, u as isReview, V as makeStudySessionId, al as mountPipelineDebugger, aN as newInterval, X as newSessionId, ak as pipelineDebugAPI, a1 as registerNavigator, aG as resetIntakeClock, aD as reviewMassReading, aC as reviewWeight, an as setDebugSessionId, aJ as stepIntakeClock } from './contentSource-BteiDpxH.js';
|
|
4
|
+
import { D as DataLayerProvider } from './dataLayerProvider-C_QWzHf-.js';
|
|
5
|
+
import { e as CardHistory, c as CardRecord, d as QuestionRecord } from './types-legacy-DdVjg81H.js';
|
|
6
|
+
export { C as CardData, g as CourseListData, h as DataShapeData, b as DisplayableData, D as DocType, f as DocTypePrefixes, F as Field, G as GuestUsername, Q as QualifiedCardID, i as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-DdVjg81H.js';
|
|
7
7
|
import { SrsBacklogDebug, StrategyPressureDebug, Loggable } from './core/index.js';
|
|
8
8
|
export { BulkCardProcessorConfig, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, DiversityRerankOptions, GradientObservation, GradientResult, ImportResult, PeriodUpdateInput, PeriodUpdateResult, PressureGaugeDebug, SignalConfig, StrategyLearningState, StrategyStateDoc, StrategyStateId, aggregateOutcomesForGradient, areQuestionRecords, buildStrategyStateId, captureStrategyPressure, clearSrsBacklogDebug, clearStrategyPressureDebug, computeOutcomeSignal, computeStrategyGradient, diversityRerank, docIsDeleted, getCardHistoryID, getDefaultLearnableWeight, getSrsBacklogDebug, getStrategyPressureDebug, importParsedCards, isQuestionRecord, mountUserDBDebugger, parseCardHistoryID, recordUserOutcome, runPeriodUpdate, scoreAccuracyInZone, updateLearningState, updateStrategyWeight, userDBDebugAPI, validateProcessorConfig } from './core/index.js';
|
|
9
|
-
import { TaggedPerformance, TagFilter, DataShape, CourseConfig } from '@vue-skuilder/common';
|
|
10
|
-
import { S as StaticCourseManifest } from './types-
|
|
11
|
-
export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-
|
|
12
|
-
import { F as FileSystemAdapter } from './index-
|
|
13
|
-
export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-
|
|
9
|
+
import { TaggedPerformance, TagFilter, DataShape, SeedMeta, CourseConfig } from '@vue-skuilder/common';
|
|
10
|
+
import { S as StaticCourseManifest } from './types-DF0JuPbs.js';
|
|
11
|
+
export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-DF0JuPbs.js';
|
|
12
|
+
import { F as FileSystemAdapter } from './index-C745YB_6.js';
|
|
13
|
+
export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-C745YB_6.js';
|
|
14
14
|
import moment from 'moment';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -1460,6 +1460,7 @@ interface CustomQuestionsData {
|
|
|
1460
1460
|
name?: string;
|
|
1461
1461
|
}[];
|
|
1462
1462
|
seedData?: unknown[];
|
|
1463
|
+
seedMeta?: (item: unknown) => SeedMeta;
|
|
1463
1464
|
}[];
|
|
1464
1465
|
dataShapes: DataShape[];
|
|
1465
1466
|
views: {
|
|
@@ -1487,6 +1488,7 @@ interface ProcessedQuestionData {
|
|
|
1487
1488
|
name?: string;
|
|
1488
1489
|
}[];
|
|
1489
1490
|
seedData?: unknown[];
|
|
1491
|
+
seedMeta?: (item: unknown) => SeedMeta;
|
|
1490
1492
|
};
|
|
1491
1493
|
dataShapes: DataShape[];
|
|
1492
1494
|
views: {
|
package/dist/index.js
CHANGED
|
@@ -5539,7 +5539,7 @@ var FRAMEWORK_VERSION, hostAppVersion, DEFAULT_STRATEGY_HASH;
|
|
|
5539
5539
|
var init_versionStamps = __esm({
|
|
5540
5540
|
"src/core/versionStamps.ts"() {
|
|
5541
5541
|
"use strict";
|
|
5542
|
-
FRAMEWORK_VERSION = true ? "0.2.
|
|
5542
|
+
FRAMEWORK_VERSION = true ? "0.2.35" : "dev";
|
|
5543
5543
|
DEFAULT_STRATEGY_HASH = "default";
|
|
5544
5544
|
}
|
|
5545
5545
|
});
|
|
@@ -8121,21 +8121,26 @@ function newQuestionInterval(user, cardHistory) {
|
|
|
8121
8121
|
const interval = lastInterval * (0.75 + skill);
|
|
8122
8122
|
cardHistory.lapses = getLapses(cardHistory.records);
|
|
8123
8123
|
cardHistory.streak = getStreak(cardHistory.records);
|
|
8124
|
+
let ret = interval;
|
|
8124
8125
|
if (cardHistory.lapses && cardHistory.streak && cardHistory.bestInterval && (cardHistory.lapses >= 0 || cardHistory.streak >= 0)) {
|
|
8125
|
-
|
|
8126
|
+
ret = (cardHistory.lapses * interval + cardHistory.streak * cardHistory.bestInterval) / (cardHistory.lapses + cardHistory.streak);
|
|
8126
8127
|
logger.debug(`Weighted average interval calculation:
|
|
8127
8128
|
(${cardHistory.lapses} * ${interval} + ${cardHistory.streak} * ${cardHistory.bestInterval}) / (${cardHistory.lapses} + ${cardHistory.streak}) = ${ret}`);
|
|
8128
|
-
return ret;
|
|
8129
|
-
} else {
|
|
8130
|
-
return interval;
|
|
8131
8129
|
}
|
|
8130
|
+
if (currentAttempt.fluent === false) {
|
|
8131
|
+
logger.debug(
|
|
8132
|
+
`Correct but not fluent: capping interval ${ret}s at ${SLOW_CORRECT_MAX_INTERVAL}s`
|
|
8133
|
+
);
|
|
8134
|
+
return Math.min(ret, SLOW_CORRECT_MAX_INTERVAL);
|
|
8135
|
+
}
|
|
8136
|
+
return ret;
|
|
8132
8137
|
} else {
|
|
8133
8138
|
return 0;
|
|
8134
8139
|
}
|
|
8135
8140
|
}
|
|
8136
8141
|
function lastSuccessfulInterval(cardHistory) {
|
|
8137
8142
|
for (let i = cardHistory.length - 1; i >= 1; i--) {
|
|
8138
|
-
if (cardHistory[i].priorAttemps === 0 && cardHistory[i].isCorrect) {
|
|
8143
|
+
if (cardHistory[i].priorAttemps === 0 && cardHistory[i].isCorrect && cardHistory[i].fluent !== false) {
|
|
8139
8144
|
const lastInterval = secondsBetween(cardHistory[i - 1].timeStamp, cardHistory[i].timeStamp);
|
|
8140
8145
|
const ret = Math.max(lastInterval, 20 * 60 * 60);
|
|
8141
8146
|
logger.debug(`Last interval w/ this card was: ${lastInterval}s, returning ${ret}s`);
|
|
@@ -8166,7 +8171,7 @@ function secondsBetween(start, end) {
|
|
|
8166
8171
|
const ret = duration(end.diff(start)).asSeconds();
|
|
8167
8172
|
return ret;
|
|
8168
8173
|
}
|
|
8169
|
-
var import_moment4, import_common14, duration;
|
|
8174
|
+
var import_moment4, import_common14, duration, SLOW_CORRECT_MAX_INTERVAL;
|
|
8170
8175
|
var init_SpacedRepetition = __esm({
|
|
8171
8176
|
"src/study/SpacedRepetition.ts"() {
|
|
8172
8177
|
"use strict";
|
|
@@ -8175,6 +8180,7 @@ var init_SpacedRepetition = __esm({
|
|
|
8175
8180
|
import_common14 = require("@vue-skuilder/common");
|
|
8176
8181
|
init_logger();
|
|
8177
8182
|
duration = import_moment4.default.duration;
|
|
8183
|
+
SLOW_CORRECT_MAX_INTERVAL = 20 * 60 * 60;
|
|
8178
8184
|
}
|
|
8179
8185
|
});
|
|
8180
8186
|
|
|
@@ -16826,16 +16832,20 @@ async function registerSeedData(question, courseDB, username) {
|
|
|
16826
16832
|
if (question.questionClass.seedData && Array.isArray(question.questionClass.seedData)) {
|
|
16827
16833
|
logger.info(`Registering seed data for question: ${question.name}`);
|
|
16828
16834
|
try {
|
|
16829
|
-
|
|
16830
|
-
(seedDataItem
|
|
16831
|
-
question.
|
|
16832
|
-
|
|
16833
|
-
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
|
|
16837
|
-
|
|
16838
|
-
|
|
16835
|
+
if (question.dataShapes.length > 0) {
|
|
16836
|
+
for (const seedDataItem of question.questionClass.seedData) {
|
|
16837
|
+
const meta = question.questionClass.seedMeta?.(seedDataItem) ?? {};
|
|
16838
|
+
await courseDB.addNote(
|
|
16839
|
+
question.course,
|
|
16840
|
+
question.dataShapes[0],
|
|
16841
|
+
seedDataItem,
|
|
16842
|
+
username,
|
|
16843
|
+
meta.tags ?? [],
|
|
16844
|
+
void 0,
|
|
16845
|
+
meta.elo !== void 0 ? (0, import_common28.toCourseElo)(meta.elo) : void 0
|
|
16846
|
+
);
|
|
16847
|
+
}
|
|
16848
|
+
}
|
|
16839
16849
|
logger.info(`Seed data registered for question: ${question.name}`);
|
|
16840
16850
|
} catch (error) {
|
|
16841
16851
|
logger.warn(
|