weekdaze-0.0.0.3: A school-timetable problem-solver.

Safe HaskellNone
LanguageHaskell2010

WeekDaze.LocationView.Timetable

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Defines the personal timetable for any week, for each location.
  • It contains identical information to Timetable, but the data has been re-indexed to present it in a form relevant to a location rather than a student.
Synopsis

Types

Type-synonyms

type Timetable locationId timeslotId teacherId level = Timetable locationId timeslotId (LessonResourceIds teacherId) level Source #

An association-list of the timetables for all locations.

Functions

Mutators

Translation

fromStudentViewTimetable Source #

Arguments

:: (Ix timeslotId, Enum timeslotId, Eq level, Eq teacherId, Ord locationId, Show level, Show locationId, Show teacherId, Show timeslotId) 
=> Bool

Permit a temporary student-body merger.

-> Timetable locationId timeslotId teacherId level

An unallocated timetable, supplied for efficiency.

-> Timetable timeslotId locationId teacherId level 
-> Timetable locationId timeslotId teacherId level 
  • Build a Timetable by inverting a Timetable.
  • CAVEAT: in the original Timetable, different student-bodies may simultaneously reference a single location. This is normal behaviour, provided the location has sufficient capacity, & is implemented seemlessly, as a map-structure with one or more keys referencing a value, containing the same location.
  • When inverting such a timetable, this many-to-one relationship becomes a one-to-many, & a single location-id must now reference many student-bodies. The map-structure (cf. multi-map), can't directly accommodate multiple identical keys, with different values, so this is achieved by merging the student-bodies into a class of students.

toStudentViewTimetable Source #

Arguments

:: (Ix timeslotId, Enum timeslotId) 
=> Timetable timeslotId locationId teacherId level

An unallocated timetable, supplied for efficiency.

-> Timetable locationId timeslotId teacherId level 
-> Timetable timeslotId locationId teacherId level 
  • Build a Timetable, by inverting a Timetable.
  • Each lesson in the timetable seen from the location's perspective, contains a student-class. This student-class must be broken into student-bodies, before inserting repeatedly into the required timetable as seen from the student-body's perpective.

toXHtml Source #

Arguments

:: (Ix timeslotId, Fractional minimumContrastRatio, Ord level, Ord locationId, Ord minimumContrastRatio, Ord teacherId, Show level, Show teacherId, HTML campus, HTML level, HTML locationId, HTML synchronisationId, HTML teacherId, HTML timeslotId) 
=> (locationId -> Lesson teacherId level -> Course synchronisationId level timeslotId)

Find the course to which the specified lesson belongs.

-> LocationCatalogue locationId campus 
-> GenericTimetableToMarkup locationId minimumContrastRatio teacherId timeslotId (Timetable locationId timeslotId teacherId level) 

Render in XHTML, as a definition-list.