Some courses have alternate-week meeting sections, that is, meeting sections that only run every other week. For purposes of scheduling these sections, the API has a notion of a "week 1" and a "week 2" - some alternate-week sections run on week 1, and some run on week 2. Two sections do not conflict if they run at the same time but on different weeks.
This notion of a global "week 1" and "week 2" is unofficial, i.e. made-up by this API for the purposes of scheduling. There is an official notion of "week 1" and "week 2" for each offering of each course, and there is an official naming convention where sections that run on week 1 (in the per-offering sense) have section codes ending in "1", while sections that run on week 2 (in the per-offering sense) have section codes ending in "2". Unfortunately, the per-offering choices of what is "week 1" and what is "week 2" is not consistent among all courses/offerings. As a result, it is impossible to determine whether two alternate-week sections that run at the same time conflict or not based just on the last digit of their section codes.
To rectify this, the API imposes a notion of a global "week 1"
and "week 2". Some offerings' notion of week 1 and week 2 coincides
with the global notion, while for other offerings it is the opposite. The
offerings whose notion of week 1 and week 2 is the opposite of the global
notion, are listed (by activity/session code) in the altwkexcept.txt
data
file (see Data Files Used
by the API). The API pretends that for courses in this file, the last
digit of the section code is the opposite of what it actually is, and then
proceeds to determine whether two alternate-week sections that run at the
same time conflict or not based on the last digits of their section codes.
It is the API client's responsibility to manually maintain the altwkexcept.txt
file as necessary. To determine how
course offerings' notions of week 1 and week 2 compare to one another, look
at the notes at the top of the relevant department's timetable listings page
(e.g. http://www.artsandscience.utoronto.ca/ofr/timetable/winter/csb.html),
and look for comments similar to "For your BIO130H1F laboratory, if
you plan to take a CHM138H1 S/139H1 S/ PHY152H1 S laboratory on the same
day in alternating weeks, select P sections in BOTH COURSES that end in the
same digit". (You can see how it would be difficult for the timetable
data update process to parse this and automatically come up with the list
of courses that should be in altwkexcept.txt
).
Note: all of this applies to courses in the Faculty of Arts and Science. Courses in the Faculty of Applied Science and Engineering can also have alternate-week sections, but the method of determining whether an alternate-week section runs on week 1 or week 2 is different, and does not require manual intervention. (On the other hand, keeping the Artsci and Engineering notions of a global week 1/week 2 in sync does require manual intervention in the form of an update to the API implementation every year - I may in the future factor this out into a configuration file as well).