Skip to content

Commit

Permalink
this should fix course loading
Browse files Browse the repository at this point in the history
Relating to LAWS6101(O)_S1 having brackets, this fixes the overall
loading  of timetable.json but #274 still an issue
  • Loading branch information
mdchia committed Dec 24, 2018
1 parent b15e3a5 commit 55f447a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/timetable.js
Expand Up @@ -556,7 +556,7 @@ var Course = {
rawData[3][i].fullName = rawData[0][course.nid];
rawData[3][i].info = rawData[1][course.iid].replace(/(\s|([^\d]))(0+)/g, '$2').replace('/', ' / ');
rawData[3][i].location = rawData[2][course.lid];
rawData[3][i].name = rawData[3][i].fullName.match(/^([a-zA-Z0-9]+)_.+?\s(.+)/)[1];
rawData[3][i].name = rawData[3][i].fullName.match(/^([a-zA-Z0-9\(\)]+)_.+?\s(.+)/)[1];
rawData[3][i].day = parseInt(course.day) !== course.day ? course.day : Calendar.weekdays[course.day]; // update transition detection
delete rawData[3][i].nid;
delete rawData[3][i].iid;
Expand Down

0 comments on commit 55f447a

Please sign in to comment.