Fachschaft07 / fs-rest

REST interface for several services
6 stars 1 forks source link

Timetable of Faculty 10 #42

Closed FHellmann closed 9 years ago

FHellmann commented 9 years ago

The timetable parser for the faculty 10 is not correct. Sometimes there is no Professor detected by the parser. But every lesson has a Professor.

Timetable to Faculty 10

lucaspataro commented 9 years ago

This is not a bug in the Parser. Some Lessons for IB groups have no teacher listed, for example http://fi.cs.hm.edu/fi/rest/public/timetable/group/ib3c.

FHellmann commented 9 years ago

The data from the if.cs.hm.edu page is not the same as from the Timetable of the Faculty 10. @thomai???

thomai commented 9 years ago

At first: A few years ago, the FK07 timetable on if.cs.hm.edu didn't contain FK10 classes. So our approach was parsing the FK07 and FK10 independently and merging them together afterwards.

@jqbbq You have to parse the if.cs.hm.edu site AND the FK10 timetables probably. For the FK10 timetable you have to parse the HTML pages and weird JavaScript code to fill out the dropdown menus. Have fun :-p

LokiNightray commented 9 years ago

how about setting a default value, like unknown or anything else if no prof is found. at least as fallback, and it would fasten up the next release of the app

And yes you have to parse both sites, but even on the Timetable of the Faculty 10, there is a lesson without a prof... Well what ever it may be easier for you to parse if you take the iframe itself: http://w3bw-o.hm.edu/iframe/studieninfo_vorlesungsplan.php?lv=248&kategorie=Stundenplan

there are some params that might be interessting for you like: lv for "lehrveranstaltung" - its an id for a course druck - either 'ja' or 'nein' - default is nein id - haven't found out yet what this param does semestergr - well its the semester group (but represented as some weird id that doesn't make any sense) kategorie - should probably always be set to Stundenplan... this way it will display you everything matching to the other params sem - a hidden param that does... hm... nothing? XD

thomai commented 9 years ago

Sounds good. But please use my parser in the old app code. It should work for the most part :+1:

FHellmann commented 9 years ago

I've already refactored the old parser for the faculty 10. The new parser can be found here.

lucaspataro commented 9 years ago

The parser shouldn't be the problem. In case no Prof is found the rest service inserts NULL into the teacher node. @FHellmann How about checking for the NULL value instead of insisting there is an teacher entry in the app?

FHellmann commented 9 years ago

I've already check the null option by teachers. It's just an enhancement for the future, that every subject has a teacher.