Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Flattened tree hierarchy for learning content schema
{
byId: {
'entity-id': {
//Any of Class, Subject, Module or any other entity
}
},
subjects: {
byClass: {
'class-id-1': ['class-id-1-subject-id-1', 'class-id-1-subject-id-2',...],
'class-id-2': ['class-id-2-subject-id-1', 'class-id-2-subject-id-2',...],
}
},
modules: {
byClass: {
'class-id-1': ['class-id-1-module-id-1', 'class-id-1-module-id-2',...],
'class-id-2': ['class-id-2-module-id-1', 'class-id-2-module-id-2',...],
}
bySubject: {
'subject-id-1': ['subject-id-1-module-id-1', 'subject-id-1-module-id-2',...],
'subject-id-2': ['subject-id-2-module-id-1', 'subject-id-2-module-id-2',...],
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment