diff options
Diffstat (limited to 'js/courses.js')
-rw-r--r-- | js/courses.js | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/js/courses.js b/js/courses.js new file mode 100644 index 0000000..e63bce3 --- /dev/null +++ b/js/courses.js @@ -0,0 +1,82 @@ +define(['assert'], function(assert) { + 'use strict'; + // types: bc (bachelor college), major (default), bep + // (assumption: every course is 5 ECTS and one must do 15 ECTS in a + // quartile, filling it up with Electives) + // for new courses without code, use "DS..." + var courses = [ + // Bachelor college core courses + { "id": "2WAB0", "name": "Calculus", "type": "bc", "when": "Y1Q1" }, + { "id": "3NAB0", "name": "Physics", "type": "bc", "when": "Y1Q2" }, + { "id": "0LEB0", "name": "Modelling", "type": "bc", "when": "Y1Q3" }, + { "id": "0SAB0", "name": "USE Basics", "type": "bc", "when": "Y1Q4" }, + { "id": "7NXB0", "name": "Design", "type": "bc", "when": "Y2Q1" }, + // Data Science basic courses + { "id": "2IP90", "name": "Programming", "when": "Y1Q1" }, + { "id": "DS001", "name": "Introduction to Data Science", "when": "Y1Q1" }, + { "id": "2IT60", "name": "Logic and set theory", "when": "Y1Q2" }, + { "id": "2IO80", "name": "DBL Hypermedia", "when": "Y1Q3" }, + { "id": "2IC60", "name": "Computer networks and security", "when": "Y1Q4" }, + { "id": "2ID40", "name": "Human technology interaction", "when": "Y1Q4" }, + { "id": "2WF20", "name": "Linear Algebra", "when": "Y2Q1" }, + { "id": "2IV60", "name": "Computer Graphics", "when": "Y2Q3" }, + // Advanced courses + // TODO continue here + ]; + + function getQuartile(when) { + var y_q = /^Y([1-3])Q([1-4])$/.exec(when); + assert(y_q, "Invalid when: " + when); + var y_i = y_q[1] - 1, q_i = y_q[2] - 1; + return schedule[y_i][q_i]; + } + + var coursesById = {}; + + // 2d array from years to quartiles to courses + var schedule = []; + // make an empty schedule + var years = 3, quartiles = 4; + for (var i = 0; i < years; i++) { + schedule[i] = []; + for (var j = 0; j < quartiles; j++) { + schedule[i][j] = []; + } + } + + // find all courses by ID and fill the schedule + courses.forEach(function(course) { + assert (!(course.id in coursesById), + "Course is already known: " + course.id); + coursesById[course.id] = course; + getQuartile(course.when).push(course); + }); + + return { + "courses": courses, + "schedule": schedule + }; +}); +/* +Advanced courses: +Year 2- Datamodelling and Databases - Prerequisite: Introduction to Data Science +Year 2- Web Technology - Prerequisites: Human Technology Interaction & Programming +Year 2- Workflow - Prerequisite: Introduction to Data Science +Year 2- Data Structures - Prerequisite: Programming +Year 2- DBL Information Systems - Prerequisite: Datamodelling and Databases +Year 2- Probability and Statistics - Prerequisite: Calculus +Year 3 - Data Visualisation - Prerequisites: Computer Graphics & Linear Algebra & Programming +Year 3 - Business Information Systems - Prerequisites: Logic and Set Theory & Datamodelling and Databases +Year 3 - Web Analytics - Prerequisite: Web Technology +Year 3 - DBL Algorithms - Prerequisite: Data Structures + +Packages: +Programming - Linear Algebra - Computer Graphics - Data Visualisation +Programming - Human Technology Interaction - Web Technology - Web Analytics +Programming - Data Structures - DBL Algorithms + +Electives and USE: +Year 1 - 2x Elective +Year 2 - 3x Elective/USE +Year 3 - 6x Elective/USE +*/ |