Skip to content

Commit

Permalink
renamed vakkern/vaksubkern/vakinhoud/leerlijn/vakkencluster to lpib_*
Browse files Browse the repository at this point in the history
  • Loading branch information
poef committed Jul 14, 2020
1 parent e6ebad8 commit 56ef4d5
Show file tree
Hide file tree
Showing 6 changed files with 2,187 additions and 2,245 deletions.
22 changes: 11 additions & 11 deletions data/combine.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'ldk_vak','ldk_vakkern','ldk_vaksubkern','ldk_vakinhoud',
// Inhouden
// 'vak',
'vakkern','vaksubkern','vakinhoud',
'lpib_vakkern','lpib_vaksubkern','lpib_vakinhoud',
// Doelen
'doelniveau','doel','niveau',
// Kerndoelen
Expand All @@ -39,21 +39,21 @@
// Doelgroepteksten
'leerlingtekst',
// leerplan in beeld
'vakkencluster','leerlijn',
'lpib_vakkencluster','lpib_leerlijn',
//syllabus
'syllabus', 'syllabus_specifieke_eindterm', 'syllabus_toelichting', 'syllabus_vakbegrip'
];

// ignore related links that aren't parent-child relations
var ignore = {
'ldk_vak': ['vak_id'],
'ldk_vakkern': ['vakkern_id'],
'ldk_vaksubkern': ['vaksubkern_id'],
'ldk_vakinhoud': ['vakinhoud_id'],
'ldk_vakkern': ['lpib_vakkern_id'],
'ldk_vaksubkern': ['lpib_vaksubkern_id'],
'ldk_vakinhoud': ['lpib_vakinhoud_id'],
'kerndoel_vakleergebied': ['vak_id'],
'examenprogramma_vakleergebied': ['vak_id'],
'leerlijn': ['vak_id', 'vakinhoud_id'],
'vakkencluster': ['vak_id']
'lpib_leerlijn': ['vak_id', 'lpib_vakinhoud_id'],
'lpib_vakkencluster': ['vak_id']
};

function shouldIgnore(section, property) {
Expand Down Expand Up @@ -151,9 +151,9 @@
niveauOb = {
niveau_id: niveauId,
// vak_id: [],
vakkern_id: [],
vaksubkern_id: [],
vakinhoud_id: [],
lpib_vakkern_id: [],
lpib_vaksubkern_id: [],
lpib_vakinhoud_id: [],
ldk_vak_id: [],
ldk_vakkern_id: [],
ldk_vaksubkern_id: [],
Expand Down Expand Up @@ -299,7 +299,7 @@
// now make sure all _id fields are arrays, ldk_* might have them as single values
for (i in combined.data) {
combined.data[i].forEach(function(entry, index) {
var fields = ["vak_id", "vakkern_id", "vaksubkern_id", "vakinhoud_id"];
var fields = ["vak_id", "lpib_vakkern_id", "lpib_vaksubkern_id", "lpib_vakinhoud_id"];
fields.forEach(function(field) {
if (entry[field] && !Array.isArray(entry[field])) {
combined.data[i][index][field] = [entry[field]];
Expand Down
Loading

0 comments on commit 56ef4d5

Please sign in to comment.