summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-03-25 12:25:51 +0100
committerPeter Wu <peter@lekensteyn.nl>2015-03-25 12:25:51 +0100
commit2e964ad022f17e2833798ff927eee818c3e1d995 (patch)
tree5c93446c18d6b3305d98b73705ebb779a2982a25
parentfb80af778aea1ff00d47e2ffb5d2950061ee5a42 (diff)
downloadsite-2e964ad022f17e2833798ff927eee818c3e1d995.tar.gz
Add BEP and elective/USE
-rw-r--r--js/courses.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/js/courses.js b/js/courses.js
index 7dc6867..7bcfc2b 100644
--- a/js/courses.js
+++ b/js/courses.js
@@ -31,6 +31,7 @@ define(['assert'], function(assert) {
{ "id": "2IIC0", "name": "Business Information Systems","when": "Y3Q1" },
{ "id": "2IID0", "name": "Web Analytics", "when": "Y3Q2" },
{ "id": "2IO90", "name": "DBL Algorithms", "when": "Y3Q2" },
+ { "id": "DS004", "name": "Bachelor End Project", "when": "Y3Q3,Y3Q4" },
];
function getQuartile(when) {
@@ -58,7 +59,23 @@ define(['assert'], function(assert) {
assert (!(course.id in coursesById),
"Course is already known: " + course.id);
coursesById[course.id] = course;
- getQuartile(course.when).push(course);
+ course.when.split(",").forEach(function(when) {
+ getQuartile(when).push(course);
+ });
+ });
+
+ // fill in the remaining time slots
+ schedule.forEach(function(year, year_i) {
+ year.forEach(function(quartile, quartile_i) {
+ while (quartile.length < 3) {
+ quartile.push({
+ "id": "",
+ "name": "Elective / USE",
+ "type": "elective",
+ "when": "Y" + (year_i + 1) + "Q" + (quartile_i + 1)
+ });
+ }
+ });
});
return {