-
Notifications
You must be signed in to change notification settings - Fork 0
/
course_timetable_test.js
74 lines (71 loc) · 1.21 KB
/
course_timetable_test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
var NUM_SLOTS = 5;
timetable_layers = {
base : {
"Monday" : [
"",
"DASS (H-105)",
"",
"Into to Human Sciences (H-105)",
""
],
"Tuesday" : [
"",
"",
"",
"Science 2 (H-205)",
""
],
"Wednesday" : [
"",
"Machine, Data and Learning (H-205)",
"VE (2)",
"",
""
],
"Thursday" : [
"",
"DASS (H-105)",
"",
"",
""
],
"Friday" : [
"",
"",
"",
"",
""
],
"Saturday" : [
"",
"Machine, Data and Learning (H-205)",
"",
"",
""
]
},
computer_graphics : {
"Monday" : [],
"Tuesday" : [],
"Wednesday" : [],
"Thursday" : [],
"Friday" : [],
"Saturday" : []
},
}
id_mappings = {
"Monday" : ["MN1", "MN2", "MN3", "MN4", "MN5"],
"Tuesday" : ["TU1", "TU2", "TU3", "TU4", "TU5"],
"Wednesday" : ["WD1", "WD2", "WD3", "WD4", "WD5"],
"Thurday" : ["TH1", "TH2", "TH3", "TH4", "TH5"],
"Friday" : ["FR1", "FR2", "FR3", "FR4", "FR5"],
"Saturday" : ["ST1", "ST2", "ST3", "ST4", "ST5"]
};
function updateTimetable(){
for(var i in id_mappings){
for(var j = 0; j < NUM_SLOTS; j++){
console.log(id_mappings[i][j]);
document.getElementById(id_mappings[i][j]).innerHTML = timetable_layers["base"][j];
}
}
}