feat: implement curriculum service and learning automation infrastructure
This commit is contained in:
@@ -87,9 +87,9 @@ export async function getCurriculumTopic(weekNumber, year) {
|
||||
return { topic: null, curriculumEntry: entry || null };
|
||||
}
|
||||
|
||||
// Resolve the topic from the topics collection
|
||||
// Resolve the topic from the topics collection (ensure it is not excluded)
|
||||
const topics = await db.getTopics();
|
||||
const topic = topics.find(t => t.id === entry.topic_id) || null;
|
||||
const topic = topics.find(t => t.id === entry.topic_id && t.learning_relevance !== 'exclude') || null;
|
||||
|
||||
return { topic, curriculumEntry: entry };
|
||||
}
|
||||
@@ -178,8 +178,8 @@ export async function autoGenerateCurriculum(year) {
|
||||
const currYear = year ?? getCurriculumYear();
|
||||
const topics = await db.getTopics();
|
||||
|
||||
// Filter out 'fact' type topics — those are for the knowledge graph only
|
||||
const learningTopics = topics.filter(t => t.type !== 'fact');
|
||||
// Filter out 'fact' type topics and 'exclude' relevance topics
|
||||
const learningTopics = topics.filter(t => t.type !== 'fact' && t.learning_relevance !== 'exclude');
|
||||
|
||||
const weeks = [];
|
||||
const reviewWeeks = [13, 26, 39, 52];
|
||||
|
||||
Reference in New Issue
Block a user