Fixed a bug where there would only one 'special_hour' would register.

This commit is contained in:
Bram van der Veen 2015-06-15 19:18:19 +02:00
parent 39413b118a
commit fbe683b5b6

View file

@ -44,8 +44,8 @@ function to_json(page) {
//Looping for (optional) specialhours //Looping for (optional) specialhours
var amount_of_special_hours = schedule.find('table').eq(day).children().length; var amount_of_special_hours = schedule.find('table').eq(day).children().length;
for (special_hour = 0; special_hour < amount_of_special_hours; special_hour++) {
schedule_data[day][hour] = {teacher: [], chamber: [], course: [], changed: []}; schedule_data[day][hour] = {teacher: [], chamber: [], course: [], changed: []};
for (special_hour = 0; special_hour < amount_of_special_hours; special_hour++) {
var selected_hour = schedule.find('table').eq(day).find('tr').eq(special_hour).find('td'); var selected_hour = schedule.find('table').eq(day).find('tr').eq(special_hour).find('td');
schedule_data[day][hour].teacher[special_hour] = selected_hour.eq(0).html(); schedule_data[day][hour].teacher[special_hour] = selected_hour.eq(0).html();