Composition of event titles and timetable changes - avinotec/Stundenplaner.FHE_EAH Wiki

How Event Titles are composed

example: WI/WIEC(BA)Ma/Ü/04.2

  • WI/WIEC(BA) -> abbreviation study program and degree in brackets (Bachelor or Master)
  • Ma -> abbreviation of module
  • -> abbreviation of event type (Ü = exercise, V = lecture, P = practical, more types in the following)
  • /04 -> group (e.g. training or practical group the study group belongs to), i. e. a subset of study groups; usually "01" for lectures
  • .2 -> special timetable change number (more details under TimeTableChange)

To make that clear, /03.1 and /03.2 correspond to the same set of study groups whereas /04.1 is a different one. In the suffix /03.n, n indicates a time table change.

Ideally, an event has a persistent naming like "WI/WIEC(BA)Ma/Ü/04.n" or "WI/WIEC(BA)Ma/Ü/04" if no changes or additional dates occured. But the structures of the study program title, study program degree, etc. can differ and has to be carefully watched when applying regex on event titles. For example, there is a special case when study groups are joined for an exceptional date, then the group number is combined to "01_02" or "01_04" in the event title of this date (assumed number of first group is 01, number of second group is 02 or 04). Furthermore, there are a lot of abbreviations for different types of event, such as: APL, B, E, Kon, Lehre, mdl. Prfg., P, PL, S, T, V, Ü, Wdh.-Prfg., Wdh.-APL.

Challenges

Events with different timetable change numbers differ in their ID. Which means that events belonging to the same event series like a math excercise, can get different IDs. This is why we need to manually merge the events into one event series based on their title.

When cutting the event title, e. g. to remove the study program prefix, we need to know the regex pattern to parse it. For that it is important to know that

  • the study program prefix contains a "/" if the event is registered for multiple study programs, otherwise not. For example: "WI/WIEC(BA)" vs. "WI(BA)".
  • the subject title can also contain a "/" and other special characters.
  • ...

Timetable changes

If a set of events, e.g. math exercise on Wednesdays at 9 am, is changed to 11 am at the beginning of the semester, then the date of all events is simply changed inplace because all events of the set are concerned. If only one date in a set of events has changed, e. g. only the math exercise on xx.xx.xxxx is changed to 11 am, then this math exercise becomes a special date and thus a new entry is made for that event. Because the set of events of the math exercise (named "YY(YY)/Ma/Ü/01") is now splitted into subsets, the title of all original events on Wednesday at 9 am is getting changed to "YY(YY)/Ma/Ü/01.1" (keeping their activityId) and the special event on xx.xx.xxxx at 11 am is named "YY(YY)/Ma/Ü/01.2" (getting an own activityId).

If the set of study groups of an eventset is changed, e. g. because less students attended and study groups 1 and 2 got merged into a new study group 3, then just the set of study groups stored in the activity is changed. Title and Id of the activity stay unchanged.

Modules

An module holds a certain set of activities/event sets. The assignment of activities is looked after and can be used seen as reliable.
An activity is always assigned to one module only. Although it theoretically belongs to multiple modules e. g. "AO(BA)Math 1", "XX(BA)Math" and "WI(BA)Basics Math", all event sets of the module are assigned to only one module e. g. "XX(BA)Math"), which means each event series has exactly one module id but multiple event series can have the same module id (e.g. the event series of the math exercise and the math lecture).

Challenges

Refresh My Schedule and Detect timetable changes:
If we want to check if any properties of an event series has changed, we need to call the API requesting the whole module that we took activities from and merged into the event series. For a certain moduleId, we get a list of all activities/event sets that belong to the same module.
We can filter those activities by event series name (needs to be filtered because the list contains all lectures, exercises, practicals, ... of the module) to get all event sets of the event series including event sets that have been added but we do not know about yet because they got a new activityID. We can safely use the event series name for that because event sets with equal base titles ({study program}({degree}){module}) always are assigned to the same module (note, that the study program prefix is important).
By comparing fetched data with local data, we can detect timetable changes.