UniTime / unitime

Comprehensive University Timetabling System
http://www.unitime.org
Apache License 2.0
274 stars 162 forks source link

Timetable Grid Query #109

Closed rakoi closed 2 years ago

rakoi commented 2 years ago

Kind request for the query that returns the timetable grid. As per the page image

tomas-muller commented 2 years ago

The data cannot be easily retrieved with a query, especially combining the time (days of the week, a bitmap stored as a single number) and date patterns (days that a class can take place, stored as a string with ones for teaching days and zeroes as non-teaching days). Or more precisely, they are retrieved by a query (multiple queries to be more precise), but there is a lot of post-processing to display the data in this format. For more details, please see this TimetableGridSolutionHelper.createModel(..) method, which is responsible for populating the model (for a particular room) that is used to render this table. The solutionIdsStr parameter is containing a list of currently selected solutions (can be blank), room is the room for which the model is to be created, and context contains parameters provided in the page filter and UniTime configuration.

If you are interested in committed solutions only, using the event-based data is often easier. See issue #108 for more details.

rakoi commented 2 years ago

Based on the query shared on #108 is it possible to add the respective assigned_instructors , date_pattern and configuration_limit (i.e from the instr_offering_config table) to the query?

tomas-muller commented 2 years ago

Do you mean to the query from #108? Yes, that is possible:

Configuration limit: e.clazz.schedulingSubpart.instrOfferingConfig or e.clazz.schedulingSubpart.unlimitedEnrollment is true when the configuration is unlimited Date pattern: either e.clazz.datePattern when set on the class or e.clazz.schedulingSubpart.datePattern when set on the subpart (and no date pattern is set on the class) Class instructors: join with e.clazz.classInstructors ci, use ci.instructor.lastName, ci.instructor.firstName, etc. (please note that there can be no instructor, one, or multiple instructors assigned to the class)