Skip to content

Commit

Permalink
Add educationLevel translation from CASE import->CaSS->CTDL-ASN export
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristin committed Sep 6, 2019
1 parent 8e86d98 commit f1a4e9b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/resources/c-adapter/ceasn/ceasn.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,17 @@ function cassFrameworkAsCeasn() {
}
if (competencies[id]["ceasn:inLanguage"] == null)
competencies[id]["ceasn:inLanguage"] = "en";
if (c["schema:educationalAlignment"] != null) {
if (!EcArray.isArray(c["schema:educationalAlignment"])) {
competencies[id]["ceasn:educationLevelType"] = c["schema:educationalAlignment"]["schema:targetName"];
}
else {
competencies[id]["ceasn:educationLevelType"] = [];
for (var j = 0; j < c["schema:educationalAlignment"].length; j++) {
competencies[id]["ceasn:educationLevelType"].push(c["schema:educationalAlignment"][j]["schema:targetName"]);
}
}
}
delete competencies[id]["@context"];
competencies[id] = stripNonCe(competencies[id]);
}
Expand Down

0 comments on commit f1a4e9b

Please sign in to comment.